make public
This commit is contained in:
commit
4c4a1da09b
14
.gitignore
vendored
Normal file
14
.gitignore
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
ENV
|
||||
.DS_Store
|
||||
|
||||
*.log
|
||||
*.swp
|
||||
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
.tags
|
||||
pp
|
||||
history.yaml
|
||||
|
||||
bunker.egg-info/
|
||||
674
COPYING
Normal file
674
COPYING
Normal file
@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 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 General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is 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. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
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.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
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 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. Use with the GNU Affero General Public License.
|
||||
|
||||
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 Affero 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 special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU 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 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 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 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 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU 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 the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
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 GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
16
LICENSE
Normal file
16
LICENSE
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
(c) Copyright 2017-2019 by Coinkite Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
in the file COPYING. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
7
Makefile
Normal file
7
Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
all:
|
||||
@echo "No default"
|
||||
|
||||
|
||||
tags:
|
||||
ctags -f .tags *.py */*.py
|
||||
|
||||
112
README.md
Normal file
112
README.md
Normal file
@ -0,0 +1,112 @@
|
||||
# <i>CK Bunker</i>
|
||||
|
||||
## What is the Coinkite Bunker?
|
||||
|
||||
It's a python program that you run on a computer attached to a
|
||||
Coldcard. It will setup and operate the Coldcard in "HSM Mode" where
|
||||
it signs without a human pressing the OK key. To keep your
|
||||
funds safe, the Coldcard implements a complex set of spending rules
|
||||
which cannot be changed once HSM mode is started.
|
||||
|
||||
Using the `tord` (Tor deamon) you already have, the CK Bunker can
|
||||
make itself available as a hidden service for remote access over
|
||||
Tor. A pretty website for setup and operation allows access to all
|
||||
HSM-related Coldcard features, including:
|
||||
|
||||
- transaction signing, by uploading a PSBT; can broadcast signed txn using Blockstream.info (onion)
|
||||
- define policy rules, spending limits, velocity controls, logging policy
|
||||
- user setup (TOTP QR scan to enroll on Coldcard, or random passwords (Coldcard) or known password
|
||||
|
||||
The bunker encrypts its own settings and stores the private key for that inside Coldcard's
|
||||
storage locker (which is inside the secure element). The private key for the onion
|
||||
service, for example, is held on the bunker's disk encrypted like that.
|
||||
|
||||
## What is Coldcard?
|
||||
|
||||
Coldcard is a Cheap, Ultra-secure & Opensource Hardware Wallet for Bitcoin.
|
||||
Get yours at [ColdcardWallet.com](http://coldcardwallet.com)
|
||||
|
||||
[Follow @COLDCARDwallet on Twitter](https://twitter.com/coldcardwallet) to keep up
|
||||
with the latest updates and security alerts.
|
||||
|
||||
## Check-out and Setup
|
||||
|
||||
Do a checkout, recursively to get all the submodules:
|
||||
|
||||
git clone --recursive https://github.com/Coldcard/ck-bunker.git
|
||||
|
||||
Then:
|
||||
|
||||
- `virtualenv -p python3 ENV` (Python 3.7 or higher is required)
|
||||
- `source ENV/bin/activate` (or `source ENV/bin/activate.csh` based on shell preference)
|
||||
- `pip install -r requirements.txt`
|
||||
- `pip install --editable .`
|
||||
|
||||
## Usage
|
||||
|
||||
The executable is called `ck-bunker`:
|
||||
|
||||
```sh
|
||||
$ ck-bunker --help
|
||||
Usage: ck-bunker [OPTIONS] COMMAND [ARGS]...
|
||||
|
||||
Options:
|
||||
-s, --serial HEX Operate on specific unit (default: first found)
|
||||
--help Show this message and exit.
|
||||
|
||||
Commands:
|
||||
list List all attached Coldcard devices
|
||||
example Show an example config file, using the default values
|
||||
run Start the CK-Bunker for normal operation
|
||||
setup Configure your transaction signing policy, install it and then...
|
||||
```
|
||||
|
||||
There are two modes for the Bunker: "setup" and "run mode". In setup
|
||||
mode, Tor connections are disabled, as is the login screen.
|
||||
|
||||
You would typically use the setup mode for picking the onion address, the
|
||||
master login password and all the details of the HSM policy.
|
||||
|
||||
```sh
|
||||
$ ck-bunker setup
|
||||
```
|
||||
|
||||
Open this URL in your local web browser (must be same machine):
|
||||
<http://localhost:9823>
|
||||
|
||||
Once the Coldcard is running in HSM mode, with your policy installed,
|
||||
it makes sense to operate in normal "run" mode:
|
||||
|
||||
```sh
|
||||
$ ck-bunker run
|
||||
```
|
||||
|
||||
You may also run with remote connections (and login) disabled. This would be useful
|
||||
if you have some existing web proxy already in place.
|
||||
|
||||
```sh
|
||||
$ ck-bunker --local run
|
||||
```
|
||||
|
||||
## Tor Use
|
||||
|
||||
To access over Tor as a hidden service, you must have `tord` running
|
||||
on the same machine. For desktop systems, keeping TorBrowser open
|
||||
is enough to acheive this. On servers, start tord with default options,
|
||||
and ck-bunker will use the control port (localhost port 9051 or 9151).
|
||||
|
||||
If you use the bunker to broadcast the final (signed) transaction,
|
||||
the socks proxy of tord (port 9050) will also be used.
|
||||
|
||||
|
||||
## Operational Requirements
|
||||
|
||||
You will need:
|
||||
|
||||
- this code
|
||||
- a Coldcard connected via USB
|
||||
- `tord` (Tor program)
|
||||
- Internet connection
|
||||
- a Tor-capable brwoser, like "Tor Browser" or Tails.
|
||||
- (optional) a microSD card, for logging of transactions on Coldcard
|
||||
|
||||
68
chain.py
Normal file
68
chain.py
Normal file
@ -0,0 +1,68 @@
|
||||
# (c) Copyright 2020 by Coinkite Inc. This file is part of Coldcard <coldcardwallet.com>
|
||||
# and is covered by GPLv3 license found in COPYING.
|
||||
#
|
||||
# chain.py --- API to blockstream stuff
|
||||
#
|
||||
import sys, os, asyncio, logging, requests
|
||||
from objstruct import ObjectStruct
|
||||
from persist import settings
|
||||
from status import STATUS
|
||||
from binascii import b2a_hex, a2b_hex
|
||||
from utils import json_loads
|
||||
|
||||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
def broadcast_txn(txn):
|
||||
# take bytes and get them shared over P2P to the world
|
||||
# - raise w/ text about what happened if it fails
|
||||
# - limited docs: <https://github.com/Blockstream/esplora/blob/master/API.md>
|
||||
ses = requests.session()
|
||||
ses.proxies = dict(http=settings.TOR_SOCKS)
|
||||
ses.headers.clear() # hide user-agent
|
||||
|
||||
url = settings.EXPLORA
|
||||
url += '/api/tx' if not STATUS.is_testnet else '/testnet/api/tx'
|
||||
|
||||
assert '.onion/' in url, 'dude, your privacy'
|
||||
logging.warning(f"Sending txn via: {url}")
|
||||
resp = ses.post(url, data=b2a_hex(txn).decode('ascii'))
|
||||
|
||||
msg = resp.text
|
||||
|
||||
if not resp.ok:
|
||||
# content is like:
|
||||
# sendrawtransaction RPC error: {"code":-22,"message":"TX decode failed"}
|
||||
# which is a text thing, including some JSON from bitcoind?
|
||||
|
||||
if '"message":' in msg:
|
||||
try:
|
||||
prefix, rest = msg.split(': ', 1)
|
||||
j = json_loads(rest)
|
||||
if prefix == 'sendrawtransaction RPC error':
|
||||
msg = j.message
|
||||
else:
|
||||
msg = prefix + ': ' + j.message
|
||||
except:
|
||||
pass
|
||||
|
||||
msg = f"Transaction broadcast FAILED: {msg}"
|
||||
logging.error(msg)
|
||||
return msg
|
||||
|
||||
# untested
|
||||
msg = f"Transaction broadcast success: {msg}"
|
||||
logging.info(msg)
|
||||
|
||||
return msg
|
||||
|
||||
def link_to_txn(txn_hash):
|
||||
path = '/tx/' if not STATUS.is_testnet else '/testnet/tx/'
|
||||
assert len(txn_hash) == 64
|
||||
return settings.EXPLORA + path + txn_hash
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# test code
|
||||
r = broadcast_txn(b'sdhffkhjkdfshdfshjdfshdfkshdfs')
|
||||
|
||||
# EOF
|
||||
37
chrono.py
Normal file
37
chrono.py
Normal file
@ -0,0 +1,37 @@
|
||||
#
|
||||
# Time/data related functions. Trying hard not to rewrite existing things.
|
||||
#
|
||||
# Everything should be stored/calculated in UTC.
|
||||
#
|
||||
import time, datetime, calendar, pendulum
|
||||
from email.utils import formatdate as rfc_format
|
||||
|
||||
def NOW():
|
||||
# Use this for everything.
|
||||
return pendulum.now()
|
||||
|
||||
def TIME_AGO(**kws):
|
||||
# Return a time in past, like TIME_AGO(hours=3)
|
||||
return pendulum.now() - datetime.timedelta(**kws)
|
||||
|
||||
def TIME_FUTURE(**kws):
|
||||
# Return a time in future, like TIME_FUTURE(hours=3)
|
||||
return pendulum.now() + datetime.timedelta(**kws)
|
||||
|
||||
def as_time_t(dt):
|
||||
" convert datetime into unix timestamp (all UTC)"
|
||||
if hasattr(dt, 'timestamp'):
|
||||
# expected case for Pendulum values
|
||||
return dt.timestamp()
|
||||
else:
|
||||
return calendar.timegm(dt.utctimetuple())
|
||||
|
||||
def from_time_t(time_t):
|
||||
" convert unix timestamp into datetime (all UTC)"
|
||||
return pendulum.from_timestamp(time_t)
|
||||
|
||||
def from_iso(s):
|
||||
# Convert from ISO8601, and capture TZ
|
||||
return pendulum.parse(s)
|
||||
|
||||
# EOF
|
||||
331
conn.py
Normal file
331
conn.py
Normal file
@ -0,0 +1,331 @@
|
||||
# (c) Copyright 2020 by Coinkite Inc. This file is part of Coldcard <coldcardwallet.com>
|
||||
# and is covered by GPLv3 license found in COPYING.
|
||||
#
|
||||
# Connection to Coldcard (and/or simulator).
|
||||
#
|
||||
import asyncio, logging, os
|
||||
from utils import Singleton, xfp2str, json_loads, json_dumps
|
||||
from status import STATUS
|
||||
from persist import settings, BP
|
||||
from binascii import a2b_hex
|
||||
import policy
|
||||
from objstruct import ObjectStruct
|
||||
from hmac import HMAC
|
||||
from hashlib import sha256
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
from ckcc.protocol import CCProtocolPacker, CCProtocolUnpacker, CCFramingError
|
||||
from ckcc.protocol import CCProtoError, CCUserRefused, CCBusyError
|
||||
from ckcc.client import ColdcardDevice, COINKITE_VID, CKCC_PID
|
||||
from ckcc.constants import (USER_AUTH_TOTP, USER_AUTH_HMAC, USER_AUTH_SHOW_QR, MAX_USERNAME_LEN)
|
||||
from ckcc.utils import calc_local_pincode
|
||||
|
||||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
executor = ThreadPoolExecutor(max_workers=5)
|
||||
|
||||
# if you see this, it means the USB plug is fell out!
|
||||
class MissingColdcard(RuntimeError):
|
||||
pass
|
||||
|
||||
#logging.info("fd = %d" % open('/dev/null').fileno())
|
||||
|
||||
class Connection(metaclass=Singleton):
|
||||
|
||||
def __init__(self, serial):
|
||||
self.serial = serial
|
||||
self.dev = None
|
||||
self.dev_key = None
|
||||
self.lock = asyncio.Lock()
|
||||
self.sign_lock = asyncio.Lock()
|
||||
self._conn_broken(setup_time=True)
|
||||
|
||||
async def run(self):
|
||||
# connect to, and maintain a connection to a single Coldcard
|
||||
|
||||
logging.info("Connecting to Coldcard.")
|
||||
|
||||
while 1:
|
||||
try:
|
||||
if not self.serial and os.path.exists(settings.SIMULATOR_SOCK):
|
||||
# if simulator is running, just use it.
|
||||
sn = settings.SIMULATOR_SOCK
|
||||
else:
|
||||
sn = self.serial
|
||||
|
||||
d = ColdcardDevice(sn=sn)
|
||||
logging.info(f"Found Coldcard {d.serial}.")
|
||||
|
||||
await asyncio.get_running_loop().run_in_executor(executor, d.check_mitm)
|
||||
|
||||
async with self.lock:
|
||||
self.dev = d
|
||||
except:
|
||||
logging.error("Cannot connect to Coldcard (will retry)", exc_info=0)
|
||||
await asyncio.sleep(settings.RECONNECT_DELAY)
|
||||
continue
|
||||
|
||||
# stay connected, and check we are working periodically
|
||||
logging.info(f"Connected to Coldcard {self.dev.serial}.")
|
||||
|
||||
STATUS.connected = True
|
||||
|
||||
# read static info about coldcard
|
||||
STATUS.xfp = xfp2str(self.dev.master_fingerprint)
|
||||
STATUS.serial_number = self.dev.serial
|
||||
STATUS.is_testnet = (self.dev.master_xpub[0] == 't')
|
||||
STATUS.hsm = {}
|
||||
STATUS.reset_pending_auth()
|
||||
STATUS.notify_watchers()
|
||||
await self.hsm_status()
|
||||
|
||||
while 1:
|
||||
await asyncio.sleep(settings.PING_RATE)
|
||||
try:
|
||||
# use long timeout here, even tho simple command, because the CC may
|
||||
# we working on something else right now (thinking).
|
||||
h = await self.send_recv(CCProtocolPacker.hsm_status(), timeout=20000)
|
||||
logging.info("ping ok")
|
||||
await self.hsm_status(h)
|
||||
except MissingColdcard:
|
||||
self._conn_broken()
|
||||
break
|
||||
except:
|
||||
logging.error("Ping failed", exc_info=1)
|
||||
|
||||
def _conn_broken(self, setup_time=False):
|
||||
# our connection is lost, so clear/reset system state
|
||||
if self.dev:
|
||||
self.dev.close()
|
||||
self.dev = None
|
||||
|
||||
STATUS.connected = False
|
||||
STATUS.xfp = None
|
||||
STATUS.serial_number = None
|
||||
STATUS.is_testnet = False
|
||||
STATUS.hsm = {}
|
||||
STATUS.reset_pending_auth()
|
||||
|
||||
if not setup_time:
|
||||
BP.reset()
|
||||
|
||||
STATUS.notify_watchers()
|
||||
|
||||
async def activated_hsm(self):
|
||||
# just connected to a Coldcard w/ HSM active already
|
||||
# - ready storage locker, decrypt and use those settings
|
||||
logging.info("Coldcard now in HSM mode. Fetching storage locker.")
|
||||
|
||||
try:
|
||||
sl = await self.get_storage_locker()
|
||||
except CCProtoError as exc:
|
||||
if 'consumed' in str(exc):
|
||||
import os, sys
|
||||
msg = "Coldcard refused access to storage locker. Reboot it and enter HSM again"
|
||||
logging.error(msg)
|
||||
print(msg, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
else:
|
||||
raise
|
||||
|
||||
try:
|
||||
import policy
|
||||
xk = policy.decode_sl(sl)
|
||||
except:
|
||||
logging.error("Unable to parse contents of storage locker: %r" % sl)
|
||||
return
|
||||
|
||||
if BP.open(xk):
|
||||
# unable to read our settings specific to this CC? Go to defaults
|
||||
# or continue?
|
||||
logging.error("Unable to read bunker settings for this Coldcard; forging on")
|
||||
else:
|
||||
STATUS.sl_loaded = True
|
||||
|
||||
if BP.get('tor_enabled', False) and not (STATUS.force_local_mode or STATUS.setup_mode):
|
||||
# get onto Tor as a HS
|
||||
from torsion import TOR
|
||||
STATUS.tor_enabled = True
|
||||
logging.info(f"Starting hidden service: %s" % BP['onion_addr'])
|
||||
asyncio.create_task(TOR.start_tunnel())
|
||||
|
||||
STATUS.reset_pending_auth()
|
||||
STATUS.notify_watchers()
|
||||
|
||||
async def send_recv(self, msg, **kws):
|
||||
# a more-async version of ColdcardDevice.send_recv?
|
||||
|
||||
if not self.dev or not STATUS.connected:
|
||||
raise MissingColdcard
|
||||
|
||||
try:
|
||||
def doit():
|
||||
return self.dev.send_recv(msg, **kws)
|
||||
|
||||
# we do need this lock
|
||||
async with self.lock:
|
||||
return await asyncio.get_running_loop().run_in_executor(executor, doit)
|
||||
|
||||
except CCFramingError:
|
||||
self._conn_broken()
|
||||
raise MissingColdcard
|
||||
except (CCProtoError, CCUserRefused):
|
||||
raise
|
||||
except BaseException as exc:
|
||||
logging.error(f"Error from Coldcard: {exc} (for msg: {msg!r}")
|
||||
self._conn_broken()
|
||||
raise MissingColdcard
|
||||
|
||||
async def hsm_status(self, h=None):
|
||||
# refresh HSM status
|
||||
b4 = STATUS.hsm.get('active', False)
|
||||
|
||||
try:
|
||||
b4_nlc = STATUS.hsm.get('next_local_code')
|
||||
h = h or (await self.send_recv(CCProtocolPacker.hsm_status()))
|
||||
STATUS.hsm = h = json_loads(h)
|
||||
STATUS.notify_watchers()
|
||||
except MissingColdcard:
|
||||
h = {}
|
||||
|
||||
if h.get('next_local_code') and STATUS.psbt_hash:
|
||||
if b4_nlc != h.next_local_code:
|
||||
STATUS.local_code = calc_local_pincode(a2b_hex(STATUS.psbt_hash), h.next_local_code)
|
||||
else:
|
||||
# won't be required
|
||||
STATUS.local_code = None
|
||||
|
||||
if ('summary' in h) and h.summary and not BP.get('priv_over_ux') and not BP.get('summary'):
|
||||
logging.info("Captured CC's summary of the policy")
|
||||
BP['summary'] = h.summary
|
||||
BP.save()
|
||||
|
||||
# has it just transitioned into HSM mode?
|
||||
if STATUS.connected and STATUS.hsm.active and not b4:
|
||||
await self.activated_hsm()
|
||||
|
||||
return STATUS.hsm
|
||||
|
||||
async def hsm_start(self, new_policy=None):
|
||||
args = []
|
||||
if new_policy is not None:
|
||||
# must upload it first
|
||||
data = json_dumps(new_policy).encode('utf8')
|
||||
args = self.dev.upload_file(data)
|
||||
|
||||
# save a trimmed copy of some details, if they want that
|
||||
bk = policy.desensitize(new_policy)
|
||||
BP['summary'] = None
|
||||
if not bk.get('priv_over_ux'):
|
||||
BP['priv_over_ux'] = False
|
||||
BP['policy'] = bk # full copy
|
||||
BP['xfp'] = xfp2str(self.dev.master_fingerprint)
|
||||
BP['serial'] = self.dev.serial
|
||||
else:
|
||||
BP['priv_over_ux'] = True
|
||||
BP['policy'] = None
|
||||
BP['xfp'] = None
|
||||
BP['serial'] = None
|
||||
|
||||
BP.save()
|
||||
|
||||
try:
|
||||
await self.send_recv(CCProtocolPacker.hsm_start(*args))
|
||||
except CCProtoError as exc:
|
||||
msg = str(exc)
|
||||
logging.error("Coldcard didn't like policy: %s" % msg)
|
||||
raise RuntimeError(str(msg))
|
||||
|
||||
async def delete_user(self, username):
|
||||
await self.send_recv(CCProtocolPacker.delete_user(username))
|
||||
|
||||
async def create_user(self, username, authmode, new_pw=None):
|
||||
# typically we'll let Coldcard pick password
|
||||
if authmode == USER_AUTH_HMAC and new_pw:
|
||||
secret = self.dev.hash_password(new_pw.encode('utf8'))
|
||||
else:
|
||||
secret = b''
|
||||
|
||||
await self.send_recv(CCProtocolPacker.create_user(username, authmode, secret))
|
||||
|
||||
async def user_auth(self, username, token, totp, psbt_hash):
|
||||
if len(token) == 6 and token.isdigit():
|
||||
# assume TOTP if token (password) is 6-numeric digits
|
||||
totp_time = totp or int(time.time() // 30)
|
||||
token = token.encode('ascii')
|
||||
else:
|
||||
# assume it's a raw password. need to hash it up
|
||||
# TODO: move this hashing into browser
|
||||
secret = self.dev.hash_password(token.encode('utf8'))
|
||||
token = HMAC(secret, msg=psbt_hash, digestmod=sha256).digest()
|
||||
totp_time = 0
|
||||
|
||||
await self.send_recv(CCProtocolPacker.user_auth(username.encode('ascii'), token, totp_time))
|
||||
|
||||
async def get_storage_locker(self):
|
||||
return await self.send_recv(CCProtocolPacker.get_storage_locker())
|
||||
|
||||
async def sign_psbt(self, data, finalize=False, flags=0x0):
|
||||
# upload it first
|
||||
|
||||
async with self.sign_lock:
|
||||
sz, chk = self.dev.upload_file(data)
|
||||
assert chk == a2b_hex(STATUS.psbt_hash)
|
||||
|
||||
await self.send_recv(CCProtocolPacker.sign_transaction(sz, chk, finalize, flags))
|
||||
|
||||
# wait for it to finish
|
||||
return await self.wait_and_download(CCProtocolPacker.get_signed_txn())
|
||||
|
||||
async def wait_and_download(self, req, fn=1):
|
||||
# Wait for user action (sic) on the device... by polling w/ indicated request
|
||||
# - also download resulting file
|
||||
|
||||
while 1:
|
||||
await asyncio.sleep(0.250)
|
||||
done = await self.send_recv(req, timeout=None)
|
||||
if done == None:
|
||||
continue
|
||||
break
|
||||
|
||||
if len(done) != 2:
|
||||
logging.error('Coldcard failed: %r' % done)
|
||||
raise RuntimeError(done)
|
||||
|
||||
result_len, result_sha = done
|
||||
|
||||
# download the result.
|
||||
result = self.dev.download_file(result_len, result_sha, file_number=fn)
|
||||
|
||||
return result
|
||||
|
||||
async def sign_text_msg(self, msg, subpath, addr_fmt):
|
||||
# send text and path to sign with; no policy check
|
||||
|
||||
msg = msg.encode('ascii')
|
||||
|
||||
async with self.sign_lock:
|
||||
try:
|
||||
await self.send_recv(CCProtocolPacker.sign_message(msg, subpath, addr_fmt))
|
||||
|
||||
while 1:
|
||||
await asyncio.sleep(0.250)
|
||||
done = await self.send_recv(CCProtocolPacker.get_signed_msg(), timeout=None)
|
||||
if done == None:
|
||||
continue
|
||||
break
|
||||
|
||||
except CCUserRefused:
|
||||
raise RuntimeError("Coldcard refused request based on policy.")
|
||||
|
||||
if len(done) != 2:
|
||||
logging.error('Coldcard failed: %r' % done)
|
||||
raise RuntimeError(done)
|
||||
|
||||
addr, sig = done
|
||||
|
||||
return sig, addr
|
||||
|
||||
|
||||
|
||||
# EOF
|
||||
1
data/.gitignore
vendored
Normal file
1
data/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.dat
|
||||
8
data/README.md
Normal file
8
data/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
# Data Files
|
||||
|
||||
- this directory will hold data files for the Bunker
|
||||
- they are encrypted with a private key held in the "storage locker" of the Coldcard
|
||||
- contents include Tor hidden service private key and settings
|
||||
- filename based on key
|
||||
- default key maps to `bp-1850f665aa1e22c0.dat`
|
||||
8
example-settings.yaml
Normal file
8
example-settings.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
# Example configuration file. See persist.py for variable names and default values.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# ck-bunker setup -c example-settings.yaml
|
||||
# ck-bunker run -c example-settings.yaml
|
||||
#
|
||||
PORT_NUMBER: 9800
|
||||
117
main.py
Normal file
117
main.py
Normal file
@ -0,0 +1,117 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# (c) Copyright 2020 by Coinkite Inc. This file is part of Coldcard <coldcardwallet.com>
|
||||
# and is covered by GPLv3 license found in COPYING.
|
||||
#
|
||||
# Main entry-point for project.
|
||||
#
|
||||
# To use this, install with:
|
||||
#
|
||||
# pip install --editable .
|
||||
#
|
||||
# That will create the command "ck-bunker" in your path.
|
||||
#
|
||||
import os, sys, click, hid, asyncio, logging
|
||||
from pprint import pformat, pprint
|
||||
|
||||
global force_serial
|
||||
force_serial = None
|
||||
|
||||
from ckcc.protocol import CCProtocolPacker
|
||||
from ckcc.protocol import CCProtoError, CCUserRefused, CCBusyError
|
||||
from ckcc.client import ColdcardDevice, COINKITE_VID, CKCC_PID
|
||||
|
||||
|
||||
# Options we want for all commands
|
||||
@click.group()
|
||||
@click.option('--serial', '-s', default=None, metavar="HEX",
|
||||
help="Operate on specific unit (default: first found)")
|
||||
def main(serial):
|
||||
global force_serial
|
||||
force_serial = serial
|
||||
|
||||
@main.command('list')
|
||||
def _list():
|
||||
"List all attached Coldcard devices"
|
||||
|
||||
count = 0
|
||||
for info in hid.enumerate(COINKITE_VID, CKCC_PID):
|
||||
#click.echo("\nColdcard {serial_number}:\n{nice}".format(
|
||||
# nice=pformat(info, indent=4)[1:-1], **info))
|
||||
click.echo(info['serial_number'])
|
||||
count += 1
|
||||
|
||||
if not count:
|
||||
click.echo("(none found)")
|
||||
|
||||
@main.command('example')
|
||||
def example_config():
|
||||
"Show an example config file, using the default values"
|
||||
|
||||
from persist import Settings
|
||||
|
||||
click.echo(Settings.make_sample())
|
||||
|
||||
@main.command('run')
|
||||
@click.option('--local', '-l', default=False, is_flag=True,
|
||||
help="Don't enable Tor (onion) access: just be on localhost")
|
||||
@click.option('--psbt', '-f', metavar="filename.psbt",
|
||||
help="Preload first PSBT to be signed", default=None,
|
||||
type=click.File('rb'))
|
||||
@click.option('--config-file', '-c', type=click.File('rt'), required=False)
|
||||
def start_service(local=False, config_file=None, psbt=None):
|
||||
"Start the CK-Bunker for normal operation"
|
||||
|
||||
if psbt:
|
||||
psbt = psbt.read()
|
||||
|
||||
asyncio.run(startup(False, local, config_file, psbt), debug=True)
|
||||
|
||||
@main.command('setup')
|
||||
@click.option('--local', '-l', default=False, is_flag=True,
|
||||
help="Don't enable Tor (onion) access: just be on localhost")
|
||||
@click.option('--config-file', '-c', type=click.File('rt'), required=False)
|
||||
def setup_hsm(local=False, config_file=None):
|
||||
"Configure your transaction signing policy, install it and then operate."
|
||||
|
||||
asyncio.run(startup(True, local, config_file, None), debug=True)
|
||||
|
||||
async def startup(setup_mode, force_local_mode, config_file, first_psbt):
|
||||
# All startup/operation code
|
||||
|
||||
loop = asyncio.get_running_loop()
|
||||
if loop.get_debug():
|
||||
# quiet noise about slow stuff
|
||||
loop.slow_callback_duration = 10
|
||||
|
||||
from utils import setup_logging
|
||||
setup_logging()
|
||||
|
||||
from persist import Settings
|
||||
Settings.startup(config_file)
|
||||
|
||||
aws = []
|
||||
|
||||
# copy some args into status area
|
||||
from status import STATUS
|
||||
STATUS.force_local_mode = force_local_mode
|
||||
STATUS.setup_mode = setup_mode
|
||||
|
||||
# preload the contents of a PSBT
|
||||
if first_psbt:
|
||||
STATUS.import_psbt(first_psbt)
|
||||
|
||||
from torsion import TOR
|
||||
aws.append(TOR.startup())
|
||||
|
||||
from conn import Connection
|
||||
aws.append(Connection(force_serial).run())
|
||||
|
||||
import webapp
|
||||
aws.append(webapp.startup(setup_mode))
|
||||
|
||||
|
||||
await asyncio.gather(*aws)
|
||||
|
||||
|
||||
# EOF
|
||||
110
make_captcha.py
Executable file
110
make_captcha.py
Executable file
@ -0,0 +1,110 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Draw a Captchas ... not meant to be hard, but easier to replace out, and challenging
|
||||
# to read image itself..
|
||||
#
|
||||
import random, os, io
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
# Avoid similar-looking letters/numbers.
|
||||
TOKEN_CHARS = 'abcdefghkmnpqrstuvwxyz23456789'
|
||||
|
||||
class CaptchaMaker:
|
||||
size = (256, 64) # limited by iphone case. esp. when entering value
|
||||
|
||||
def __init__(self, seed=None):
|
||||
self.rng = random.Random(seed)
|
||||
|
||||
|
||||
def draw(self, token):
|
||||
# draw some crazy captcha for indicated token and return as a
|
||||
# tuple: extension, raw_data
|
||||
raise NotImplementedError
|
||||
|
||||
def get_font(self, size=40, which='nova'):
|
||||
fn = { 'ransom': 'static/fonts/ransom-note.ttf',
|
||||
'nova': 'static/fonts/proximanova-semibold.ttf'
|
||||
}
|
||||
return ImageFont.truetype(fn[which], size)
|
||||
|
||||
class RansomCaptcha(CaptchaMaker):
|
||||
#
|
||||
# Just the simple ransom note that most people expect today.
|
||||
#
|
||||
def draw(self, token, foreground='#000', seed=None):
|
||||
fn = self.get_font(size=40, which='ransom')
|
||||
w,h = self.size
|
||||
dx,dy = fn.getsize('W')
|
||||
|
||||
im = Image.new('RGBA', self.size)
|
||||
dr = ImageDraw.Draw(im)
|
||||
|
||||
# some of the lower-case letters are confusing, so replace them
|
||||
remap = dict(x = 'X', s='S', a='A', g='G', q='Q')
|
||||
|
||||
x = 10
|
||||
ix = (w - (x*2)) * (len(token)-2) / dx
|
||||
for ch in token:
|
||||
ch = remap.get(ch, ch)
|
||||
y = self.rng.randint(-5, h-dy+5)
|
||||
dr.text( (x, y), ch, fill=foreground, font=fn)
|
||||
x += ix
|
||||
|
||||
data = io.BytesIO()
|
||||
im.save(data, format='png')
|
||||
|
||||
return 'png', data.getvalue()
|
||||
|
||||
class MegaGifCaptcha(CaptchaMaker):
|
||||
# These are fun, but too large to be practical? Keep in toolbox for later.
|
||||
|
||||
def draw(self, token, foreground='#fff', background='white'):
|
||||
|
||||
token = ' '.join(token.upper())
|
||||
|
||||
fn = self.get_font(size=30, which='nova')
|
||||
w,h = self.size
|
||||
dx,dy = fn.getsize('W')
|
||||
|
||||
randint = self.rng.randint
|
||||
sample = self.rng.sample
|
||||
|
||||
actual = []
|
||||
pass_thru = set()
|
||||
frames = []
|
||||
|
||||
ans_y = self.rng.randint(3, h-dy-3)
|
||||
ans_w = fn.getsize(token)[0]
|
||||
count = 15
|
||||
|
||||
for fr_num in range(count):
|
||||
im = Image.new('P', self.size, background)
|
||||
dr = ImageDraw.Draw(im)
|
||||
|
||||
# give them noise chars, except they are mostly correct so that
|
||||
# the order is not so clear at all. don't want to just be able to
|
||||
# pick the most common chars observed
|
||||
charset = set(token)
|
||||
while len(charset) < len(token) + 4:
|
||||
charset.add(sample(TOKEN_CHARS, 1)[0])
|
||||
|
||||
for k in range(int(w * 1.5/dx)):
|
||||
#ch = ''.join(self.rng.sample(TOKEN_CHARS, 1)).upper()
|
||||
ch = ''.join(sample(charset, 1)).upper()
|
||||
x = randint(-dx, w)
|
||||
y = ans_y + randint(-dy*3/4, dy*3/4)
|
||||
dr.text( (x,y), ch, fill=foreground, font=fn)
|
||||
|
||||
frames.append(im)
|
||||
|
||||
x = (w-ans_w)*fr_num / count
|
||||
dr.text( (x, ans_y), token, fill=foreground, font=fn)
|
||||
|
||||
data = io.BytesIO()
|
||||
|
||||
frames[0].save(data, format='gif', save_all=True, loop=0,
|
||||
append_images=frames + list(reversed(frames[1:-1])))
|
||||
|
||||
return 'gif', data.getvalue()
|
||||
|
||||
# EOF
|
||||
63
objstruct.py
Normal file
63
objstruct.py
Normal file
@ -0,0 +1,63 @@
|
||||
# (c) Copyright 2020 by Coinkite Inc. This file is part of Coldcard <coldcardwallet.com>
|
||||
# and is covered by GPLv3 license found in COPYING.
|
||||
#
|
||||
# objstruct.py
|
||||
#
|
||||
|
||||
class ObjectStruct(dict):
|
||||
'''An object like both a dict and also an object that you can
|
||||
easily use attr reference to get members. Construct with a
|
||||
dict or like a dict.
|
||||
'''
|
||||
|
||||
def __getattr__(self, name):
|
||||
if name in self:
|
||||
return self[name]
|
||||
else:
|
||||
# Do not return a default here because it breaks things
|
||||
raise AttributeError('No such attribute: %s' % name)
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
self[name] = value
|
||||
|
||||
def __delattr__(self, name):
|
||||
del self[name]
|
||||
|
||||
def __repr__(self):
|
||||
ret = '<%s:' % self.__class__.__name__
|
||||
for k,v in self.items():
|
||||
ret += ' %s=%r' % (k, v)
|
||||
return ret + '>'
|
||||
|
||||
@classmethod
|
||||
def promote(cls, x):
|
||||
# Often I get a dict() from an API wrapper that's taken some json and
|
||||
# run it thru json.loads(). It would be better to have that as nested
|
||||
# ObjectStruct (which is easily done with some arguments to loads, but
|
||||
# usually they don't provide that feature)... so call this function
|
||||
#
|
||||
|
||||
if isinstance(x, list):
|
||||
return [cls.promote(i) for i in x]
|
||||
|
||||
if isinstance(x, dict):
|
||||
x = cls(x)
|
||||
for k in x:
|
||||
x[k] = cls.promote(x[k])
|
||||
|
||||
return x
|
||||
|
||||
class DefaultObjectStruct(ObjectStruct):
|
||||
''' Same, but can provide a default value if get_default is overriden'''
|
||||
def get_default(self, fldname):
|
||||
# override me
|
||||
return None
|
||||
|
||||
def __getattr__(self, name):
|
||||
if name in self:
|
||||
return self[name]
|
||||
else:
|
||||
# sometimes you do want a default.
|
||||
return self.get_default(name)
|
||||
|
||||
# EOF
|
||||
189
persist.py
Normal file
189
persist.py
Normal file
@ -0,0 +1,189 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Persistent data for Bunker itself. Trying to minimize this for privacy.
|
||||
#
|
||||
import os, yaml, nacl.secret, logging
|
||||
from utils import Singleton, xfp2str, json_dumps, json_loads, WatchableMixin
|
||||
from hashlib import sha256
|
||||
from objstruct import ObjectStruct
|
||||
|
||||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
# globals, used system-wide
|
||||
settings = None
|
||||
BP = None
|
||||
|
||||
# System-wide settings for Bunker itself.
|
||||
#
|
||||
class Settings(metaclass=Singleton):
|
||||
|
||||
# web server port
|
||||
PORT_NUMBER = 9823
|
||||
|
||||
# session idle time, before we kick you out and require re-auth (seconds)
|
||||
MAX_IDLE_TIME = 10*60
|
||||
|
||||
# max time between showing login page, and the would-be user entering something useful (seconds)
|
||||
MAX_LOGIN_WAIT_TIME = 5*60
|
||||
|
||||
# bogus fixed password to get started
|
||||
MASTER_PW = 'test1234'
|
||||
|
||||
# default is harder captcha
|
||||
EASY_CAPTCHA = False
|
||||
|
||||
# default for "allow reboot of bunker"
|
||||
# - can you restart the bunker w/o restarting the Coldcard HSM?
|
||||
ALLOW_REBOOTS = True
|
||||
|
||||
# path to data files
|
||||
DATA_FILES = './data'
|
||||
|
||||
# used during secret/when we don't have a key yet
|
||||
# - maps to data/bp-1850f665aa1e22c0.dat
|
||||
PLACEHOLDER_KEY = b'ab'*16
|
||||
|
||||
# endpoint to use for sending txn; we assume it's Explora protocol (Blockstream.info)
|
||||
EXPLORA = 'http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion'
|
||||
|
||||
# port number for local instance of tord
|
||||
# - will try 9051 and 9151
|
||||
# - but first /var/run/tor/control as unix socket
|
||||
TORD_PORT = 'default'
|
||||
|
||||
# for broadcasting, socks proxy via Tord
|
||||
TOR_SOCKS = 'socks5h://127.0.0.1:9150'
|
||||
|
||||
# unix pipe for local Coldcard Simulator
|
||||
SIMULATOR_SOCK = '/tmp/ckcc-simulator.sock'
|
||||
|
||||
# delay between retries connecting to missing/awol Coldcard
|
||||
RECONNECT_DELAY = 10 # seconds between retries
|
||||
PING_RATE = 15 # seconds between pings (CC status checks)
|
||||
|
||||
def read(self, fobj):
|
||||
t = yaml.safe_load(fobj)
|
||||
if not t: return
|
||||
|
||||
for k,v in t.items():
|
||||
if k.upper() != k or k[0]=='_':
|
||||
logging.error(f"{k}: must be upper case")
|
||||
continue
|
||||
if not hasattr(self, k):
|
||||
logging.error(f"{k}: unknown setting")
|
||||
continue
|
||||
|
||||
setattr(self, k, v)
|
||||
|
||||
@classmethod
|
||||
def make_sample(cls):
|
||||
# produce an example config file
|
||||
d = {}
|
||||
x = cls()
|
||||
for k in dir(x):
|
||||
if k.upper() != k or k[0]=='_': continue
|
||||
d[k] = getattr(x, k)
|
||||
|
||||
return yaml.safe_dump(d)
|
||||
|
||||
@classmethod
|
||||
def startup(cls, config_file=None):
|
||||
# creates singleton
|
||||
global settings, BP
|
||||
|
||||
# only safe place to create singletons is here
|
||||
assert not settings and not BP
|
||||
|
||||
settings = Settings()
|
||||
if config_file:
|
||||
settings.read(config_file)
|
||||
|
||||
# load defaults into BP
|
||||
BP = BunkerPersistance()
|
||||
BP.reset()
|
||||
|
||||
# Store some state, encrypted.
|
||||
# - inial values are the settings, but lower case for some reason
|
||||
# - some are adjustable on "Bunker Setup" page
|
||||
class BunkerPersistance(WatchableMixin, dict, metaclass=Singleton):
|
||||
fields = ['tor_enabled', 'onion_pk', 'onion_addr', 'allow_reboots',
|
||||
'easy_captcha', 'master_pw']
|
||||
|
||||
def __init__(self):
|
||||
super(BunkerPersistance, self).__init__()
|
||||
self.key = None
|
||||
self.filename = None
|
||||
self.set_defaults()
|
||||
|
||||
def reset(self):
|
||||
self.open(settings.PLACEHOLDER_KEY)
|
||||
|
||||
def set_defaults(self):
|
||||
# defaults here
|
||||
for fn in self.fields:
|
||||
if fn not in self:
|
||||
self[fn] = getattr(settings, fn.upper(), None)
|
||||
|
||||
def set_secret(self, key):
|
||||
# setup for reading/writing using indicated key
|
||||
assert len(key) == 32
|
||||
|
||||
self.key = key
|
||||
self.box = nacl.secret.SecretBox(self.key)
|
||||
|
||||
# calc filename
|
||||
bn = 'bp-%s.dat' % sha256(sha256(b'salty' + self.key).digest()).hexdigest()[-16:].lower()
|
||||
self.filename = os.path.join(settings.DATA_FILES, bn)
|
||||
|
||||
@staticmethod
|
||||
def new_secret():
|
||||
# rotate key
|
||||
return os.urandom(32)
|
||||
|
||||
def open(self, key):
|
||||
# Given a private key (via storage locker) open a Nacl secret box
|
||||
# and use that for the data.
|
||||
self.set_secret(key)
|
||||
|
||||
try:
|
||||
with open(self.filename, 'rb') as fp:
|
||||
d = self.box.decrypt(fp.read())
|
||||
d = json_loads(d)
|
||||
except FileNotFoundError:
|
||||
logging.info("%s: not found (probably fine)" % self.filename)
|
||||
return True
|
||||
|
||||
self.update(d)
|
||||
|
||||
# copy a setting to status (XXX feels wrong)
|
||||
from status import STATUS
|
||||
STATUS.tor_enabled = self.get('tor_enabled', False)
|
||||
|
||||
logging.info(f"Got bunker settings from: {self.filename}")
|
||||
|
||||
def save(self):
|
||||
fn = self.filename
|
||||
tmp = fn + '.tmp'
|
||||
with open(tmp, 'wb') as fp:
|
||||
d = json_dumps(dict(self)).encode('utf8')
|
||||
d = self.box.encrypt(d)
|
||||
fp.write(d)
|
||||
|
||||
os.rename(tmp, fn)
|
||||
logging.info(f"Saved bunker settings to: {fn}")
|
||||
|
||||
self.notify_watchers()
|
||||
|
||||
def delete_file(self):
|
||||
# useful when changing keys; old file won't be readable
|
||||
try:
|
||||
os.unlink(self.filename)
|
||||
logging.info(f"Deleted bunker settings in: {self.filename}")
|
||||
except:
|
||||
pass
|
||||
|
||||
def is_default_secret(self):
|
||||
return self.key == settings.PLACEHOLDER_KEY
|
||||
|
||||
|
||||
# EOF
|
||||
148
policy.py
Normal file
148
policy.py
Normal file
@ -0,0 +1,148 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# policy.py -- code which knows various details about HSM policy as defined by Coldcard.
|
||||
#
|
||||
import re, logging
|
||||
from decimal import Decimal
|
||||
from objstruct import ObjectStruct
|
||||
from persist import BP, settings
|
||||
from base64 import b64encode, b64decode
|
||||
|
||||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
def invalid_pincode(code):
|
||||
return (not code) or (len(code) != 6) or (not code.isdigit())
|
||||
|
||||
def web_cleanup(p):
|
||||
# takes policy details from Vue/Semantic/web browser format into proper JSON-able dict
|
||||
# - final product should serialize into something the Coldcard will accept
|
||||
|
||||
def relist(n):
|
||||
# split on spaces or commas, assume values don't have either; trim whitespace
|
||||
if n is None: return n
|
||||
return [i for i in re.split(r' |,|\n', n) if i]
|
||||
|
||||
for fn in ['msg_paths', 'share_xpubs', 'share_addrs']:
|
||||
p[fn] = relist(p.get(fn, None))
|
||||
|
||||
p.period = int(p.period) if p.period else None
|
||||
|
||||
for rule in p.rules:
|
||||
for fn in ['whitelist', 'users']:
|
||||
rule[fn] = relist(rule[fn])
|
||||
|
||||
# change from BTC to satoshis (send as string here)
|
||||
for fn in ['per_period', 'max_amount']:
|
||||
if rule[fn] is not None:
|
||||
v = Decimal(rule[fn])
|
||||
rule[fn] = int(v * Decimal('1E8'))
|
||||
|
||||
# text to number
|
||||
if not rule.users:
|
||||
rule.pop('min_users')
|
||||
else:
|
||||
rule.min_users = len(rule.users) if rule.min_users == 'all' else int(rule.min_users)
|
||||
|
||||
if p.pop('ewaste_enable', False):
|
||||
p.boot_to_hsm = 'xyzzy' # impossible to enter
|
||||
assert invalid_pincode(p.boot_to_hsm)
|
||||
else:
|
||||
p.boot_to_hsm = p.get('boot_to_hsm') or None
|
||||
if p.boot_to_hsm:
|
||||
assert not invalid_pincode(p.boot_to_hsm), \
|
||||
"Boot to HSM code must be 6 numeric digits."
|
||||
|
||||
return p
|
||||
|
||||
def web_cookup(proposed):
|
||||
# converse of above: take Coldcard policy file, and rework it so
|
||||
# Vue can display on webpage
|
||||
|
||||
p = ObjectStruct.promote(proposed)
|
||||
|
||||
def unlist(n):
|
||||
if not n: return ''
|
||||
return ','.join(n)
|
||||
|
||||
for fn in ['msg_paths', 'share_xpubs', 'share_addrs']:
|
||||
p[fn] = unlist(p.get(fn))
|
||||
|
||||
for rule in p.rules:
|
||||
for fn in ['whitelist', 'users']:
|
||||
rule[fn] = unlist(rule.get(fn))
|
||||
|
||||
for fn in ['per_period', 'max_amount']:
|
||||
if rule[fn] is not None:
|
||||
rule[fn] = str(Decimal(rule[fn]) / Decimal('1E8'))
|
||||
|
||||
if 'min_users' not in rule:
|
||||
rule.min_users = 'all'
|
||||
else:
|
||||
rule.min_users = str(rule.min_users)
|
||||
|
||||
if ('boot_to_hsm' in p) and p.boot_to_hsm and invalid_pincode(p.boot_to_hsm):
|
||||
p.ewaste_enable = True
|
||||
else:
|
||||
p.ewaste_enable = False
|
||||
|
||||
return p
|
||||
|
||||
|
||||
def desensitize(policy):
|
||||
# remove the most sensitive stuff in the policy.
|
||||
bk = policy.copy()
|
||||
bk.pop('set_sl', None)
|
||||
bk.pop('allow_sl', None)
|
||||
bk.pop('boot_to_hsm', None)
|
||||
|
||||
return bk
|
||||
|
||||
def decode_sl(xk):
|
||||
# Unpack what we saved into the Storage Locker
|
||||
# - 32 bytes of nacl secret box for BunkerPersistance, plus "Bunk" prefix => 36 bytes
|
||||
# - base64 encoded => 48 bytes (and has no padding)
|
||||
assert len(xk) == 48, repr(xk)
|
||||
xk = b64decode(xk)
|
||||
assert xk[0:4] == b'Bunk'
|
||||
rv = xk[4:]
|
||||
assert len(rv) == 32
|
||||
|
||||
return rv
|
||||
|
||||
def update_sl(proposed):
|
||||
# We control the set_sl/allow_sl values solely for bunker purposes (sl=storage locker)
|
||||
|
||||
# try to use any value already provided (but unlikely)
|
||||
xk = proposed.get('set_sl', None) or None
|
||||
if xk:
|
||||
try:
|
||||
xk = decode_sl(xk)
|
||||
except:
|
||||
logging.error("Unable to decode existing storage locker; replacing", exc_info=1)
|
||||
xk = None
|
||||
|
||||
if not xk:
|
||||
if not BP.key or BP.is_default_secret():
|
||||
# pick a new key
|
||||
logging.info("Making new secret for holding Bunker settings")
|
||||
xk = BP.new_secret()
|
||||
else:
|
||||
# keep using same key
|
||||
xk = BP.key
|
||||
|
||||
assert len(xk) == 32
|
||||
proposed['set_sl'] = b64encode(b'Bunk' + xk).decode('ascii')
|
||||
|
||||
if xk != BP.key:
|
||||
# re-use existing key, and switch over to using new/eixsting key
|
||||
BP.delete_file()
|
||||
BP.set_secret(xk)
|
||||
BP.save()
|
||||
else:
|
||||
logging.info("Re-using old secret for holding Bunker settings")
|
||||
|
||||
# simple fixed value for how many times we can re-read the storage locker
|
||||
proposed['allow_sl'] = 13 if BP.get('allow_reboots', True) else 1
|
||||
|
||||
|
||||
# EOF
|
||||
14
requirements.txt
Normal file
14
requirements.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# See also setup.py install_requires
|
||||
#
|
||||
stem==1.8.0
|
||||
aiohttp==3.6.2
|
||||
aiohttp-jinja2==1.2.0
|
||||
ckcc-protocol>=1.0.0
|
||||
pynacl==1.3.0
|
||||
aiohttp_session
|
||||
click
|
||||
pendulum
|
||||
pyyaml
|
||||
Pillow
|
||||
pytest
|
||||
requests[socks]
|
||||
43
setup.py
Normal file
43
setup.py
Normal file
@ -0,0 +1,43 @@
|
||||
# (c) Copyright 2020 by Coinkite Inc. This file is part of Coldcard <coldcardwallet.com>
|
||||
# and is covered by GPLv3 license found in COPYING.
|
||||
#
|
||||
# based on <http://click.pocoo.org/5/setuptools/#setuptools-integration>
|
||||
#
|
||||
# To use this, install with:
|
||||
#
|
||||
# pip install --editable .
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
with open("README.md", "r") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setup(
|
||||
name='bunker',
|
||||
version='0.1',
|
||||
python_requires='>=3.7.0',
|
||||
url='https://github.com/Coldcard/ck-bunker',
|
||||
author='Coinkite Inc.',
|
||||
author_email='support@coinkite.com',
|
||||
description="Submit PSBT files automatically to your Coldcard for signing",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
install_requires=[ # see requirements.txt tho.
|
||||
'Click',
|
||||
'stem',
|
||||
'aiohttp',
|
||||
'aiohttp-jinja2',
|
||||
'ckcc-protocol>=1.0.0',
|
||||
],
|
||||
entry_points='''
|
||||
[console_scripts]
|
||||
ck-bunker=main:main
|
||||
''',
|
||||
classifiers=[
|
||||
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
|
||||
'Operating System :: POSIX :: Linux',
|
||||
'Operating System :: Microsoft :: Windows',
|
||||
'Operating System :: MacOS :: MacOS X',
|
||||
],
|
||||
)
|
||||
|
||||
7
static/ext/README.md
Normal file
7
static/ext/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
## Background
|
||||
|
||||
- Semantic UI parts taken from v2.4.1 at
|
||||
<https://github.com/Semantic-Org/Semantic-UI-CSS/releases>
|
||||
- one long path is remapped (rather than edit min.css files)
|
||||
/static/ext/themes/default/assets/fonts/ => /static/semantic-fonts
|
||||
1
static/ext/base64js.min.js
vendored
Normal file
1
static/ext/base64js.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(function(r){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=r()}else if(typeof define==="function"&&define.amd){define([],r)}else{var e;if(typeof window!=="undefined"){e=window}else if(typeof global!=="undefined"){e=global}else if(typeof self!=="undefined"){e=self}else{e=this}e.base64js=r()}})(function(){var r,e,n;return function(){function d(a,f,i){function u(n,r){if(!f[n]){if(!a[n]){var e="function"==typeof require&&require;if(!r&&e)return e(n,!0);if(v)return v(n,!0);var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t}var o=f[n]={exports:{}};a[n][0].call(o.exports,function(r){var e=a[n][1][r];return u(e||r)},o,o.exports,d,a,f,i)}return f[n].exports}for(var v="function"==typeof require&&require,r=0;r<i.length;r++)u(i[r]);return u}return d}()({"/":[function(r,e,n){"use strict";n.byteLength=f;n.toByteArray=i;n.fromByteArray=p;var u=[];var v=[];var d=typeof Uint8Array!=="undefined"?Uint8Array:Array;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var o=0,a=t.length;o<a;++o){u[o]=t[o];v[t.charCodeAt(o)]=o}v["-".charCodeAt(0)]=62;v["_".charCodeAt(0)]=63;function c(r){var e=r.length;if(e%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var n=r.indexOf("=");if(n===-1)n=e;var t=n===e?0:4-n%4;return[n,t]}function f(r){var e=c(r);var n=e[0];var t=e[1];return(n+t)*3/4-t}function h(r,e,n){return(e+n)*3/4-n}function i(r){var e;var n=c(r);var t=n[0];var o=n[1];var a=new d(h(r,t,o));var f=0;var i=o>0?t-4:t;var u;for(u=0;u<i;u+=4){e=v[r.charCodeAt(u)]<<18|v[r.charCodeAt(u+1)]<<12|v[r.charCodeAt(u+2)]<<6|v[r.charCodeAt(u+3)];a[f++]=e>>16&255;a[f++]=e>>8&255;a[f++]=e&255}if(o===2){e=v[r.charCodeAt(u)]<<2|v[r.charCodeAt(u+1)]>>4;a[f++]=e&255}if(o===1){e=v[r.charCodeAt(u)]<<10|v[r.charCodeAt(u+1)]<<4|v[r.charCodeAt(u+2)]>>2;a[f++]=e>>8&255;a[f++]=e&255}return a}function s(r){return u[r>>18&63]+u[r>>12&63]+u[r>>6&63]+u[r&63]}function l(r,e,n){var t;var o=[];for(var a=e;a<n;a+=3){t=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(r[a+2]&255);o.push(s(t))}return o.join("")}function p(r){var e;var n=r.length;var t=n%3;var o=[];var a=16383;for(var f=0,i=n-t;f<i;f+=a){o.push(l(r,f,f+a>i?i:f+a))}if(t===1){e=r[n-1];o.push(u[e>>2]+u[e<<4&63]+"==")}else if(t===2){e=(r[n-2]<<8)+r[n-1];o.push(u[e>>10]+u[e>>4&63]+u[e<<2&63]+"=")}return o.join("")}},{}]},{},[])("/")});
|
||||
4
static/ext/jquery-3.1.1.min.js
vendored
Normal file
4
static/ext/jquery-3.1.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
24
static/ext/lato-font.css
Normal file
24
static/ext/lato-font.css
Normal file
@ -0,0 +1,24 @@
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: local('Lato Italic'), local('Lato-Italic'), url(lato/S6u8w4BMUTPHjxsAXC-v.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(lato/S6u_w4BMUTPHjxsI5wq_Gwfo.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Lato Regular'), local('Lato-Regular'), url(lato/S6uyw4BMUTPHjx4wWw.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local('Lato Bold'), local('Lato-Bold'), url(lato/S6u9w4BMUTPHh6UVSwiPHA.ttf) format('truetype');
|
||||
}
|
||||
6
static/ext/lato/README.md
Normal file
6
static/ext/lato/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
Based on files referenced from the response to:
|
||||
|
||||
<https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin>
|
||||
|
||||
As requested by semantic.min.css
|
||||
BIN
static/ext/lato/S6u8w4BMUTPHjxsAXC-v.ttf
Normal file
BIN
static/ext/lato/S6u8w4BMUTPHjxsAXC-v.ttf
Normal file
Binary file not shown.
BIN
static/ext/lato/S6u9w4BMUTPHh6UVSwiPHA.ttf
Normal file
BIN
static/ext/lato/S6u9w4BMUTPHh6UVSwiPHA.ttf
Normal file
Binary file not shown.
BIN
static/ext/lato/S6u_w4BMUTPHjxsI5wq_Gwfo.ttf
Normal file
BIN
static/ext/lato/S6u_w4BMUTPHjxsI5wq_Gwfo.ttf
Normal file
Binary file not shown.
BIN
static/ext/lato/S6uyw4BMUTPHjx4wWw.ttf
Normal file
BIN
static/ext/lato/S6uyw4BMUTPHjx4wWw.ttf
Normal file
Binary file not shown.
4
static/ext/livestamp.min.js
vendored
Normal file
4
static/ext/livestamp.min.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
// Livestamp.js / v1.1.2 / (c) 2012 Matt Bradley / MIT License
|
||||
(function(d,g){var h=1E3,i=!1,e=d([]),j=function(b,a){var c=b.data("livestampdata");"number"==typeof a&&(a*=1E3);b.removeAttr("data-livestamp").removeData("livestamp");a=g(a);g.isMoment(a)&&!isNaN(+a)&&(c=d.extend({},{original:b.contents()},c),c.moment=g(a),b.data("livestampdata",c).empty(),e.push(b[0]))},k=function(){i||(f.update(),setTimeout(k,h))},f={update:function(){d("[data-livestamp]").each(function(){var a=d(this);j(a,a.data("livestamp"))});var b=[];e.each(function(){var a=d(this),c=a.data("livestampdata");
|
||||
if(void 0===c)b.push(this);else if(g.isMoment(c.moment)){var e=a.html(),c=c.moment.fromNow();if(e!=c){var f=d.Event("change.livestamp");a.trigger(f,[e,c]);f.isDefaultPrevented()||a.html(c)}}});e=e.not(b)},pause:function(){i=!0},resume:function(){i=!1;k()},interval:function(b){if(void 0===b)return h;h=b}},l={add:function(b,a){"number"==typeof a&&(a*=1E3);a=g(a);g.isMoment(a)&&!isNaN(+a)&&(b.each(function(){j(d(this),a)}),f.update());return b},destroy:function(b){e=e.not(b);b.each(function(){var a=
|
||||
d(this),c=a.data("livestampdata");if(void 0===c)return b;a.html(c.original?c.original:"").removeData("livestampdata")});return b},isLivestamp:function(b){return void 0!==b.data("livestampdata")}};d.livestamp=f;d(function(){f.resume()});d.fn.livestamp=function(b,a){l[b]||(a=b,b="add");return l[b](this,a)}})(jQuery,moment);
|
||||
17112
static/ext/lodash.js
Normal file
17112
static/ext/lodash.js
Normal file
File diff suppressed because it is too large
Load Diff
137
static/ext/lodash.min.js
vendored
Normal file
137
static/ext/lodash.min.js
vendored
Normal file
@ -0,0 +1,137 @@
|
||||
/**
|
||||
* @license
|
||||
* Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&false!==t(n[r],r,n););return n}function e(n,t){for(var r=null==n?0:n.length;r--&&false!==t(n[r],r,n););return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return false;
|
||||
return true}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!(null==n||!n.length)&&-1<v(n,t,0)}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return true;return false}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
|
||||
return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return true;return false}function p(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,false}),e}function _(n,t,r,e){var u=n.length;for(r+=e?1:-1;e?r--:++r<u;)if(t(n[r],r,n))return r;return-1}function v(n,t,r){if(t===t)n:{--r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=-1}else n=_(n,d,r);return n}function g(n,t,r,e){
|
||||
--r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return-1}function d(n){return n!==n}function y(n,t){var r=null==n?0:n.length;return r?m(n,t)/r:F}function b(n){return function(t){return null==t?T:t[n]}}function x(n){return function(t){return null==n?T:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function w(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function m(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==T&&(r=r===T?i:r+i)}return r;
|
||||
}function A(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function E(n,t){return c(t,function(t){return[t,n[t]]})}function k(n){return function(t){return n(t)}}function S(n,t){return c(t,function(t){return n[t]})}function O(n,t){return n.has(t)}function I(n,t){for(var r=-1,e=n.length;++r<e&&-1<v(t,n[r],0););return r}function R(n,t){for(var r=n.length;r--&&-1<v(t,n[r],0););return r}function z(n){return"\\"+Un[n]}function W(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n];
|
||||
}),r}function B(n,t){return function(r){return n(t(r))}}function L(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&"__lodash_placeholder__"!==o||(n[r]="__lodash_placeholder__",i[u++]=r)}return i}function U(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function C(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function D(n){if(Rn.test(n)){for(var t=On.lastIndex=0;On.test(n);)++t;n=t}else n=Qn(n);return n}function M(n){return Rn.test(n)?n.match(On)||[]:n.split("");
|
||||
}var T,$=1/0,F=NaN,N=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],P=/\b__p\+='';/g,Z=/\b(__p\+=)''\+/g,q=/(__e\(.*?\)|\b__t\))\+'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,En="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",kn=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+En+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={};
|
||||
Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object DataView]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false;
|
||||
var Ln={};Ln["[object Arguments]"]=Ln["[object Array]"]=Ln["[object ArrayBuffer]"]=Ln["[object DataView]"]=Ln["[object Boolean]"]=Ln["[object Date]"]=Ln["[object Float32Array]"]=Ln["[object Float64Array]"]=Ln["[object Int8Array]"]=Ln["[object Int16Array]"]=Ln["[object Int32Array]"]=Ln["[object Map]"]=Ln["[object Number]"]=Ln["[object Object]"]=Ln["[object RegExp]"]=Ln["[object Set]"]=Ln["[object String]"]=Ln["[object Symbol]"]=Ln["[object Uint8Array]"]=Ln["[object Uint8ClampedArray]"]=Ln["[object Uint16Array]"]=Ln["[object Uint32Array]"]=true,
|
||||
Ln["[object Error]"]=Ln["[object Function]"]=Ln["[object WeakMap]"]=false;var Un={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){
|
||||
try{var n=Nn&&Nn.f&&Nn.f("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I",
|
||||
"\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C",
|
||||
"\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i",
|
||||
"\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r",
|
||||
"\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij",
|
||||
"\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&","<":"<",">":">",'"':""","'":"'"}),tt=x({"&":"&","<":"<",">":">",""":'"',"'":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Un)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function En(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Un(n){this.__wrapped__=n,
|
||||
this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Fn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Nn(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Fn;++t<r;)this.add(n[t]);
|
||||
}function Zn(n){this.size=(this.__data__=new Tn(n)).size}function qn(n,t){var r,e=ff(n),u=!e&&of(n),i=!e&&!u&&af(n),o=!e&&!u&&!i&&_f(n),u=(e=e||u||i||o)?A(n.length,ni):[],f=u.length;for(r in n)!t&&!oi.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Se(r,f))||u.push(r);return u}function Qn(n){var t=n.length;return t?n[ir(0,t-1)]:T}function et(n,t){return De(Ur(n),pt(t,0,n.length))}function ut(n){return De(Ur(n))}function it(n,t,r){(r===T||lu(n[t],r))&&(r!==T||t in n)||st(n,t,r);
|
||||
}function ot(n,t,r){var e=n[t];oi.call(n,t)&&lu(e,r)&&(r!==T||t in n)||st(n,t,r)}function ft(n,t){for(var r=n.length;r--;)if(lu(n[r][0],t))return r;return-1}function ct(n,t,r,e){return uo(n,function(n,u,i){t(e,n,r(n),i)}),e}function at(n,t){return n&&Cr(t,Wu(t),n)}function lt(n,t){return n&&Cr(t,Bu(t),n)}function st(n,t,r){"__proto__"==t&&Ai?Ai(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function ht(n,t){for(var r=-1,e=t.length,u=Ku(e),i=null==n;++r<e;)u[r]=i?T:Ru(n,t[r]);return u;
|
||||
}function pt(n,t,r){return n===n&&(r!==T&&(n=n<=r?n:r),t!==T&&(n=n>=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Ur(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Ln[s])return i?n:{};f=Ee(n,s,c)}}if(o||(o=new Zn),
|
||||
i=o.get(n))return i;o.set(n,f),pf(n)?n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}):sf(n)&&n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))});var a=l?a?ve:_e:a?Bu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o))}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function");
|
||||
return bo(function(){n.apply(T,r)},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,k(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function bt(n,t){var r=true;return uo(n,function(n,e,u){return r=!!t(n,e,u)}),r}function xt(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===T?o===o&&!wu(o):r(o,f)))var f=o,c=i;
|
||||
}return c}function jt(n,t){var r=[];return uo(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function wt(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=ke),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?wt(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function mt(n,t){return n&&oo(n,t,Wu)}function At(n,t){return n&&fo(n,t,Wu)}function Et(n,t){return i(t,function(t){return _u(n[t])})}function kt(n,t){t=Sr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[Me(t[r++])];return r&&r==e?n:T}function St(n,t,r){return t=t(n),
|
||||
ff(n)?t:a(t,r(n))}function Ot(n){if(null==n)n=n===T?"[object Undefined]":"[object Null]";else if(mi&&mi in Qu(n)){var t=oi.call(n,mi),r=n[mi];try{n[mi]=T;var e=true}catch(n){}var u=ai.call(n);e&&(t?n[mi]=r:delete n[mi]),n=u}else n=ai.call(n);return n}function It(n,t){return n>t}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,k(t))),s=Ci(p.length,s),
|
||||
l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T}var p=n[0],_=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;if(v?!O(v,d):!e(h,d,r)){for(a=i;--a;){var y=l[a];if(y?!O(y,d):!e(n[a],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Bt(n,t,r){var e={};return mt(n,function(n,u,i){t(e,r(n),u,i)}),e}function Lt(t,r,e){return r=Sr(r,t),t=2>r.length?t:kt(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Ut(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){
|
||||
return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!yu(n)&&!yu(t))t=n!==n&&t!==t;else n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{
|
||||
if(!(1&r)&&(i=a&&oi.call(n,"__wrapped__"),f=o&&oi.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Zn),t=Mt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Zn),i=1&r,f=_e(n),o=f.length,c=_e(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:oi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++a<o;){var l=f[a],h=n[l],p=t[l];if(e)var _=i?e(p,h,l,t,n,u):e(h,p,l,n,t,u);if(_===T?h!==p&&!Mt(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l);
|
||||
}c&&!s&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u.delete(n),u.delete(t),t=c}}else t=false;else t=false}}return t}function Tt(n){return yu(n)&&"[object Map]"==vo(n)}function $t(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=Qu(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){var f=r[u],c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===T&&!(c in n))return false;
|
||||
}else{if(f=new Zn,e)var s=e(a,l,c,n,t,f);if(s===T?!Mt(l,a,3,e,f):!s)return false}}return true}function Ft(n){return!(!du(n)||ci&&ci in n)&&(_u(n)?hi:dn).test(Te(n))}function Nt(n){return yu(n)&&"[object RegExp]"==Ot(n)}function Pt(n){return yu(n)&&"[object Set]"==vo(n)}function Zt(n){return yu(n)&&gu(n.length)&&!!Bn[Ot(n)]}function qt(n){return typeof n=="function"?n:null==n?$u:typeof n=="object"?ff(n)?Jt(n[0],n[1]):Ht(n):Zu(n)}function Vt(n){if(!ze(n))return Li(n);var t,r=[];for(t in Qu(n))oi.call(n,t)&&"constructor"!=t&&r.push(t);
|
||||
return r}function Kt(n,t){return n<t}function Gt(n,t){var r=-1,e=su(n)?Ku(n.length):[];return uo(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Ht(n){var t=xe(n);return 1==t.length&&t[0][2]?We(t[0][0],t[0][1]):function(r){return r===n||$t(r,n,t)}}function Jt(n,t){return Ie(n)&&t===t&&!du(t)?We(Me(n),t):function(r){var e=Ru(r,n);return e===T&&e===t?zu(r,n):Mt(t,e,3)}}function Yt(n,t,r,e,u){n!==t&&oo(t,function(i,o){if(u||(u=new Zn),du(i)){var f=u,c=Le(n,o),a=Le(t,o),l=f.get(a);if(l)it(n,o,l);else{
|
||||
var l=e?e(c,a,o+"",n,t,f):T,s=l===T;if(s){var h=ff(a),p=!h&&af(a),_=!h&&!p&&_f(a),l=a;h||p||_?ff(c)?l=c:hu(c)?l=Ur(c):p?(s=false,l=Ir(a,true)):_?(s=false,l=zr(a,true)):l=[]:xu(a)||of(a)?(l=c,of(c)?l=Ou(c):du(c)&&!_u(c)||(l=Ae(a))):s=false}s&&(f.set(a,l),Yt(l,a,r,e,f),f.delete(a)),it(n,o,l)}}else f=e?e(Le(n,o),i,o+"",n,t,u):T,f===T&&(f=i),it(n,o,f)},Bu)}function Qt(n,t){var r=n.length;if(r)return t+=0>t?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],k(ye())),n=Gt(n,function(n){return{
|
||||
a:c(t,function(t){return t(n)}),b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Wr(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=kt(n,o);r(f,o)&&lr(i,Sr(o,n),f)}return i}function rr(n){return function(t){return kt(t,n)}}function er(n,t,r,e){var u=e?g:v,i=-1,o=t.length,f=n;for(n===t&&(t=Ur(t)),
|
||||
r&&(f=c(n,k(r)));++i<o;)for(var a=0,l=t[i],l=r?r(l):l;-1<(a=u(f,l,a,e));)f!==n&&xi.call(f,a,1),xi.call(n,a,1);return n}function ur(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;Se(u)?xi.call(n,u,1):xr(n,u)}}}function ir(n,t){return n+Ii(Ti()*(t-n+1))}function or(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=Ii(t/2))&&(n+=n);while(t);return r}function fr(n,t){return xo(Be(n,t,$u),n+"")}function cr(n){return Qn(Uu(n))}function ar(n,t){var r=Uu(n);
|
||||
return De(r,pt(t,0,r.length))}function lr(n,t,r,e){if(!du(n))return n;t=Sr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=Me(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):T;a===T&&(a=du(l)?l:Se(t[u+1])?[]:{})}ot(f,c,a),f=f[c]}return n}function sr(n){return De(Uu(n))}function hr(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e<u;)r[e]=n[e+t];return r}function pr(n,t){var r;return uo(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}
|
||||
function _r(n,t,r){var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return vr(n,t,$u,r)}function vr(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=wu(t),a=t===T;u<i;){var l=Ii((u+i)/2),s=r(n[l]),h=s!==T,p=null===s,_=s===s,v=wu(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=t:s<t)?u=l+1:i=l}return Ci(i,4294967294)}function gr(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
|
||||
var o=n[r],f=t?t(o):o;if(!r||!lu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function dr(n){return typeof n=="number"?n:wu(n)?F:+n}function yr(n){if(typeof n=="string")return n;if(ff(n))return c(n,yr)+"";if(wu(n))return ro?ro.call(n):"";var t=n+"";return"0"==t&&1/n==-$?"-0":t}function br(n,t,r){var e=-1,u=o,i=n.length,c=true,a=[],l=a;if(r)c=false,u=f;else if(200<=i){if(u=t?null:so(n))return U(u);c=false,u=O,l=new Nn}else l=t?[]:a;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(c&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;
|
||||
t&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function xr(n,t){return t=Sr(t,n),n=2>t.length?n:kt(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?hr(n,e?0:i,e?i+1:u):hr(n,e?i+1:0,e?u:i)}function wr(n,t){var r=n;return r instanceof Un&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mr(n,t,r){var e=n.length;if(2>e)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=yt(i[u]||o,n[f],t,r));
|
||||
return br(wt(i,1),t,r)}function Ar(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:T);return o}function Er(n){return hu(n)?n:[]}function kr(n){return typeof n=="function"?n:$u}function Sr(n,t){return ff(n)?n:Ie(n,t)?[n]:jo(Iu(n))}function Or(n,t,r){var e=n.length;return r=r===T?e:r,!t&&r>=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)),
|
||||
t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length)}function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Br(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Ui(i-o,0),l=Ku(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];
|
||||
return l}function Lr(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Ui(i-f,0),s=Ku(l+a);for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=n[u++]);return s}function Ur(n,t){var r=-1,e=n.length;for(t||(t=Ku(e));++r<e;)t[r]=n[r];return t}function Cr(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):T;c===T&&(c=n[f]),u?st(r,f,c):ot(r,f,c)}return r}function Dr(n,t){return Cr(n,po(n),t)}function Mr(n,t){return Cr(n,_o(n),t);
|
||||
}function Tr(n,r){return function(e,u){var i=ff(e)?t:ct,o=r?r():{};return i(e,n,ye(u,2),o)}}function $r(n){return fr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:T,o=2<u?r[2]:T,i=3<n.length&&typeof i=="function"?(u--,i):T;for(o&&Oe(r[0],r[1],o)&&(i=3>u?T:i,u=1),t=Qu(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function Fr(n,t){return function(r,e){if(null==r)return r;if(!su(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=Qu(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function Nr(n){return function(t,r,e){
|
||||
var u=-1,i=Qu(t);e=e(t);for(var o=e.length;o--;){var f=e[n?o:++u];if(false===r(i[f],f,i))break}return t}}function Pr(n,t,r){function e(){return(this&&this!==$n&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Vr(n);return e}function Zr(n){return function(t){t=Iu(t);var r=Rn.test(t)?M(t):T,e=r?r[0]:t.charAt(0);return t=r?Or(r,1).join(""):t.slice(1),e[n]()+t}}function qr(n){return function(t){return l(Mu(Du(t).replace(kn,"")),n,"")}}function Vr(n){return function(){var t=arguments;switch(t.length){
|
||||
case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=eo(n.prototype),t=n.apply(r,t);return du(t)?t:r}}function Kr(t,r,e){function u(){for(var o=arguments.length,f=Ku(o),c=o,a=de(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:L(f,a),
|
||||
o-=c.length,o<e?ue(t,r,Jr,u.placeholder,T,f,c,T,T,e-o):n(this&&this!==$n&&this instanceof u?i:t,this,f)}var i=Vr(t);return u}function Gr(n){return function(t,r,e){var u=Qu(t);if(!su(t)){var i=ye(r,3);t=Wu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:T}}function Hr(n){return pe(function(t){var r=t.length,e=r,u=On.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ti("Expected a function");if(u&&!o&&"wrapper"==ge(i))var o=new On([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=ge(i),f="wrapper"==u?ho(i):T,o=f&&Re(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[ge(f[0])].apply(o,f[3]):1==i.length&&Re(i)?o[u]():o.thru(i);
|
||||
return function(){var n=arguments,e=n[0];if(o&&1==n.length&&ff(e))return o.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function Jr(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Ku(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=de(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Br(y,e,u,_)),i&&(y=Lr(y,i,o,_)),d-=x,_&&d<a)return j=L(y,j),ue(n,t,Jr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[n]:n,d=y.length,f){x=y.length;for(var w=Ci(f.length,x),m=Ur(y);w--;){
|
||||
var A=f[w];y[w]=Se(A,x)?m[A]:T}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==$n&&this instanceof l&&(b=g||Vr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?T:Vr(n);return l}function Yr(n,t){return function(r,e){return Bt(r,n,t(e))}}function Qr(n,t){return function(r,e){var u;if(r===T&&e===T)return t;if(r!==T&&(u=r),e!==T){if(u===T)return e;typeof r=="string"||typeof e=="string"?(r=yr(r),e=yr(e)):(r=dr(r),e=dr(e)),u=n(r,e)}return u}}function Xr(t){return pe(function(r){
|
||||
return r=c(r,k(ye())),fr(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ne(n,t){t=t===T?" ":yr(t);var r=t.length;return 2>r?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];return n(h,o?e:this,s)}var o=1&r,f=Vr(t);return i}function re(n){return function(t,r,e){
|
||||
e&&typeof e!="number"&&Oe(t,r,e)&&(r=e=T),t=Au(t),r===T?(r=t,t=0):r=Au(r),e=e===T?t<r?1:-1:Au(e);var u=-1;r=Ui(Oi((r-t)/(e||1)),0);for(var i=Ku(r);r--;)i[n?r:++u]=t,t+=e;return i}}function ee(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Su(t),r=Su(r)),n(t,r)}}function ue(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:T;o=l?T:o;var h=l?i:T;return i=l?T:i,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),u=[n,t,u,h,s,i,o,f,c,a],r=r.apply(T,u),Re(n)&&yo(r,u),r.placeholder=e,Ue(r,n,t)}function ie(n){
|
||||
var t=Yu[n];return function(n,r){if(n=Su(n),(r=null==r?0:Ci(Eu(r),292))&&Wi(n)){var e=(Iu(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(Iu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function oe(n){return function(t){var r=vo(t);return"[object Map]"==r?W(t):"[object Set]"==r?C(t):E(t,n(t))}}function fe(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ti("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=T),o=o===T?o:Ui(Eu(o),0),f=f===T?f:Eu(f),a-=u?u.length:0,
|
||||
64&t){var l=e,s=u;e=u=T}var h=c?T:ho(n);return i=[n,t,r,e,u,l,s,i,o,f],h&&(r=i[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&i[7].length<=h[8]||384==n&&h[7].length<=h[8]&&8==r,131>t||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Br(e,r,h[4]):r,i[4]=e?L(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Lr(e,r,h[6]):r,i[6]=e?L(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],
|
||||
t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Ui(i[9]-a,0),!f&&24&t&&(t&=-25),Ue((h?co:yo)(t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;
|
||||
var c=-1,a=true,l=2&r?new Nn:T;for(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],p=t[c];if(e)var _=o?e(p,s,c,t,n,i):e(s,p,c,n,t,i);if(_!==T){if(_)continue;a=false;break}if(l){if(!h(t,function(n,t){if(!O(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==p&&!u(s,p,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function he(n,t,r,e,u,i,o){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":
|
||||
if(n.byteLength!=t.byteLength||!i(new vi(n),new vi(t)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return lu(+n,+t);case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=W;case"[object Set]":if(f||(f=U),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=se(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(to)return to.call(n)==to.call(t)}
|
||||
return false}function pe(n){return xo(Be(n,T,Ze),n+"")}function _e(n){return St(n,Wu,po)}function ve(n){return St(n,Bu,_o)}function ge(n){for(var t=n.name+"",r=Gi[t],e=oi.call(Gi,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function de(n){return(oi.call(An,"placeholder")?An:n).placeholder}function ye(){var n=An.iteratee||Fu,n=n===Fu?qt:n;return arguments.length?n(arguments[0],arguments[1]):n}function be(n,t){var r=n.__data__,e=typeof t;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map;
|
||||
}function xe(n){for(var t=Wu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!du(u)]}return t}function je(n,t){var r=null==n?T:n[t];return Ft(r)?r:T}function we(n,t,r){t=Sr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=Me(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&gu(u)&&Se(o,u)&&(ff(n)||of(n)))}function me(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&oi.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ae(n){
|
||||
return typeof n.constructor!="function"||ze(n)?{}:eo(di(n))}function Ee(n,t,r){var e=n.constructor;switch(t){case"[object ArrayBuffer]":return Rr(n);case"[object Boolean]":case"[object Date]":return new e(+n);case"[object DataView]":return t=r?Rr(n.buffer):n.buffer,new n.constructor(t,n.byteOffset,n.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 zr(n,r);case"[object Map]":return new e;case"[object Number]":case"[object String]":return new e(n);case"[object RegExp]":return t=new n.constructor(n.source,_n.exec(n)),t.lastIndex=n.lastIndex,t;case"[object Set]":return new e;case"[object Symbol]":return to?Qu(to.call(n)):{}}}function ke(n){return ff(n)||of(n)||!!(ji&&n&&n[ji])}function Se(n,t){var r=typeof n;return t=null==t?9007199254740991:t,!!t&&("number"==r||"symbol"!=r&&bn.test(n))&&-1<n&&0==n%1&&n<t;
|
||||
}function Oe(n,t,r){if(!du(r))return false;var e=typeof t;return!!("number"==e?su(r)&&Se(t,r.length):"string"==e&&t in r)&&lu(r[t],n)}function Ie(n,t){if(ff(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!wu(n))||(nn.test(n)||!X.test(n)||null!=t&&n in Qu(t))}function Re(n){var t=ge(n),r=An[t];return typeof r=="function"&&t in Un.prototype&&(n===r||(t=ho(r),!!t&&n===t[0]))}function ze(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||ei)}function We(n,t){
|
||||
return function(r){return null!=r&&(r[n]===t&&(t!==T||n in Qu(r)))}}function Be(t,r,e){return r=Ui(r===T?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Ui(u.length-r,0),f=Ku(o);++i<o;)f[i]=u[r+i];for(i=-1,o=Ku(r+1);++i<r;)o[i]=u[i];return o[r]=e(f),n(t,this,o)}}function Le(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Ue(n,t,r){var e=t+"";t=xo;var u,i=$e;return u=(u=e.match(an))?u[1].split(ln):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],
|
||||
r=r.join(2<i?", ":" "),e=e.replace(cn,"{\n/* [wrapped with "+r+"] */\n")),t(n,e)}function Ce(n){var t=0,r=0;return function(){var e=Di(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(T,arguments)}}function De(n,t){var r=-1,e=n.length,u=e-1;for(t=t===T?e:t;++r<t;){var e=ir(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function Me(n){if(typeof n=="string"||wu(n))return n;var t=n+"";return"0"==t&&1/n==-$?"-0":t}function Te(n){if(null!=n){try{return ii.call(n)}catch(n){}
|
||||
return n+""}return""}function $e(n,t){return r(N,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function Fe(n){if(n instanceof Un)return n.clone();var t=new On(n.__wrapped__,n.__chain__);return t.__actions__=Ur(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ne(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Eu(r),0>r&&(r=Ui(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==T&&(u=Eu(r),u=0>r?Ui(e+u,0):Ci(u,e-1)),
|
||||
_(n,ye(t,3),u,true)}function Ze(n){return(null==n?0:n.length)?wt(n,1):[]}function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(hu(n))return t=Ui(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return[];var e=He(t);return null==r?e:c(e,function(t){
|
||||
return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n}function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return(ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return(ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return(ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=Eu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T),
|
||||
r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder,n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r)}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments,
|
||||
a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return lo(h),h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ui(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;
|
||||
return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t;
|
||||
}function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false;var t=Ot(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return!!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==Eu(n)}function gu(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n;
|
||||
}function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object"}function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return!(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n);
|
||||
}function mu(n){if(!n)return[];if(su(n))return ju(n)?M(n):Ur(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?U:Uu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Eu(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function ku(n){return n?pt(Eu(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,
|
||||
n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n}function Ou(n){return Cr(n,Bu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:kt(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Bu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e}else{if(t=[],
|
||||
null!=n)for(r in Qu(n))t.push(r);n=t}return n}function Lu(n,t){if(null==n)return{};var r=c(ve(n),function(n){return[n]});return t=ye(t),tr(n,r,function(n,r){return t(n,r[0])})}function Uu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return(n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n;
|
||||
}function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=Et(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=Et(t,Wu(t)));var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Ur(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pu(){}
|
||||
function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return[]}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.g:T,di=B(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){
|
||||
try{var n=je(Qu,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ei=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,ki=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Bi=ri.join,Li=B(Qu.keys,Qu),Ui=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){
|
||||
function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=En.prototype,An.prototype.constructor=An,On.prototype=eo(En.prototype),On.prototype.constructor=On,Un.prototype=eo(En.prototype),Un.prototype.constructor=Un,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
|
||||
this.size-=n?1:0,n},Mn.prototype.get=function(n){var t=this.__data__;return Vi?(n=t[n],"__lodash_hash_undefined__"===n?T:n):oi.call(t,n)?t[n]:T},Mn.prototype.has=function(n){var t=this.__data__;return Vi?t[n]!==T:oi.call(t,n)},Mn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Vi&&t===T?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(n){var t=this.__data__;return n=ft(t,n),!(0>n)&&(n==t.length-1?t.pop():xi.call(t,n,1),
|
||||
--this.size,true)},Tn.prototype.get=function(n){var t=this.__data__;return n=ft(t,n),0>n?T:t[n][1]},Tn.prototype.has=function(n){return-1<ft(this.__data__,n)},Tn.prototype.set=function(n,t){var r=this.__data__,e=ft(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ni||Tn),string:new Mn}},Fn.prototype.delete=function(n){return n=be(this,n).delete(n),this.size-=n?1:0,n},Fn.prototype.get=function(n){return be(this,n).get(n);
|
||||
},Fn.prototype.has=function(n){return be(this,n).has(n)},Fn.prototype.set=function(n,t){var r=be(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Nn.prototype.add=Nn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0},Zn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Zn.prototype.get=function(n){
|
||||
return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e)}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=Ei||function(n){
|
||||
return $n.clearTimeout(n)},so=Zi&&1/U(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){
|
||||
var t=Ot(n);if(n=(n="[object Object]"==t?n.constructor:T)?Te(n):"")switch(n){case Hi:return"[object DataView]";case Ji:return"[object Map]";case Yi:return"[object Promise]";case Qi:return"[object Set]";case Xi:return"[object WeakMap]"}return t});var go=ui?_u:Vu,yo=Ce(co),bo=Si||function(n,t){return $n.setTimeout(n,t)},xo=Ce(ao),jo=function(n){n=cu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(tn,function(n,r,e,u){
|
||||
t.push(e?u.replace(hn,"$1"):r||n)}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),Eo=fr(function(n){var t=c(n,Er);return t.length&&t[0]===n[0]?Wt(t):[]}),ko=fr(function(n){var t=Ve(n),r=c(n,Er);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,Er);return(t=typeof t=="function"?t:T)&&r.pop(),
|
||||
r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Bo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Lo=fr(function(n){return mr(i(n,hu))}),Uo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),
|
||||
mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1<t?n[t-1]:T,t=typeof t=="function"?(n.pop(),t):T;return Je(n,t)}),To=pe(function(n){function t(t){return ht(t,n)}var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Un&&Se(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:Qe,args:[t],thisArg:T}),new On(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(T),
|
||||
n})):this.thru(t)}),$o=Tr(function(n,t,r){oi.call(n,r)?++n[r]:st(n,r,1)}),Fo=Gr(Ne),No=Gr(Pe),Po=Tr(function(n,t,r){oi.call(n,r)?n[r].push(t):st(n,r,[t])}),Zo=fr(function(t,r,e){var u=-1,i=typeof r=="function",o=su(t)?Ku(t.length):[];return uo(t,function(t){o[++u]=i?n(r,t,e):Lt(t,r,e)}),o}),qo=Tr(function(n,t,r){st(n,r,t)}),Vo=Tr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ko=fr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&Oe(n,t[0],t[1])?t=[]:2<r&&Oe(t[0],t[1],t[2])&&(t=[t[0]]),
|
||||
Xt(n,wt(t,1),[])}),Go=ki||function(){return $n.Date.now()},Ho=fr(function(n,t,r){var e=1;if(r.length)var u=L(r,de(Ho)),e=32|e;return fe(n,e,t,r,u)}),Jo=fr(function(n,t,r){var e=3;if(r.length)var u=L(r,de(Jo)),e=32|e;return fe(t,e,n,r,u)}),Yo=fr(function(n,t){return dt(n,1,t)}),Qo=fr(function(n,t,r){return dt(n,Su(t)||0,r)});cu.Cache=Fn;var Xo=fr(function(t,r){r=1==r.length&&ff(r[0])?c(r[0],k(ye())):c(wt(r,1),k(ye()));var e=r.length;return fr(function(u){for(var i=-1,o=Ci(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);
|
||||
return n(t,this,u)})}),nf=fr(function(n,t){return fe(n,32,T,t,L(t,de(nf)))}),tf=fr(function(n,t){return fe(n,64,T,t,L(t,de(tf)))}),rf=pe(function(n,t){return fe(n,256,T,T,T,t)}),ef=ee(It),uf=ee(function(n,t){return n>=t}),of=Ut(function(){return arguments}())?Ut:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?k(Vn):Ct,af=zi||Vu,lf=Kn?k(Kn):Dt,sf=Gn?k(Gn):Tt,hf=Hn?k(Hn):Nt,pf=Jn?k(Jn):Pt,_f=Yn?k(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){
|
||||
if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r])}),yf=$r(function(n,t){Cr(t,Bu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Bu(t),n,e)}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e)}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2<e?t[2]:T;for(u&&Oe(t[0],t[1],u)&&(e=1);++r<e;)for(var u=t[r],i=Bu(u),o=-1,f=i.length;++o<f;){var c=i[o],a=n[c];(a===T||lu(a,ei[c])&&!oi.call(n,c))&&(n[c]=u[c])}return n}),mf=fr(function(t){return t.push(T,ae),n(Of,T,t)}),Af=Yr(function(n,t,r){
|
||||
null!=t&&typeof t.toString!="function"&&(t=ai.call(t)),n[t]=r},Tu($u)),Ef=Yr(function(n,t,r){null!=t&&typeof t.toString!="function"&&(t=ai.call(t)),oi.call(n,t)?n[t].push(r):n[t]=[r]},ye),kf=fr(Lt),Sf=$r(function(n,t,r){Yt(n,t,r)}),Of=$r(function(n,t,r,e){Yt(n,t,r,e)}),If=pe(function(n,t){var r={};if(null==n)return r;var e=false;t=c(t,function(t){return t=Sr(t,n),e||(e=1<t.length),t}),Cr(n,ve(n),r),e&&(r=_t(r,7,le));for(var u=t.length;u--;)xr(r,t[u]);return r}),Rf=pe(function(n,t){return null==n?{}:nr(n,t);
|
||||
}),zf=oe(Wu),Wf=oe(Bu),Bf=qr(function(n,t,r){return t=t.toLowerCase(),n+(r?Cu(t):t)}),Lf=qr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Uf=qr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Cf=Zr("toLowerCase"),Df=qr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Mf=qr(function(n,t,r){return n+(r?" ":"")+$f(t)}),Tf=qr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),$f=Zr("toUpperCase"),Ff=fr(function(t,r){try{return n(t,T,r)}catch(n){return pu(n)?n:new Hu(n)}}),Nf=pe(function(n,t){
|
||||
return r(t,function(t){t=Me(t),st(n,t,Ho(n[t],n))}),n}),Pf=Hr(),Zf=Hr(true),qf=fr(function(n,t){return function(r){return Lt(r,n,t)}}),Vf=fr(function(n,t){return function(r){return Lt(n,r,t)}}),Kf=Xr(c),Gf=Xr(u),Hf=Xr(h),Jf=re(),Yf=re(true),Qf=Qr(function(n,t){return n+t},0),Xf=ie("ceil"),nc=Qr(function(n,t){return n/t},1),tc=ie("floor"),rc=Qr(function(n,t){return n*t},1),ec=ie("round"),uc=Qr(function(n,t){return n-t},0);return An.after=function(n,t){if(typeof t!="function")throw new ti("Expected a function");
|
||||
return n=Eu(n),function(){if(1>--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Ui(Eu(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Ku(Oi(r/t));e<r;)i[u++]=hr(n,e,e+=t);return i},An.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){
|
||||
var i=n[t];i&&(u[e++]=i)}return u},An.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Ku(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return a(ff(r)?Ur(r):[r],wt(t,1))},An.cond=function(t){var r=null==t?0:t.length,e=ye();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new ti("Expected a function");return[e(n[0]),n[1]]}):[],fr(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})},An.conforms=function(n){return vt(_t(n,1))},An.constant=Tu,
|
||||
An.countBy=$o,An.create=function(n,t){var r=eo(n);return null==t?r:at(r,t)},An.curry=iu,An.curryRight=ou,An.debounce=fu,An.defaults=wf,An.defaultsDeep=mf,An.defer=Yo,An.delay=Qo,An.difference=wo,An.differenceBy=mo,An.differenceWith=Ao,An.drop=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),hr(n,0>t?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[];
|
||||
},An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=Eu(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Eu(e),0>e&&(e+=u),e=r>e?0:ku(e);r<e;)n[r++]=t;return n},An.filter=function(n,t){return(ff(n)?i:jt)(n,ye(t,3))},An.flatMap=function(n,t){return wt(ru(n,t),1)},An.flatMapDeep=function(n,t){return wt(ru(n,t),$)},An.flatMapDepth=function(n,t,r){return r=r===T?1:Eu(r),
|
||||
wt(ru(n,t),r)},An.flatten=Ze,An.flattenDeep=function(n){return(null==n?0:n.length)?wt(n,$):[]},An.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===T?1:Eu(t),wt(n,t)):[]},An.flip=function(n){return fe(n,512)},An.flow=Pf,An.flowRight=Zf,An.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e},An.functions=function(n){return null==n?[]:Et(n,Wu(n))},An.functionsIn=function(n){return null==n?[]:Et(n,Bu(n))},An.groupBy=Po,An.initial=function(n){
|
||||
return(null==n?0:n.length)?hr(n,0,-1):[]},An.intersection=Eo,An.intersectionBy=ko,An.intersectionWith=So,An.invert=Af,An.invertBy=Ef,An.invokeMap=Zo,An.iteratee=Fu,An.keyBy=qo,An.keys=Wu,An.keysIn=Bu,An.map=ru,An.mapKeys=function(n,t){var r={};return t=ye(t,3),mt(n,function(n,e,u){st(r,t(n,e,u),n)}),r},An.mapValues=function(n,t){var r={};return t=ye(t,3),mt(n,function(n,e,u){st(r,e,t(n,e,u))}),r},An.matches=function(n){return Ht(_t(n,1))},An.matchesProperty=function(n,t){return Jt(n,_t(t,1))},An.memoize=cu,
|
||||
An.merge=Sf,An.mergeWith=Of,An.method=qf,An.methodOf=Vf,An.mixin=Nu,An.negate=au,An.nthArg=function(n){return n=Eu(n),fr(function(t){return Qt(t,n)})},An.omit=If,An.omitBy=function(n,t){return Lu(n,au(ye(t)))},An.once=function(n){return uu(2,n)},An.orderBy=function(n,t,r,e){return null==n?[]:(ff(t)||(t=null==t?[]:[t]),r=e?T:r,ff(r)||(r=null==r?[]:[r]),Xt(n,t,r))},An.over=Kf,An.overArgs=Xo,An.overEvery=Gf,An.overSome=Hf,An.partial=nf,An.partialRight=tf,An.partition=Vo,An.pick=Rf,An.pickBy=Lu,An.property=Zu,
|
||||
An.propertyOf=function(n){return function(t){return null==n?T:kt(n,t)}},An.pull=Oo,An.pullAll=Ke,An.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?er(n,t,ye(r,2)):n},An.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?er(n,t,T,r):n},An.pullAt=Io,An.range=Jf,An.rangeRight=Yf,An.rearg=rf,An.reject=function(n,t){return(ff(n)?i:jt)(n,au(ye(t,3)))},An.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=ye(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),
|
||||
u.push(e))}return ur(n,u),r},An.rest=function(n,t){if(typeof n!="function")throw new ti("Expected a function");return t=t===T?t:Eu(t),fr(n,t)},An.reverse=Ge,An.sampleSize=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:Eu(t),(ff(n)?et:ar)(n,t)},An.set=function(n,t,r){return null==n?n:lr(n,t,r)},An.setWith=function(n,t,r,e){return e=typeof e=="function"?e:T,null==n?n:lr(n,t,r,e)},An.shuffle=function(n){return(ff(n)?ut:sr)(n)},An.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&Oe(n,t,r)?(t=0,
|
||||
r=e):(t=null==t?0:Eu(t),r=r===T?e:Eu(r)),hr(n,t,r)):[]},An.sortBy=Ko,An.sortedUniq=function(n){return n&&n.length?gr(n):[]},An.sortedUniqBy=function(n,t){return n&&n.length?gr(n,ye(t,2)):[]},An.split=function(n,t,r){return r&&typeof r!="number"&&Oe(n,t,r)&&(t=r=T),r=r===T?4294967295:r>>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Ui(Eu(r),0),
|
||||
fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:Eu(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n),
|
||||
n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Ur(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{};
|
||||
}return(i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null==n?n:lr(n,t,kr(r)(kt(n,t)),void 0)},An.updateWith=function(n,t,r,e){
|
||||
return e=typeof e=="function"?e:T,null!=n&&(n=lr(n,t,kr(r)(kt(n,t)),e)),n},An.values=Uu,An.valuesIn=function(n){return null==n?[]:S(n,Bu(n))},An.without=Bo,An.words=Mu,An.wrap=function(n,t){return nf(kr(t),n)},An.xor=Lo,An.xorBy=Uo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Bf,An.capitalize=Cu,
|
||||
An.ceil=Xf,An.clamp=function(n,t,r){return r===T&&(r=t,t=T),r!==T&&(r=Su(r),r=r===r?r:0),t!==T&&(t=Su(t),t=t===t?t:0),pt(Su(n),t,r)},An.clone=function(n){return _t(n,4)},An.cloneDeep=function(n){return _t(n,5)},An.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,5,t)},An.cloneWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,4,t)},An.conformsTo=function(n,t){return null==t||gt(n,t,Wu(t))},An.deburr=Du,An.defaultTo=function(n,t){return null==n||n!==n?t:n},An.divide=nc,An.endsWith=function(n,t,r){
|
||||
n=Iu(n),t=yr(t);var e=n.length,e=r=r===T?e:pt(Eu(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},An.eq=lu,An.escape=function(n){return(n=Iu(n))&&H.test(n)?n.replace(K,nt):n},An.escapeRegExp=function(n){return(n=Iu(n))&&en.test(n)?n.replace(rn,"\\$&"):n},An.every=function(n,t,r){var e=ff(n)?u:bt;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.find=Fo,An.findIndex=Ne,An.findKey=function(n,t){return p(n,ye(t,3),mt)},An.findLast=No,An.findLastIndex=Pe,An.findLastKey=function(n,t){return p(n,ye(t,3),At);
|
||||
},An.floor=tc,An.forEach=nu,An.forEachRight=tu,An.forIn=function(n,t){return null==n?n:oo(n,ye(t,3),Bu)},An.forInRight=function(n,t){return null==n?n:fo(n,ye(t,3),Bu)},An.forOwn=function(n,t){return n&&mt(n,ye(t,3))},An.forOwnRight=function(n,t){return n&&At(n,ye(t,3))},An.get=Ru,An.gt=ef,An.gte=uf,An.has=function(n,t){return null!=n&&we(n,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(n,t,r,e){return n=su(n)?n:Uu(n),r=r&&!e?Eu(r):0,e=n.length,0>r&&(r=Ui(e+r,0)),ju(n)?r<=e&&-1<n.indexOf(t,r):!!e&&-1<v(n,t,r);
|
||||
},An.indexOf=function(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Eu(r),0>r&&(r=Ui(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&n<Ui(t,r)},An.invoke=kf,An.isArguments=of,An.isArray=ff,An.isArrayBuffer=cf,An.isArrayLike=su,An.isArrayLikeObject=hu,An.isBoolean=function(n){return true===n||false===n||yu(n)&&"[object Boolean]"==Ot(n)},An.isBuffer=af,An.isDate=lf,An.isElement=function(n){return yu(n)&&1===n.nodeType&&!xu(n)},An.isEmpty=function(n){
|
||||
if(null==n)return true;if(su(n)&&(ff(n)||typeof n=="string"||typeof n.splice=="function"||af(n)||_f(n)||of(n)))return!n.length;var t=vo(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(ze(n))return!Vt(n).length;for(var r in n)if(oi.call(n,r))return false;return true},An.isEqual=function(n,t){return Mt(n,t)},An.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:T)?r(n,t):T;return e===T?Mt(n,t,T,r):!!e},An.isError=pu,An.isFinite=function(n){return typeof n=="number"&&Wi(n)},An.isFunction=_u,
|
||||
An.isInteger=vu,An.isLength=gu,An.isMap=sf,An.isMatch=function(n,t){return n===t||$t(n,t,xe(t))},An.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:T,$t(n,t,xe(t),r)},An.isNaN=function(n){return bu(n)&&n!=+n},An.isNative=function(n){if(go(n))throw new Hu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ft(n)},An.isNil=function(n){return null==n},An.isNull=function(n){return null===n},An.isNumber=bu,An.isObject=du,An.isObjectLike=yu,An.isPlainObject=xu,An.isRegExp=hf,
|
||||
An.isSafeInteger=function(n){return vu(n)&&-9007199254740991<=n&&9007199254740991>=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Bi.call(n,t)},An.kebabCase=Lf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==T&&(u=Eu(r),u=0>u?Ui(e+u,0):Ci(u,e-1)),
|
||||
t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=_(n,d,u,true);return n},An.lowerCase=Uf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){return{}},An.stubString=function(){
|
||||
return""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,Eu(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return!t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return t&&e<t?n+ne(t-e,r):n},An.padStart=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return t&&e<t?ne(t-e,r)+n:n},An.parseInt=function(n,t,r){
|
||||
return r||null==t?t=0:t&&(t=+t),Mi(Iu(n).replace(on,""),t||0)},An.random=function(n,t,r){if(r&&typeof r!="boolean"&&Oe(n,t,r)&&(t=r=T),r===T&&(typeof t=="boolean"?(r=t,t=T):typeof n=="boolean"&&(r=n,n=T)),n===T&&t===T?(n=0,t=1):(n=Au(n),t===T?(t=n,n=0):t=Au(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){var e=ff(n)?s:j,u=3>arguments.length;
|
||||
return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:Eu(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++e<u;){var i=null==n?T:n[Me(t[e])];i===T&&(e=u,i=r),n=_u(i)?i.call(n):i}return n},An.round=ec,An.runInContext=x,An.sample=function(n){return(ff(n)?Qn:cr)(n)},An.size=function(n){if(null==n)return 0;if(su(n))return ju(n)?D(n):n.length;
|
||||
var t=vo(n);return"[object Map]"==t||"[object Set]"==t?n.size:Vt(n).length},An.snakeCase=Df,An.some=function(n,t,r){var e=ff(n)?h:pr;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.sortedIndex=function(n,t){return _r(n,t)},An.sortedIndexBy=function(n,t,r){return vr(n,t,ye(r,2))},An.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){var e=_r(n,t);if(e<r&&lu(n[e],t))return e}return-1},An.sortedLastIndex=function(n,t){return _r(n,t,true)},An.sortedLastIndexBy=function(n,t,r){return vr(n,t,ye(r,2),true);
|
||||
},An.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=_r(n,t,true)-1;if(lu(n[r],t))return r}return-1},An.startCase=Mf,An.startsWith=function(n,t,r){return n=Iu(n),r=null==r?0:pt(Eu(r),0,n.length),t=yr(t),n.slice(r,r+t.length)==t},An.subtract=uc,An.sum=function(n){return n&&n.length?m(n,$u):0},An.sumBy=function(n,t){return n&&n.length?m(n,ye(t,2)):0},An.template=function(n,t,r){var e=An.templateSettings;r&&Oe(n,t,r)&&(t=T),n=Iu(n),t=bf({},t,e,ce),r=bf({},t.imports,e.imports,ce);var u,i,o=Wu(r),f=S(r,o),c=0;
|
||||
r=t.interpolate||jn;var a="__p+='";r=Xu((t.escape||jn).source+"|"+r.source+"|"+(r===Q?pn:jn).source+"|"+(t.evaluate||jn).source+"|$","g");var l=oi.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(wn,z),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=oi.call(t,"variable")&&t.variable)||(a="with(obj){"+a+"}"),
|
||||
a=(i?a.replace(P,""):a).replace(Z,"$1").replace(q,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=Ff(function(){return Ju(o,l+"return "+a).apply(T,f)}),t.source=a,pu(t))throw t;return t},An.times=function(n,t){if(n=Eu(n),1>n||9007199254740991<n)return[];var r=4294967295,e=Ci(n,4294967295);for(t=ye(t),n-=4294967295,e=A(e,t);++r<n;)t(r);return e},An.toFinite=Au,
|
||||
An.toInteger=Eu,An.toLength=ku,An.toLower=function(n){return Iu(n).toLowerCase()},An.toNumber=Su,An.toSafeInteger=function(n){return n?pt(Eu(n),-9007199254740991,9007199254740991):0===n?n:0},An.toString=Iu,An.toUpper=function(n){return Iu(n).toUpperCase()},An.trim=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(un,""):n&&(t=yr(t))?(n=M(n),r=M(t),t=I(n,r),r=R(n,r)+1,Or(n,t,r).join("")):n},An.trimEnd=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(fn,""):n&&(t=yr(t))?(n=M(n),t=R(n,M(t))+1,
|
||||
Or(n,0,t).join("")):n},An.trimStart=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(on,""):n&&(t=yr(t))?(n=M(n),t=I(n,M(t)),Or(n,t).join("")):n},An.truncate=function(n,t){var r=30,e="...";if(du(t))var u="separator"in t?t.separator:u,r="length"in t?Eu(t.length):r,e="omission"in t?yr(t.omission):e;n=Iu(n);var i=n.length;if(Rn.test(n))var o=M(n),i=o.length;if(r>=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){
|
||||
var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},An.unescape=function(n){return(n=Iu(n))&&G.test(n)?n.replace(V,tt):n},An.uniqueId=function(n){var t=++fi;return Iu(n)+t},An.upperCase=Tf,An.upperFirst=$f,An.each=nu,An.eachRight=tu,An.first=qe,Nu(An,function(){var n={};return mt(An,function(t,r){oi.call(An.prototype,r)||(n[r]=t)}),n}(),{chain:false
|
||||
}),An.VERSION="4.17.15",r("bind bindKey curry curryRight partial partialRight".split(" "),function(n){An[n].placeholder=An}),r(["drop","take"],function(n,t){Un.prototype[n]=function(r){r=r===T?1:Ui(Eu(r),0);var e=this.__filtered__&&!t?new Un(this):this.clone();return e.__filtered__?e.__takeCount__=Ci(r,e.__takeCount__):e.__views__.push({size:Ci(r,4294967295),type:n+(0>e.__dir__?"Right":"")}),e},Un.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){
|
||||
var r=t+1,e=1==r||3==r;Un.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Un.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Un.prototype[n]=function(){return this.__filtered__?new Un(this):this[r](1)}}),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(n){
|
||||
return this.filter(n).head()},Un.prototype.findLast=function(n){return this.reverse().find(n)},Un.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Un(this):this.map(function(r){return Lt(r,n,t)})}),Un.prototype.reject=function(n){return this.filter(au(ye(n)))},Un.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Un(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Un.prototype.takeRightWhile=function(n){
|
||||
return this.reverse().takeWhile(n).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){function t(n){return n=u.apply(An,a([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Un,l=f[0],s=c||ff(o);s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,l=i&&!h,c=c&&!p;
|
||||
return!i&&s?(o=c?o:new Un(this),o=n.apply(o,f),o.__actions__.push({func:Qe,args:[t],thisArg:T}),new On(o,h)):l&&c?n.apply(this,f):(o=this.thru(t),l?e?o.value()[0]:o.value():o)})}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)});
|
||||
}}),mt(Un.prototype,function(n,t){var r=An[t];if(r){var e=r.name+"";oi.call(Gi,e)||(Gi[e]=[]),Gi[e].push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Un.prototype.clone=function(){var n=new Un(this.__wrapped__);return n.__actions__=Ur(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ur(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ur(this.__views__),n},Un.prototype.reverse=function(){if(this.__filtered__){var n=new Un(this);
|
||||
n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Un.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Ci(n,f+s);break;case"takeRight":f=Ui(f,n-s)}}if(n={start:f,end:n},o=n.start,f=n.end,n=f-o,o=u?f:o-1,f=this.__iteratees__,c=f.length,a=0,l=Ci(n,this.__takeCount__),!e||!u&&i==n&&l==n)return wr(t,this.__actions__);
|
||||
e=[];n:for(;n--&&a<l;){for(o+=r,u=-1,i=t[o];++u<c;){var h=f[u],s=h.type,h=(0,h.iteratee)(i);if(2==s)i=h;else if(!h){if(1==s)continue n;break n}}e[a++]=i}return e},An.prototype.at=To,An.prototype.chain=function(){return Ye(this)},An.prototype.commit=function(){return new On(this.value(),this.__chain__)},An.prototype.next=function(){this.__values__===T&&(this.__values__=mu(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){
|
||||
for(var t,r=this;r instanceof En;){var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Un?(this.__actions__.length&&(n=new Un(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,
|
||||
wi&&(An.prototype[wi]=Xe),An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this);
|
||||
1
static/ext/moment.min.js
vendored
Normal file
1
static/ext/moment.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
static/ext/semantic-fonts/brand-icons.eot
Normal file
BIN
static/ext/semantic-fonts/brand-icons.eot
Normal file
Binary file not shown.
1008
static/ext/semantic-fonts/brand-icons.svg
Normal file
1008
static/ext/semantic-fonts/brand-icons.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 496 KiB |
BIN
static/ext/semantic-fonts/brand-icons.ttf
Normal file
BIN
static/ext/semantic-fonts/brand-icons.ttf
Normal file
Binary file not shown.
BIN
static/ext/semantic-fonts/brand-icons.woff
Normal file
BIN
static/ext/semantic-fonts/brand-icons.woff
Normal file
Binary file not shown.
BIN
static/ext/semantic-fonts/brand-icons.woff2
Normal file
BIN
static/ext/semantic-fonts/brand-icons.woff2
Normal file
Binary file not shown.
BIN
static/ext/semantic-fonts/icons.eot
Normal file
BIN
static/ext/semantic-fonts/icons.eot
Normal file
Binary file not shown.
BIN
static/ext/semantic-fonts/icons.otf
Normal file
BIN
static/ext/semantic-fonts/icons.otf
Normal file
Binary file not shown.
1518
static/ext/semantic-fonts/icons.svg
Normal file
1518
static/ext/semantic-fonts/icons.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 382 KiB |
BIN
static/ext/semantic-fonts/icons.ttf
Normal file
BIN
static/ext/semantic-fonts/icons.ttf
Normal file
Binary file not shown.
BIN
static/ext/semantic-fonts/icons.woff
Normal file
BIN
static/ext/semantic-fonts/icons.woff
Normal file
Binary file not shown.
BIN
static/ext/semantic-fonts/icons.woff2
Normal file
BIN
static/ext/semantic-fonts/icons.woff2
Normal file
Binary file not shown.
BIN
static/ext/semantic-fonts/outline-icons.eot
Normal file
BIN
static/ext/semantic-fonts/outline-icons.eot
Normal file
Binary file not shown.
366
static/ext/semantic-fonts/outline-icons.svg
Normal file
366
static/ext/semantic-fonts/outline-icons.svg
Normal file
@ -0,0 +1,366 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!--
|
||||
Font Awesome Free 5.0.8 by @fontawesome - https://fontawesome.com
|
||||
License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
-->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<font id="fontawesome-free" horiz-adv-x="640">
|
||||
<font-face font-family="Font Awesome 5 Free"
|
||||
units-per-em="512" ascent="448"
|
||||
descent="64"
|
||||
font-weight="400"
|
||||
font-style="Regular" />
|
||||
<missing-glyph horiz-adv-x="0" />
|
||||
<glyph glyph-name="address-book"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M436 288C442.627 288 448 293.373 448 300V340C448 346.627 442.627 352 436 352H416V400C416 426.51 394.51 448 368 448H48C21.49 448 0 426.51 0 400V-16C0 -42.51 21.49 -64 48 -64H368C394.51 -64 416 -42.51 416 -16V32H436C442.627 32 448 37.373 448 44V84C448 90.627 442.627 96 436 96H416V160H436C442.627 160 448 165.373 448 172V212C448 218.627 442.627 224 436 224H416V288H436zM362 -16H54A6 6 0 0 0 48 -10V394A6 6 0 0 0 54 400H362A6 6 0 0 0 368 394V-10A6 6 0 0 0 362 -16zM128 240C128 284.183 163.817 320 208 320S288 284.183 288 240S252.183 160 208 160S128 195.817 128 240zM336 106.523V88C336 74.745 325.255 64 312 64H104C90.745 64 80 74.745 80 88V106.523C80 128.549 94.99 147.7480000000001 116.358 153.09L152.015 162.004C181.116 141.072 226.524 135.059 263.985 162.004L299.642 153.09C321.01 147.748 336 128.548 336 106.523z" />
|
||||
<glyph glyph-name="address-card"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M464 384H48C21.49 384 0 362.51 0 336V48C0 21.49 21.49 0 48 0H464C490.51 0 512 21.49 512 48V336C512 362.51 490.51 384 464 384zM458 48H54A6 6 0 0 0 48 54V330A6 6 0 0 0 54 336H458A6 6 0 0 0 464 330V54A6 6 0 0 0 458 48zM404 224H300C293.373 224 288 229.373 288 236V252C288 258.627 293.373 264 300 264H404C410.627 264 416 258.627 416 252V236C416 229.373 410.627 224 404 224zM404 152H300C293.373 152 288 157.373 288 164V180C288 186.627 293.373 192 300 192H404C410.627 192 416 186.627 416 180V164C416 157.373 410.627 152 404 152zM176 288C209.137 288 236 261.137 236 228S209.137 168 176 168S116 194.863 116 228S142.863 288 176 288zM244.731 162.817L217.989 169.503C189.893 149.294 155.837 153.804 134.011 169.503L107.269 162.817C91.243 158.811 80 144.411 80 127.892V114C80 104.059 88.059 96 98 96H254C263.941 96 272 104.059 272 114V127.892C272 144.411 260.757 158.811 244.731 162.817z" />
|
||||
<glyph glyph-name="arrow-alt-circle-down"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119 440 8 329 8 192S119 -56 256 -56S504 55 504 192S393 440 256 440zM256 -8C145.5 -8 56 81.5 56 192S145.5 392 256 392S456 302.5 456 192S366.5 -8 256 -8zM224 308V192H157C146.3 192 141 179.1 148.5 171.5L247.5 72.5C252.2 67.8 259.8 67.8 264.5 72.5L363.5 171.5C371.1 179.1 365.7 192 355 192H288V308C288 314.6 282.6 320 276 320H236C229.4 320 224 314.6 224 308z" />
|
||||
<glyph glyph-name="arrow-alt-circle-left"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M8 192C8 55 119 -56 256 -56S504 55 504 192S393 440 256 440S8 329 8 192zM456 192C456 81.5 366.5 -8 256 -8S56 81.5 56 192S145.5 392 256 392S456 302.5 456 192zM384 212V172C384 165.4 378.6 160 372 160H256V93C256 82.3 243.1 77 235.5 84.5L136.5 183.5C131.8 188.2 131.8 195.8 136.5 200.5L235.5 299.5C243.1 307.1 256 301.7 256 291V224H372C378.6 224 384 218.6 384 212z" />
|
||||
<glyph glyph-name="arrow-alt-circle-right"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M504 192C504 329 393 440 256 440S8 329 8 192S119 -56 256 -56S504 55 504 192zM56 192C56 302.5 145.5 392 256 392S456 302.5 456 192S366.5 -8 256 -8S56 81.5 56 192zM128 172V212C128 218.6 133.4 224 140 224H256V291C256 301.7 268.9 307 276.5 299.5L375.5 200.5C380.2 195.8 380.2 188.2 375.5 183.5L276.5 84.5C268.9 76.9 256 82.3 256 93V160H140C133.4 160 128 165.4 128 172z" />
|
||||
<glyph glyph-name="arrow-alt-circle-up"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 -56C393 -56 504 55 504 192S393 440 256 440S8 329 8 192S119 -56 256 -56zM256 392C366.5 392 456 302.5 456 192S366.5 -8 256 -8S56 81.5 56 192S145.5 392 256 392zM276 64H236C229.4 64 224 69.4 224 76V192H157C146.3 192 141 204.9 148.5 212.5L247.5 311.5C252.2 316.2 259.8 316.2 264.5 311.5L363.5 212.5C371.1 204.9 365.7 192 355 192H288V76C288 69.4 282.6 64 276 64z" />
|
||||
<glyph glyph-name="bell-slash"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M130.9 48C114.138 48 105.765 68.39 117.566 80.191C142.792 105.417 163.66 129.5290000000001 168.215 201.6710000000001L121.438 242.9450000000001A168.48 168.48 0 0 1 121.142 233.1430000000001C121.142 151.21 103.591 133.8510000000001 86.599 117.0650000000001C38.504 69.559 73.726 0 130.919 0H224C224 -35.346 252.654 -64 288 -64S352 -35.346 352 0H396.777L342.377 48H130.9zM288 -24C274.766 -24 264 -13.234 264 0H312C312 -13.234 301.234 -24 288 -24zM571.867 -24.553L503.936 35.018C517.04 59.136 515.4599999999999 91.336 489.404 117.0600000000001C472.415 133.8450000000001 454.858 151.2030000000001 454.858 233.1430000000001C454.858 316.1690000000001 393.9 385.2170000000001 314.391 397.9050000000001A31.848 31.848 0 0 1 320 416C320 433.673 305.673 448 288 448S256 433.673 256 416A31.848 31.848 0 0 1 261.609 397.905C220.138 391.287 183.718 369.334 158.36 338.064L36.459 444.963C31.401 449.399 23.682 448.919 19.219 443.892L3.056 425.687C-1.407 420.6600000000001 -0.925 412.988 4.134 408.553L539.542 -60.963C544.6 -65.399 552.3190000000001 -64.919 556.782 -59.892L572.945 -41.687C577.407 -36.66 576.9250000000001 -28.988 571.8670000000001 -24.553zM288 352C353.538 352 406.857 298.681 406.857 233.143C406.857 135.493 430.078 108.569 458.425 80.191C461.333 77.283 462.9979999999999 73.8630000000001 463.634 70.359L194.482 306.3880000000001C216.258 334.133 250.075 352 288 352z" />
|
||||
<glyph glyph-name="bell"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M425.403 117.061C408.4140000000001 133.846 390.8570000000001 151.204 390.8570000000001 233.144C390.8570000000001 316.17 329.899 385.218 250.39 397.906A31.842999999999996 31.842999999999996 0 0 1 256 416C256 433.673 241.673 448 224 448S192 433.673 192 416A31.848 31.848 0 0 1 197.609 397.905C118.101 385.217 57.143 316.169 57.143 233.143C57.143 151.21 39.592 133.851 22.6 117.065C-25.496 69.559 9.726 0 66.919 0H160C160 -35.346 188.654 -64 224 -64C259.346 -64 288 -35.346 288 0H381.08C438.27 0 473.495 69.583 425.403 117.061zM224 -24C210.766 -24 200 -13.234 200 0H248C248 -13.234 237.234 -24 224 -24zM381.092 48H66.9C50.138 48 41.765 68.39 53.566 80.191C82.151 108.776 105.143 135.915 105.143 233.1430000000001C105.143 298.6810000000001 158.462 352 224 352S342.857 298.681 342.857 233.143C342.857 135.493 366.078 108.569 394.425 80.191C406.278 68.339 397.783 48 381.092 48z" />
|
||||
<glyph glyph-name="bookmark"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M336 448H48C21.49 448 0 426.51 0 400V-64L192 48L384 -64V400C384 426.51 362.51 448 336 448zM336 19.57L192 103.57L48 19.57V394A6 6 0 0 0 54 400H330C333.314 400 336 397.317 336 394.004V19.57z" />
|
||||
<glyph glyph-name="building"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M128 300V340C128 346.6 133.4 352 140 352H180C186.6 352 192 346.6 192 340V300C192 293.4 186.6 288 180 288H140C133.4 288 128 293.4 128 300zM268 288H308C314.6 288 320 293.4 320 300V340C320 346.6 314.6 352 308 352H268C261.4 352 256 346.6 256 340V300C256 293.4 261.4 288 268 288zM140 192H180C186.6 192 192 197.4 192 204V244C192 250.6 186.6 256 180 256H140C133.4 256 128 250.6 128 244V204C128 197.4 133.4 192 140 192zM268 192H308C314.6 192 320 197.4 320 204V244C320 250.6 314.6 256 308 256H268C261.4 256 256 250.6 256 244V204C256 197.4 261.4 192 268 192zM192 108V148C192 154.6 186.6 160 180 160H140C133.4 160 128 154.6 128 148V108C128 101.4 133.4 96 140 96H180C186.6 96 192 101.4 192 108zM268 96H308C314.6 96 320 101.4 320 108V148C320 154.6 314.6 160 308 160H268C261.4 160 256 154.6 256 148V108C256 101.4 261.4 96 268 96zM448 -28V-64H0V-28C0 -21.4 5.4 -16 12 -16H31.5V424C31.5 437.3 42.2 448 55.5 448H392.5C405.8 448 416.5 437.3 416.5 424V-16H436C442.6 -16 448 -21.4 448 -28zM79.5 -15H192V52C192 58.6 197.4 64 204 64H244C250.6 64 256 58.6 256 52V-15H368.5V399L80 400L79.5 -15z" />
|
||||
<glyph glyph-name="calendar-alt"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M148 160H108C101.4 160 96 165.4 96 172V212C96 218.6 101.4 224 108 224H148C154.6 224 160 218.6 160 212V172C160 165.4 154.6 160 148 160zM256 172V212C256 218.6 250.6 224 244 224H204C197.4 224 192 218.6 192 212V172C192 165.4 197.4 160 204 160H244C250.6 160 256 165.4 256 172zM352 172V212C352 218.6 346.6 224 340 224H300C293.4 224 288 218.6 288 212V172C288 165.4 293.4 160 300 160H340C346.6 160 352 165.4 352 172zM256 76V116C256 122.6 250.6 128 244 128H204C197.4 128 192 122.6 192 116V76C192 69.4 197.4 64 204 64H244C250.6 64 256 69.4 256 76zM160 76V116C160 122.6 154.6 128 148 128H108C101.4 128 96 122.6 96 116V76C96 69.4 101.4 64 108 64H148C154.6 64 160 69.4 160 76zM352 76V116C352 122.6 346.6 128 340 128H300C293.4 128 288 122.6 288 116V76C288 69.4 293.4 64 300 64H340C346.6 64 352 69.4 352 76zM448 336V-16C448 -42.5 426.5 -64 400 -64H48C21.5 -64 0 -42.5 0 -16V336C0 362.5 21.5 384 48 384H96V436C96 442.6 101.4 448 108 448H148C154.6 448 160 442.6 160 436V384H288V436C288 442.6 293.4 448 300 448H340C346.6 448 352 442.6 352 436V384H400C426.5 384 448 362.5 448 336zM400 -10V288H48V-10C48 -13.3 50.7 -16 54 -16H394C397.3 -16 400 -13.3 400 -10z" />
|
||||
<glyph glyph-name="calendar-check"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M400 384H352V436C352 442.627 346.627 448 340 448H300C293.373 448 288 442.627 288 436V384H160V436C160 442.627 154.627 448 148 448H108C101.373 448 96 442.627 96 436V384H48C21.49 384 0 362.51 0 336V-16C0 -42.51 21.49 -64 48 -64H400C426.51 -64 448 -42.51 448 -16V336C448 362.51 426.51 384 400 384zM394 -16H54A6 6 0 0 0 48 -10V288H400V-10A6 6 0 0 0 394 -16zM341.151 184.65L198.842 43.481C194.137 38.814 186.539 38.844 181.871 43.549L106.78 119.248C102.113 123.953 102.143 131.551 106.848 136.219L129.567 158.755C134.272 163.422 141.87 163.392 146.537 158.686L190.641 114.225L301.713 224.406C306.418 229.073 314.016 229.043 318.6840000000001 224.3379999999999L341.2200000000001 201.62C345.887 196.9149999999999 345.8560000000001 189.317 341.151 184.65z" />
|
||||
<glyph glyph-name="calendar-minus"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M124 120C117.4 120 112 125.4 112 132V156C112 162.6 117.4 168 124 168H324C330.6 168 336 162.6 336 156V132C336 125.4 330.6 120 324 120H124zM448 336V-16C448 -42.5 426.5 -64 400 -64H48C21.5 -64 0 -42.5 0 -16V336C0 362.5 21.5 384 48 384H96V436C96 442.6 101.4 448 108 448H148C154.6 448 160 442.6 160 436V384H288V436C288 442.6 293.4 448 300 448H340C346.6 448 352 442.6 352 436V384H400C426.5 384 448 362.5 448 336zM400 -10V288H48V-10C48 -13.3 50.7 -16 54 -16H394C397.3 -16 400 -13.3 400 -10z" />
|
||||
<glyph glyph-name="calendar-plus"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M336 156V132C336 125.4 330.6 120 324 120H248V44C248 37.4 242.6 32 236 32H212C205.4 32 200 37.4 200 44V120H124C117.4 120 112 125.4 112 132V156C112 162.6 117.4 168 124 168H200V244C200 250.6 205.4 256 212 256H236C242.6 256 248 250.6 248 244V168H324C330.6 168 336 162.6 336 156zM448 336V-16C448 -42.5 426.5 -64 400 -64H48C21.5 -64 0 -42.5 0 -16V336C0 362.5 21.5 384 48 384H96V436C96 442.6 101.4 448 108 448H148C154.6 448 160 442.6 160 436V384H288V436C288 442.6 293.4 448 300 448H340C346.6 448 352 442.6 352 436V384H400C426.5 384 448 362.5 448 336zM400 -10V288H48V-10C48 -13.3 50.7 -16 54 -16H394C397.3 -16 400 -13.3 400 -10z" />
|
||||
<glyph glyph-name="calendar-times"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M311.7 73.3L294.7 56.3C290 51.6 282.4 51.6 277.7 56.3L224 110.1L170.3 56.4C165.6 51.7 158 51.7 153.3 56.4L136.3 73.4C131.6 78.1 131.6 85.7000000000001 136.3 90.4L190 144.1L136.3 197.8C131.6 202.5 131.6 210.1 136.3 214.8L153.3 231.8C158 236.5 165.6 236.5 170.3 231.8L224 178.1L277.7 231.8C282.4 236.5 290 236.5 294.7 231.8L311.7 214.8C316.4 210.1 316.4 202.5 311.7 197.8L257.9 144L311.6 90.3C316.4 85.6 316.4 78 311.7 73.3zM448 336V-16C448 -42.5 426.5 -64 400 -64H48C21.5 -64 0 -42.5 0 -16V336C0 362.5 21.5 384 48 384H96V436C96 442.6 101.4 448 108 448H148C154.6 448 160 442.6 160 436V384H288V436C288 442.6 293.4 448 300 448H340C346.6 448 352 442.6 352 436V384H400C426.5 384 448 362.5 448 336zM400 -10V288H48V-10C48 -13.3 50.7 -16 54 -16H394C397.3 -16 400 -13.3 400 -10z" />
|
||||
<glyph glyph-name="calendar"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M400 384H352V436C352 442.6 346.6 448 340 448H300C293.4 448 288 442.6 288 436V384H160V436C160 442.6 154.6 448 148 448H108C101.4 448 96 442.6 96 436V384H48C21.5 384 0 362.5 0 336V-16C0 -42.5 21.5 -64 48 -64H400C426.5 -64 448 -42.5 448 -16V336C448 362.5 426.5 384 400 384zM394 -16H54C50.7 -16 48 -13.3 48 -10V288H400V-10C400 -13.3 397.3 -16 394 -16z" />
|
||||
<glyph glyph-name="caret-square-down"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M125.1 240H322.9C333.6 240 339 227 331.4 219.5L232.5 121.2C227.8 116.5 220.3 116.5 215.6 121.2L116.7 219.5C109 227 114.4 240 125.1 240zM448 368V16C448 -10.5 426.5 -32 400 -32H48C21.5 -32 0 -10.5 0 16V368C0 394.5 21.5 416 48 416H400C426.5 416 448 394.5 448 368zM400 22V362C400 365.3 397.3 368 394 368H54C50.7 368 48 365.3 48 362V22C48 18.7 50.7 16 54 16H394C397.3 16 400 18.7 400 22z" />
|
||||
<glyph glyph-name="caret-square-left"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M272 290.9V93.1C272 82.4 259 77 251.5 84.6L153.2 183.5C148.5 188.2 148.5 195.7 153.2 200.4L251.5 299.3C259 307 272 301.6 272 290.9zM448 368V16C448 -10.5 426.5 -32 400 -32H48C21.5 -32 0 -10.5 0 16V368C0 394.5 21.5 416 48 416H400C426.5 416 448 394.5 448 368zM400 22V362C400 365.3 397.3 368 394 368H54C50.7 368 48 365.3 48 362V22C48 18.7 50.7 16 54 16H394C397.3 16 400 18.7 400 22z" />
|
||||
<glyph glyph-name="caret-square-right"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M176 93.1V290.9C176 301.6 189 307 196.5 299.4L294.8 200.5C299.5 195.8 299.5 188.3 294.8 183.6L196.5 84.7000000000001C189 77.0000000000001 176 82.4 176 93.1zM448 368V16C448 -10.5 426.5 -32 400 -32H48C21.5 -32 0 -10.5 0 16V368C0 394.5 21.5 416 48 416H400C426.5 416 448 394.5 448 368zM400 22V362C400 365.3 397.3 368 394 368H54C50.7 368 48 365.3 48 362V22C48 18.7 50.7 16 54 16H394C397.3 16 400 18.7 400 22z" />
|
||||
<glyph glyph-name="caret-square-up"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M322.9 144H125.1C114.4 144 109 157 116.6 164.5L215.5 262.8C220.2 267.5 227.7 267.5 232.4 262.8L331.3 164.5C339 157 333.6 144 322.9000000000001 144zM448 368V16C448 -10.5 426.5 -32 400 -32H48C21.5 -32 0 -10.5 0 16V368C0 394.5 21.5 416 48 416H400C426.5 416 448 394.5 448 368zM400 22V362C400 365.3 397.3 368 394 368H54C50.7 368 48 365.3 48 362V22C48 18.7 50.7 16 54 16H394C397.3 16 400 18.7 400 22z" />
|
||||
<glyph glyph-name="chart-bar"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M500 48C506.6 48 512 42.6 512 36V12C512 5.4 506.6 0 500 0H12C5.4 0 0 5.4 0 12V372C0 378.6 5.4 384 12 384H36C42.6 384 48 378.6 48 372V48H500zM144 108V180C144 186.6 138.6 192 132 192H108C101.4 192 96 186.6 96 180V108C96 101.4 101.4 96 108 96H132C138.6 96 144 101.4 144 108zM240 108V308C240 314.6 234.6 320 228 320H204C197.4 320 192 314.6 192 308V108C192 101.4 197.4 96 204 96H228C234.6 96 240 101.4 240 108zM336 108V244C336 250.6 330.6 256 324 256H300C293.4 256 288 250.6 288 244V108C288 101.4 293.4 96 300 96H324C330.6 96 336 101.4 336 108zM432 108V340C432 346.6 426.6 352 420 352H396C389.4 352 384 346.6 384 340V108C384 101.4 389.4 96 396 96H420C426.6 96 432 101.4 432 108z" />
|
||||
<glyph glyph-name="check-circle"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119.033 440 8 328.967 8 192S119.033 -56 256 -56S504 55.033 504 192S392.967 440 256 440zM256 392C366.532 392 456 302.549 456 192C456 81.468 366.549 -8 256 -8C145.468 -8 56 81.451 56 192C56 302.532 145.451 392 256 392M396.204 261.733L373.668 284.451C369.0010000000001 289.156 361.403 289.187 356.698 284.519L215.346 144.303L155.554 204.58C150.887 209.285 143.289 209.316 138.584 204.649L115.865 182.113C111.16 177.446 111.129 169.848 115.797 165.142L206.578 73.6259999999999C211.245 68.9209999999999 218.843 68.8899999999999 223.548 73.5579999999999L396.1370000000001 244.762C400.8410000000001 249.43 400.8710000000001 257.0279999999999 396.2040000000001 261.733z" />
|
||||
<glyph glyph-name="check-square"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M400 416H48C21.49 416 0 394.51 0 368V16C0 -10.51 21.49 -32 48 -32H400C426.51 -32 448 -10.51 448 16V368C448 394.51 426.51 416 400 416zM400 16H48V368H400V16zM364.136 257.724L191.547 86.52C186.842 81.853 179.244 81.883 174.577 86.588L83.796 178.104C79.129 182.809 79.159 190.407 83.865 195.075L106.584 217.611C111.289 222.278 118.887 222.248 123.554 217.542L183.346 157.265L324.698 297.481C329.403 302.148 337.001 302.118 341.668 297.413L364.204 274.695C368.871 269.9890000000001 368.841 262.391 364.136 257.724z" />
|
||||
<glyph glyph-name="circle"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119 440 8 329 8 192S119 -56 256 -56S504 55 504 192S393 440 256 440zM256 -8C145.5 -8 56 81.5 56 192S145.5 392 256 392S456 302.5 456 192S366.5 -8 256 -8z" />
|
||||
<glyph glyph-name="clipboard"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M336 384H256C256 419.29 227.29 448 192 448S128 419.29 128 384H48C21.49 384 0 362.51 0 336V-16C0 -42.51 21.49 -64 48 -64H336C362.51 -64 384 -42.51 384 -16V336C384 362.51 362.51 384 336 384zM330 -16H54A6 6 0 0 0 48 -10V330A6 6 0 0 0 54 336H96V300C96 293.373 101.373 288 108 288H276C282.627 288 288 293.373 288 300V336H330A6 6 0 0 0 336 330V-10A6 6 0 0 0 330 -16zM192 408C205.255 408 216 397.255 216 384S205.255 360 192 360S168 370.745 168 384S178.745 408 192 408" />
|
||||
<glyph glyph-name="clock"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119 440 8 329 8 192S119 -56 256 -56S504 55 504 192S393 440 256 440zM256 -8C145.5 -8 56 81.5 56 192S145.5 392 256 392S456 302.5 456 192S366.5 -8 256 -8zM317.8 96.4L232.9 158.1C229.8 160.4 228 164 228 167.8V332C228 338.6 233.4 344 240 344H272C278.6 344 284 338.6 284 332V190.3L350.8 141.7C356.2 137.8 357.3 130.3 353.4000000000001 124.9L334.6 99C330.7000000000001 93.7 323.2000000000001 92.5 317.8 96.4z" />
|
||||
<glyph glyph-name="clone"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M464 448H144C117.49 448 96 426.51 96 400V352H48C21.49 352 0 330.51 0 304V-16C0 -42.51 21.49 -64 48 -64H368C394.51 -64 416 -42.51 416 -16V32H464C490.51 32 512 53.49 512 80V400C512 426.51 490.51 448 464 448zM362 -16H54A6 6 0 0 0 48 -10V298A6 6 0 0 0 54 304H96V80C96 53.49 117.49 32 144 32H368V-10A6 6 0 0 0 362 -16zM458 80H150A6 6 0 0 0 144 86V394A6 6 0 0 0 150 400H458A6 6 0 0 0 464 394V86A6 6 0 0 0 458 80z" />
|
||||
<glyph glyph-name="closed-captioning"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M464 384H48C21.5 384 0 362.5 0 336V48C0 21.5 21.5 0 48 0H464C490.5 0 512 21.5 512 48V336C512 362.5 490.5 384 464 384zM458 48H54C50.7 48 48 50.7 48 54V330C48 333.3 50.7 336 54 336H458C461.3 336 464 333.3 464 330V54C464 50.7 461.3 48 458 48zM246.9 133.7C248.6 131.3 248.4 128.1 246.4 126C192.8 69.2 73.6 93.9 73.6 193.9C73.6 291.2 195.3 313.4 246.1 264C248.2 262 248.6 260.8 247.1 258.3L229.6 227.8C227.7 224.7 223.4 223.8 220.5 226.1C179.7 258.1 125.9 241.0000000000001 125.9 194.9C125.9 146.9 176.9 124.4 218.1 162.3C220.9 164.8 225.2 164.4 227.3 161.4L246.9 133.7000000000001zM437.3 133.7C439 131.3 438.8 128.1 436.8 126C383.2 69.1 264 93.9 264 193.9C264 291.2 385.7 313.4 436.5 264C438.6 262 439 260.8 437.5 258.3L420 227.8C418.1 224.7 413.8 223.8 410.9 226.1C370.1 258.1 316.3 241.0000000000001 316.3 194.9C316.3 146.9 367.3 124.4 408.5 162.3C411.3 164.8 415.6 164.4 417.7 161.4L437.3 133.7000000000001z" />
|
||||
<glyph glyph-name="comment-alt"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M288 416C129 416 0 322.9 0 208C0 158.7 23.7 113.5 63.3 77.8C54.6 54.5 41.2 45.1 26.2 34.7C15.1 27 -6 15 1.6 -8.5C6.7 -23.9 22.5 -33.2 39.7 -31.8C97.4 -27.2 150.9 -12.6 196.7 10.7C225.4 3.8 256.1 0 287.9 0C447 0 575.9 93 575.9 208C576 322.9 447.1 416 288 416zM288 48C255.5 48 222.6 52.4 190.7 62C158.4 43 112 16 56 8C88 32 112.8 69.6 117.2 96.4C79.1 122.4 48 161.3 48 208C48 278.9 134.3 368 288 368S528 278.9 528 208C528 137 441.7 48 288 48zM224 208C224 181.5 202.5 160 176 160S128 181.5 128 208S149.5 256 176 256S224 234.5 224 208zM336 208C336 181.5 314.5 160 288 160S240 181.5 240 208S261.5 256 288 256S336 234.5 336 208zM448 208C448 181.5 426.5 160 400 160S352 181.5 352 208S373.5 256 400 256S448 234.5 448 208z" />
|
||||
<glyph glyph-name="comment"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M288 416C129 416 0 322.9 0 208C0 158.7 23.7 113.5 63.3 77.8C54.6 54.5 41.2 45.1 26.2 34.7C15.1 27 -6 15 1.6 -8.5C6.7 -23.9 22.5 -33.2 39.7 -31.8C97.4 -27.2 150.9 -12.6 196.7 10.7C225.4 3.8 256.1 0 287.9 0C447 0 575.9 93 575.9 208C576 322.9 447.1 416 288 416zM288 48C255.5 48 222.6 52.4 190.7 62C158.4 43 112 16 56 8C88 32 112.8 69.6 117.2 96.4C79.1 122.4 48 161.3 48 208C48 278.9 134.3 368 288 368S528 278.9 528 208C528 137 441.7 48 288 48z" />
|
||||
<glyph glyph-name="comments"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M574.507 4.14C569.0859999999999 -17.121 549.9369999999999 -32 527.996 -32C495.75 -32 461.485 -22.01 425.896 -2.266C375.256 -13.892 316.745 -10.143 267.9359999999999 11.171C309.08 14.09 348.2969999999999 23.51 384.267 39.876C400.589 41.096 416.9409999999999 44.196 432.8979999999999 49.469C454.404 35.635 490.663 16 527.996 16C495.996 33.455 484.777 54.958 481.837 74.502C507.28 93.35 527.996 121.685 527.996 155.637C527.996 166.132 525.6129999999999 177.173 520.9549999999999 188.104C528.3599999999999 214.034 529.6109999999999 238.298 526.1399999999999 262.042C558.3039999999999 231.581 575.9959999999999 192.914 575.9959999999999 155.637C575.9959999999999 121.7439999999999 563.0829999999999 90.5899999999999 541.0199999999999 64.5179999999999C543.6729999999999 62.4799999999999 546.9439999999998 60.3419999999999 550.9819999999999 58.1399999999999C570.2429999999998 47.632 579.9289999999999 25.401 574.5069999999998 4.1399999999999zM240.002 368C117.068 368 48.004 295.123 48.004 237.091C48.004 198.895 72.863 167.019 103.395 145.815C99.868 123.827 86.404 99.636 48.004 80C92.804 80 136.314 102.089 162.123 117.653C187.643 109.747 214.006 106.182 240.002 106.182C362.998 106.182 432 179.024 432 237.091C432 295.118 362.943 368 240.002 368M240.002 416C390.193 416 480 321.974 480 237.091C480 214.346 473.494 190.697 461.184 168.7C449.3060000000001 147.474 432.6450000000001 128.406 411.661 112.026C390.068 95.169 364.863 81.981 336.748 72.829C306.893 63.11 274.343 58.183 240.002 58.183C215.553 58.183 191.662 60.87 168.71 66.187C126.311 43.488 85.785 32 48.004 32C25.824 32 6.532 47.197 1.339 68.761C-3.855 90.324 6.403 112.639 26.15 122.737C33.813 126.655 39.474 130.4740000000001 43.669 134.031C36.276 141.86 29.717 150.155 24.035 158.875C8.09 183.345 0.005 209.661 0.005 237.091C0.005 321.741 89.508 416 240.002 416z" />
|
||||
<glyph glyph-name="compass"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119.033 440 8 328.967 8 192S119.033 -56 256 -56S504 55.033 504 192S392.967 440 256 440zM256 -8C145.468 -8 56 81.451 56 192C56 302.531 145.451 392 256 392C366.532 392 456 302.549 456 192C456 81.468 366.549 -8 256 -8zM347.326 304.131L313.9670000000001 166.352A24.005 24.005 0 0 0 307.1950000000001 154.623L204.5550000000001 56.844C187.4510000000001 40.551 158.9950000000001 56.41 164.6750000000001 79.868L198.0340000000001 217.647A23.997 23.997 0 0 0 204.8060000000001 229.376L307.4480000000001 327.155C324.7330000000001 343.625 352.9420000000001 327.33 347.3260000000001 304.131zM256 224C238.327 224 224 209.673 224 192S238.327 160 256 160S288 174.327 288 192S273.673 224 256 224z" />
|
||||
<glyph glyph-name="copy"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M433.941 382.059L382.059 433.941A48 48 0 0 1 348.118 448H176C149.49 448 128 426.51 128 400V352H48C21.49 352 0 330.51 0 304V-16C0 -42.51 21.49 -64 48 -64H272C298.51 -64 320 -42.51 320 -16V32H400C426.51 32 448 53.49 448 80V348.118A48 48 0 0 1 433.941 382.059zM266 -16H54A6 6 0 0 0 48 -10V298A6 6 0 0 0 54 304H128V80C128 53.49 149.49 32 176 32H272V-10A6 6 0 0 0 266 -16zM394 80H182A6 6 0 0 0 176 86V394A6 6 0 0 0 182 400H288V312C288 298.745 298.745 288 312 288H400V86A6 6 0 0 0 394 80zM400 336H336V400H345.632C347.223 400 348.749 399.368 349.875 398.243L398.243 349.875A6 6 0 0 0 400 345.632V336z" />
|
||||
<glyph glyph-name="copyright"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119.033 440 8 328.967 8 192S119.033 -56 256 -56S504 55.033 504 192S392.967 440 256 440zM256 -8C145.468 -8 56 81.451 56 192C56 302.531 145.451 392 256 392C366.532 392 456 302.549 456 192C456 81.468 366.549 -8 256 -8zM363.351 93.064C353.737 83.352 317.8210000000001 51.668 259.286 51.668C176.856 51.668 118.802 113.093 118.802 193.235C118.802 272.387 179.077 332.636 258.564 332.636C314.095 332.636 347.302 306.016 356.157 297.857A11.965 11.965 0 0 0 358.093 282.535L339.938 254.422C336.097 248.472 327.972 247.14 322.439 251.501C313.844 258.277 290.625 274.039 260.731 274.039C212.428 274.039 182.815 238.709 182.815 193.957C182.815 152.368 209.703 110.265 261.092 110.265C293.749 110.265 317.935 129.304 326.818 137.49C332.088 142.347 340.414 141.529 344.638 135.752L364.503 108.582A11.947000000000001 11.947000000000001 0 0 0 363.351 93.064z" />
|
||||
<glyph glyph-name="credit-card"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M527.9 416H48.1C21.5 416 0 394.5 0 368V16C0 -10.5 21.5 -32 48.1 -32H527.9C554.5 -32 576 -10.5 576 16V368C576 394.5 554.5 416 527.9 416zM54.1 368H521.9C525.1999999999999 368 527.9 365.3 527.9 362V320H48.1V362C48.1 365.3 50.8 368 54.1 368zM521.9 16H54.1C50.8 16 48.1 18.7 48.1 22V192H527.9V22C527.9 18.7 525.1999999999999 16 521.9 16zM192 116V76C192 69.4 186.6 64 180 64H108C101.4 64 96 69.4 96 76V116C96 122.6 101.4 128 108 128H180C186.6 128 192 122.6 192 116zM384 116V76C384 69.4 378.6 64 372 64H236C229.4 64 224 69.4 224 76V116C224 122.6 229.4 128 236 128H372C378.6 128 384 122.6 384 116z" />
|
||||
<glyph glyph-name="dot-circle"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 392C366.532 392 456 302.549 456 192C456 81.468 366.549 -8 256 -8C145.468 -8 56 81.451 56 192C56 302.532 145.451 392 256 392M256 440C119.033 440 8 328.967 8 192S119.033 -56 256 -56S504 55.033 504 192S392.967 440 256 440zM256 272C211.817 272 176 236.183 176 192S211.817 112 256 112S336 147.817 336 192S300.183 272 256 272z" />
|
||||
<glyph glyph-name="edit"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M402.3 103.1L434.3 135.1C439.3 140.1 448 136.6 448 129.4V-16C448 -42.5 426.5 -64 400 -64H48C21.5 -64 0 -42.5 0 -16V336C0 362.5 21.5 384 48 384H321.5C328.6 384 332.2 375.4 327.2 370.3L295.2 338.3C293.7 336.8 291.7 336 289.5 336H48V-16H400V97.5C400 99.6 400.8 101.6 402.3 103.1zM558.9 304.9000000000001L296.3 42.3L205.9 32.3C179.7 29.4 157.4 51.5 160.3 77.9L170.3 168.3000000000001L432.9 430.9C455.8 453.8 492.8 453.8 515.6 430.9L558.8000000000001 387.7C581.7 364.8 581.7 327.7 558.9000000000001 304.9zM460.1 274L402 332.1L216.2 146.2L208.9 80.9L274.2 88.2L460.1 274zM524.9 353.7L481.7 396.9C477.6 401 470.9 401 466.9 396.9L436 366L494.1 307.9L525 338.8C529 343 529 349.6 524.9 353.7000000000001z" />
|
||||
<glyph glyph-name="envelope-open"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M494.586 283.4840000000001C489.889 287.367 382.863 373.4340000000001 359.3350000000001 392.141C337.231 409.809 299.437 448 256 448C212.795 448 175.364 410.283 152.665 392.141C128.202 372.6910000000001 21.595 286.9460000000001 17.515 283.592A48.004000000000005 48.004000000000005 0 0 1 0 246.515V-16C0 -42.51 21.49 -64 48 -64H464C490.51 -64 512 -42.51 512 -16V246.491A48 48 0 0 1 494.586 283.4840000000001zM464 -10A6 6 0 0 0 458 -16H54A6 6 0 0 0 48 -10V243.653C48 245.466 48.816 247.179 50.226 248.318C66.096 261.132 159.019 335.872 182.59 354.611C200.755 369.12 232.398 400 256 400C279.693 400 311.857 368.631 329.41 354.611C352.983 335.87 445.913 261.118 461.776 248.295A5.99 5.99 0 0 0 463.9999999999999 243.632V-10zM432.009 177.704C436.2580000000001 172.545 435.474 164.909 430.264 160.723C401.289 137.44 370.99 113.126 359.3350000000001 103.86C336.636 85.717 299.205 48 256 48C212.548 48 174.713 86.237 152.665 103.86C141.386 112.827 110.921 137.273 81.738 160.725C76.528 164.912 75.745 172.547 79.993 177.706L95.251 196.234C99.429 201.307 106.908 202.077 112.03 197.96C140.648 174.959 170.596 150.925 182.59 141.389C200.143 127.369 232.307 96 256 96C279.602 96 311.246 126.88 329.41 141.389C341.404 150.924 371.354 174.959 399.973 197.957C405.095 202.073 412.574 201.303 416.751 196.23L432.009 177.704z" />
|
||||
<glyph glyph-name="envelope"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M464 384H48C21.49 384 0 362.51 0 336V48C0 21.49 21.49 0 48 0H464C490.51 0 512 21.49 512 48V336C512 362.51 490.51 384 464 384zM464 336V295.195C441.578 276.936 405.832 248.544 329.413 188.705C312.572 175.458 279.212 143.633 256 144.004C232.792 143.629 199.421 175.463 182.587 188.705C106.18 248.535 70.425 276.933 48 295.195V336H464zM48 48V233.602C70.914 215.351 103.409 189.74 152.938 150.956C174.795 133.751 213.072 95.77 256 96.001C298.717 95.77 336.509 133.2000000000001 359.053 150.948C408.581 189.7310000000001 441.085 215.3490000000001 464 233.6010000000001V48H48z" />
|
||||
<glyph glyph-name="eye-slash"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M272.702 88.861C192.219 97.872 136.49 175.747 155.772 255.903L272.702 88.861zM288 56C185.444 56 95.908 110.701 48 192C69.755 228.917 100.1 260.342 136.344 283.658L108.803 323.0010000000001C67.001 295.766 31.921 259.259 6.646 216.369A47.999 47.999 0 0 1 6.646 167.63C63.004 71.994 168.14 8 288 8A332.89 332.89 0 0 1 327.648 10.367L295.627 56.111A284.16 284.16 0 0 0 288 56zM569.354 167.631C536.1220000000001 111.237 485.933 65.889 425.8000000000001 38.139L473.9160000000001 -30.601C477.717 -36.03 476.3960000000001 -43.513 470.967 -47.313L450.23 -61.83C444.8010000000001 -65.631 437.3180000000001 -64.3099999999999 433.5180000000001 -58.881L102.084 414.601C98.283 420.03 99.604 427.513 105.033 431.313L125.77 445.83C131.199 449.631 138.682 448.31 142.482 442.881L198.008 363.556C226.612 371.657 256.808 376 288 376C407.86 376 512.996 312.006 569.354 216.369A48.00200000000001 48.00200000000001 0 0 0 569.354 167.631zM528 192C483.843 266.933 404.323 319.27 311.838 327.007C302.042 316.9220000000001 296 303.17 296 288C296 257.072 321.072 232 352 232S408 257.072 408 288L407.999 288.0420000000001C438.6310000000001 230.765 424.738 157.7820000000001 371.0710000000001 116.323L397.766 78.188C452.626 101.449 498.308 141.614 528 192z" />
|
||||
<glyph glyph-name="file-alt"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M288 200V172C288 165.4 282.6 160 276 160H108C101.4 160 96 165.4 96 172V200C96 206.6 101.4 212 108 212H276C282.6 212 288 206.6 288 200zM276 128H108C101.4 128 96 122.6 96 116V88C96 81.4 101.4 76 108 76H276C282.6 76 288 81.4 288 88V116C288 122.6 282.6 128 276 128zM384 316.1V-16C384 -42.5 362.5 -64 336 -64H48C21.5 -64 0 -42.5 0 -16V400C0 426.5 21.5 448 48 448H252.1C264.8 448 277 442.9 286 433.9L369.9 350C378.9 341.1 384 328.8 384 316.1zM256 396.1V320H332.1L256 396.1zM336 -16V272H232C218.7 272 208 282.7 208 296V400H48V-16H336z" />
|
||||
<glyph glyph-name="file-archive"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M369.941 350.059L286.059 433.9410000000001A48 48 0 0 1 252.118 448H48C21.49 448 0 426.51 0 400V-16C0 -42.51 21.49 -64 48 -64H336C362.51 -64 384 -42.51 384 -16V316.118A48 48 0 0 1 369.941 350.059zM256 396.118L332.118 320H256V396.118zM336 -16H48V400H127.714V384H159.714V400H208V296C208 282.745 218.745 272 232 272H336V-16zM192.27 352H160.27V384H192.27V352zM160.27 352V320H128.27V352H160.27zM160.27 288V256H128.27V288H160.27zM192.27 288H160.27V320H192.27V288zM194.179 182.322A12 12 0 0 1 182.406 192H160.27V224H128.27V192L108.58 94.894C101.989 62.389 126.834 32 160 32C193.052 32 217.871 62.192 211.476 94.62L194.179 182.322zM160.27 57.927C142.352 57.927 127.826 70.032 127.826 84.963C127.826 99.895 142.351 111.999 160.27 111.999S192.714 99.894 192.714 84.963C192.714 70.032 178.188 57.927 160.27 57.927zM192.27 224H160.27V256H192.27V224z" />
|
||||
<glyph glyph-name="file-audio"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M369.941 350.059L286.059 433.9410000000001A48 48 0 0 1 252.118 448H48C21.49 448 0 426.51 0 400V-16C0 -42.51 21.49 -64 48 -64H336C362.51 -64 384 -42.51 384 -16V316.118A48 48 0 0 1 369.941 350.059zM332.118 320H256V396.118L332.118 320zM48 -16V400H208V296C208 282.745 218.745 272 232 272H336V-16H48zM192 60.024C192 49.333 179.074 43.979 171.515 51.539L136 87.514H108C101.373 87.514 96 92.887 96 99.514V155.514C96 162.141 101.373 167.514 108 167.514H136L171.515 204.461C179.075 212.021 192 206.667 192 195.976V60.024zM233.201 107.154C242.252 116.451 242.261 131.287 233.202 140.593C211.053 163.345 245.437 196.839 267.597 174.074C294.795 146.134 294.809 101.63 267.598 73.673C245.805 51.287 210.651 83.988 233.201 107.154z" />
|
||||
<glyph glyph-name="file-code"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M369.941 350.059L286.059 433.9410000000001A48 48 0 0 1 252.118 448H48C21.49 448 0 426.51 0 400V-16C0 -42.51 21.49 -64 48 -64H336C362.51 -64 384 -42.51 384 -16V316.118A48 48 0 0 1 369.941 350.059zM332.118 320H256V396.118L332.118 320zM48 -16V400H208V296C208 282.745 218.745 272 232 272H336V-16H48zM149.677 99.115L116.854 128L149.676 156.885A8.793 8.793 0 0 1 150.281 169.509L132.878 188.073C129.494 191.686 123.914 191.735 120.44 188.4740000000001L62.78 134.42C59.077 130.946 59.076 125.053 62.781 121.5800000000001L120.44 67.525A8.738 8.738 0 0 1 126.452 65.1440000000001A8.746 8.746 0 0 1 132.879 67.9260000000001L150.282 86.489A8.795 8.795 0 0 1 149.677 99.115zM233.961 226.965L209.56 234.049A8.796 8.796 0 0 1 198.655 228.051L144.04 39.939C142.687 35.279 145.378 30.387 150.038 29.0340000000001L174.441 21.95C179.121 20.595 183.998 23.304 185.346 27.948L239.958 216.06C241.312 220.72 238.621 225.612 233.961 226.9650000000001zM321.219 134.42L263.561 188.475C260.035 191.7820000000001 254.462 191.6400000000001 251.122 188.074L233.719 169.511A8.795 8.795 0 0 1 234.324 156.886L267.146 128L234.324 99.115A8.793 8.793 0 0 1 233.719 86.491L251.122 67.927A8.797 8.797 0 0 1 263.5610000000001 67.526H263.5600000000001L321.2200000000001 121.581C324.923 125.054 324.923 130.947 321.2190000000001 134.42z" />
|
||||
<glyph glyph-name="file-excel"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M369.9 350.1L286 434C277 443 264.8 448.1 252.1 448.1H48C21.5 448 0 426.5 0 400V-16C0 -42.5 21.5 -64 48 -64H336C362.5 -64 384 -42.5 384 -16V316.1C384 328.8 378.9 341.1 369.9 350.1zM332.1 320H256V396.1L332.1 320zM48 -16V400H208V296C208 282.7 218.7 272 232 272H336V-16H48zM260 224H231.2C226.8 224 222.8 221.6 220.7 217.7C202.7 184.6 198.5 175.3 192.1 160C178.2 189.1 185.2 177.3 163.5 217.7C161.4 221.6 157.3 224 152.9 224H124C114.7 224 109 214 113.6 206L159.9 128L113.6 50C108.9 42 114.7 32 124 32H152.9C157.3 32 161.3 34.4 163.4 38.3C185.1 78.3 186.4 83.3 192 96C206.9 65.8 197.9 80.1 220.6 38.3C222.7 34.4 226.8 32 231.2 32H260C269.3 32 275 42 270.4 50L224 128C224.7 129.1 254.3 178.5 270.3 206C275 214 269.2 224 260 224z" />
|
||||
<glyph glyph-name="file-image"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M369.9 350.1L286 434C277 443 264.8 448.1 252.1 448.1H48C21.5 448 0 426.5 0 400V-16C0 -42.5 21.5 -64 48 -64H336C362.5 -64 384 -42.5 384 -16V316.1C384 328.8 378.9 341.1 369.9 350.1zM332.1 320H256V396.1L332.1 320zM48 -16V400H208V296C208 282.7 218.7 272 232 272H336V-16H48zM80 32H304V160L280.5 183.5C275.8 188.2 268.2 188.2 263.5 183.5L176 96L136.5 135.5C131.8 140.2 124.2 140.2 119.5 135.5L80 96V32zM128 272C101.5 272 80 250.5 80 224S101.5 176 128 176S176 197.5 176 224S154.5 272 128 272z" />
|
||||
<glyph glyph-name="file-pdf"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M369.9 350.1L286 434C277 443 264.8 448.1 252.1 448.1H48C21.5 448 0 426.5 0 400V-16C0 -42.5 21.5 -64 48 -64H336C362.5 -64 384 -42.5 384 -16V316.1C384 328.8 378.9 341.1 369.9 350.1zM332.1 320H256V396.1L332.1 320zM48 -16V400H208V296C208 282.7 218.7 272 232 272H336V-16H48zM298.2 127.7C286 139.7 251.2 136.4 233.8 134.2C216.6 144.7 205.1 159.2 197 180.5C200.9 196.6 207.1 221.1 202.4 236.5C198.2 262.7 164.6 260.1 159.8 242.4C155.4 226.3 159.4 203.9 166.8 175.3C156.8 151.4 141.9 119.3 131.4 100.9C111.4 90.6 84.4 74.7 80.4 54.7C77.1 38.9 106.4 -0.5 156.5 85.9C178.9 93.3 203.3 102.4 224.9 106C243.8 95.8 265.9 89 280.7 89C306.2 89 308.7 117.2 298.2 127.7zM100.1 49.9C105.2 63.6 124.6 79.4 130.5 84.9C111.5 54.6 100.1 49.2 100.1 49.9zM181.7 240.5C189.1 240.5 188.4 208.4 183.5 199.7C179.1 213.6 179.2 240.5 181.7 240.5zM157.3 103.9C167 120.8 175.3 140.9 182 158.6C190.3 143.5 200.9 131.4 212.1 123.1C191.3 118.8 173.2 109.9999999999999 157.3 103.9zM288.9 108.9S283.9 102.9 251.6 116.7C286.7 119.3 292.5 111.3 288.9 108.9z" />
|
||||
<glyph glyph-name="file-powerpoint"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M369.9 350.1L286 434C277 443 264.8 448.1 252.1 448.1H48C21.5 448 0 426.5 0 400V-16C0 -42.5 21.5 -64 48 -64H336C362.5 -64 384 -42.5 384 -16V316.1C384 328.8 378.9 341.1 369.9 350.1zM332.1 320H256V396.1L332.1 320zM48 -16V400H208V296C208 282.7 218.7 272 232 272H336V-16H48zM120 44V212C120 218.6 125.4 224 132 224H201.2C237.9 224 264 197 264 157.7C264 83.4 195.3 91.2 168.5 91.2V44C168.5 37.4 163.1 32 156.5 32H132C125.4 32 120 37.4 120 44zM168.5 131.4H191.5C199.4 131.4 205.4 133.8 209.6 138.6C218.1 148.4 218 167.1 209.7 176.4C205.6 181 199.8 183.4 192.3 183.4H168.4V131.4z" />
|
||||
<glyph glyph-name="file-video"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M369.941 350.059L286.059 433.9410000000001A48 48 0 0 1 252.118 448H48C21.49 448 0 426.51 0 400V-16C0 -42.51 21.49 -64 48 -64H336C362.51 -64 384 -42.51 384 -16V316.118A48 48 0 0 1 369.941 350.059zM332.118 320H256V396.118L332.118 320zM48 -16V400H208V296C208 282.745 218.745 272 232 272H336V-16H48zM276.687 195.303L224 142.626V180C224 191.046 215.046 200 204 200H100C88.954 200 80 191.046 80 180V76C80 64.954 88.954 56 100 56H204C215.046 56 224 64.954 224 76V113.374L276.687 60.7000000000001C286.704 50.682 304 57.72 304 72.014V183.989C304 198.3 286.691 205.308 276.687 195.303z" />
|
||||
<glyph glyph-name="file-word"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M369.9 350.1L286 434C277 443 264.8 448.1 252.1 448.1H48C21.5 448 0 426.5 0 400V-16C0 -42.5 21.5 -64 48 -64H336C362.5 -64 384 -42.5 384 -16V316.1C384 328.8 378.9 341.1 369.9 350.1zM332.1 320H256V396.1L332.1 320zM48 -16V400H208V296C208 282.7 218.7 272 232 272H336V-16H48zM268.1 192C262.4000000000001 192 257.5 188 256.4000000000001 182.5C235.8000000000001 84.8 236.0000000000001 87.1 235.4000000000001 79C235.2000000000001 80.2 235.0000000000001 81.6 234.7000000000001 83.3C233.9000000000001 88.4 235.0000000000001 83.1 211.1000000000001 182.8C209.8000000000001 188.2 205.0000000000001 192 199.4000000000001 192H186.1000000000001C180.6000000000001 192 175.8000000000001 188.2 174.4000000000001 182.9C150.0000000000001 83.9 150.4000000000001 86.7 149.6000000000001 79.2C149.5000000000001 80.3 149.4000000000001 81.7 149.1000000000001 83.4C148.4000000000001 88.6 135.0000000000001 156.7 130.0000000000001 182.4C128.9000000000001 188 124.0000000000001 192.1 118.2000000000001 192.1H101.4000000000001C93.6000000000001 192.1 87.9000000000001 184.8 89.7000000000001 177.3C97.7000000000001 144.6999999999999 116.4000000000001 67.8 122.9000000000001 41.3C124.2000000000001 35.9 129.0000000000001 32.1999999999999 134.6000000000001 32.1999999999999H159.8000000000001C165.3000000000001 32.1999999999999 170.1000000000001 35.8999999999999 171.4 41.3L189.3000000000001 112.6999999999999C190.8000000000001 118.8999999999999 191.8000000000001 124.6999999999999 192.3000000000001 130L195.2000000000001 112.6999999999999C195.3000000000001 112.3 207.8000000000001 62.1999999999999 213.1000000000001 41.3C214.4000000000001 35.9999999999999 219.2000000000001 32.1999999999999 224.7000000000001 32.1999999999999H249.4000000000001C254.9000000000001 32.1999999999999 259.7000000000001 35.8999999999999 261.0000000000001 41.3C281.8000000000001 123.1999999999999 291.2000000000001 160.3 295.5000000000001 177.3C297.4000000000001 184.9 291.7000000000001 192.2 283.9000000000001 192.2H268.1z" />
|
||||
<glyph glyph-name="file"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M369.9 350.1L286 434C277 443 264.8 448.1 252.1 448.1H48C21.5 448 0 426.5 0 400V-16C0 -42.5 21.5 -64 48 -64H336C362.5 -64 384 -42.5 384 -16V316.1C384 328.8 378.9 341.1 369.9 350.1zM332.1 320H256V396.1L332.1 320zM48 -16V400H208V296C208 282.7 218.7 272 232 272H336V-16H48z" />
|
||||
<glyph glyph-name="flag"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M336.174 368C287.042 368 242.869 400 174.261 400C142.96 400 115.958 393.5180000000001 93.54 384.832A48.04 48.04 0 0 1 95.682 405.559C93.067 428.425 74.167 446.406 51.201 447.896C23.242 449.71 0 427.569 0 400C0 382.236 9.657 366.738 24 358.438V-48C24 -56.837 31.163 -64 40 -64H56C64.837 -64 72 -56.837 72 -48V35.443C109.869 52.72 143.259 64 199.826 64C248.958 64 293.131 32 361.7390000000001 32C420.218 32 463.711 54.617 490.287 71.981C503.846 80.839 512 95.949 512 112.145V352.063C512 386.522 476.736 409.831 445.096 396.18C409.193 380.6910000000001 371.641 368 336.174 368zM464 112C442.217 96.588 403.176 80 361.7390000000001 80C301.7940000000001 80 259.737 112 199.826 112C156.465 112 103.447 102.597 72 88V320C93.784 335.4120000000001 132.824 352 174.261 352C234.206 352 276.2630000000001 320 336.1740000000001 320C379.4450000000001 320 432.4940000000001 337.366 464 352V112z" />
|
||||
<glyph glyph-name="folder-open"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M527.943 224H480V272C480 298.51 458.51 320 432 320H272L208 384H48C21.49 384 0 362.51 0 336V48C0 21.49 21.49 0 48 0H448A48.001 48.001 0 0 1 488.704 22.56L568.646 150.56C588.5939999999999 182.477 565.608 224 527.943 224zM54 336H188.118L252.118 272H426A6 6 0 0 0 432 266V224H152A48 48 0 0 1 110.902 200.798L48 96.551V330.007A5.993 5.993 0 0 0 54 336zM448 48H72L149.234 176H528L448 48z" />
|
||||
<glyph glyph-name="folder"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M464 320H272L208 384H48C21.49 384 0 362.51 0 336V48C0 21.49 21.49 0 48 0H464C490.51 0 512 21.49 512 48V272C512 298.51 490.51 320 464 320zM458 48H54C50.686 48 48 50.678 48 53.992V330.008A5.993 5.993 0 0 0 54 336H188.118L252.118 272H458A6 6 0 0 0 464 266V54A6 6 0 0 0 458 48z" />
|
||||
<glyph glyph-name="frown"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 392C366.532 392 456 302.549 456 192C456 81.468 366.549 -8 256 -8C145.468 -8 56 81.451 56 192C56 302.532 145.451 392 256 392M256 440C119.033 440 8 328.967 8 192S119.033 -56 256 -56S504 55.033 504 192S392.967 440 256 440zM320 304C310.465 304 301.488 301.6140000000001 293.63 297.411H293.647C306.382 297.411 316.706 287.087 316.706 274.352C316.706 261.617 306.382 251.293 293.647 251.293S270.588 261.617 270.588 274.352V274.3690000000001C266.386 266.512 264 257.535 264 248C264 217.072 289.072 192 320 192S376 217.072 376 248S350.928 304 320 304zM192 304C182.465 304 173.488 301.6140000000001 165.63 297.411H165.647C178.382 297.411 188.706 287.087 188.706 274.352C188.706 261.617 178.382 251.293 165.647 251.293C152.912 251.293 142.588 261.617 142.588 274.352V274.3690000000001C138.386 266.512 136 257.535 136 248C136 217.072 161.072 192 192 192S248 217.072 248 248S222.928 304 192 304zM363.5470000000001 102.218C306.952 179.182 205.164 179.283 148.4900000000001 102.2189999999999C129.6700000000001 76.6259999999999 168.3480000000001 48.2009999999999 187.16 73.781C224.671 124.791 287.5250000000001 124.577 324.8770000000001 73.7819999999999C343.3860000000001 48.6099999999999 382.6980000000001 76.1769999999999 363.5470000000001 102.2179999999999z" />
|
||||
<glyph glyph-name="futbol"
|
||||
unicode=""
|
||||
horiz-adv-x="496" d=" M483.8 268.6C449.8 373.4 352.6 440 248.1 440C222.7 440 196.9 436.1 171.4 427.8C41.2 385.5 -30.1 245.6 12.2 115.4C46.2 10.6 143.4 -56 247.9 -56C273.3 -56 299.1 -52.1 324.6 -43.8C454.8 -1.5 526.1 138.4 483.8 268.6zM409.3 74.9L357.1 68.5L313.4000000000001 129.4L337.8 204.6L408.9 226.7L447.8 190.3C447.6 159.6 440.4 129.1999999999999 426.1 101.1C421.4 91.8 415.4 83.3 409.3 74.9zM409.3 310.3L398.9000000000001 257.2L328.2000000000001 235.2L264.0000000000001 281.7V355.5L311.4000000000001 381.7C350.6 368.7 384.8000000000001 343.7 409.3000000000001 310.3zM184.9 381.6L232 355.5V281.7L167.8 235.2L97.2 257.2L87.1 309.7C111.4 343.1 145 368.3 184.9 381.6zM139 68.5L85.9 75C71.5 95.1 48.6 134.6 48.1 190.3L87.1 226.7L158.2 204.5L182.5 130.2000000000001L139 68.5000000000001zM187.2 1.5L164.8 49.6L208.4 111.3H287L331.3 49.6L308.9000000000001 1.5C302.7000000000001 -0.3 251.3000000000001 -18.9 187.2000000000001 1.5z" />
|
||||
<glyph glyph-name="gem"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M464 448H112C108 448 104.2 446 102 442.6L2 295.4C-0.9 291 -0.6 285.2000000000001 2.7 281.2000000000001L278.7 -59.6C283.5 -65.5 292.5 -65.5 297.3 -59.6L573.3 281.2C576.5999999999999 285.3 576.9 291 574 295.4L474.1 442.6C471.8 446 468.1 448 464 448zM444.7 400L508 304H439.6L387.9000000000001 400H444.7000000000001zM242.6 400H333.3L385 304H191L242.6 400zM131.3 400H188.1L136.4 304H68L131.3 400zM88.3 256H139.7L208 96L88.3 256zM191.2 256H384.8L288 12.7L191.2 256zM368 96L436.2 256H487.6L368 96z" />
|
||||
<glyph glyph-name="hand-lizard"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M556.686 157.458L410.328 383.171C397.001 403.728 374.417 416 349.917 416H56C25.121 416 0 390.878 0 360V352C0 307.8880000000001 35.888 272 80 272H276.0420000000001L257.7090000000001 224H144C95.477 224 56 184.523 56 136C56 105.121 81.121 80 112 80H243.552C246.539 80 249.466 79.451 252.249 78.369L352 39.582V-32H576V92.171C576 115.396 569.321 137.972 556.686 157.458zM528 16H400V39.582C400 59.53 387.986 77.09 369.396 84.318L269.645 123.106A71.733 71.733 0 0 1 243.552 128H112C107.589 128 104 131.589 104 136C104 158.056 121.944 176 144 176H257.709C277.476 176 295.495 188.407 302.549 206.873L327.101 271.154C336.097 294.707 318.673 320 293.471 320H80C62.355 320 48 334.355 48 352V360C48 364.411 51.589 368 56 368H349.917C358.083 368 365.61 363.91 370.054 357.058L516.412 131.343A71.84 71.84 0 0 0 528 92.171V16z" />
|
||||
<glyph glyph-name="hand-paper"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M372.57 335.359V346.184C372.57 389.796 332.05 422.875 289.531 411.73C263.902 461.23 195.441 459.18 171.549 410.983C130.269 421.544 89.144 390.055 89.144 346V219.87C69.191 227.297 45.836 224.938 27.061 210.999C-2.294 189.203 -8.733 147.666 12.511 117.846L132.48 -50.569A32 32 0 0 1 158.542 -64.001H381.439C396.343 -64.001 409.274 -53.712 412.621 -39.188L442.805 91.77A203.637 203.637 0 0 1 448 137.436V269C448 309.62 412.477 340.992 372.57 335.359zM399.997 137.437C399.997 125.706 398.663 113.968 396.0320000000001 102.551L368.707 -16H166.787L51.591 145.697C37.152 165.967 66.614 188.473 80.985 168.302L108.113 130.223C117.108 117.597 137.144 123.936 137.144 139.506V346C137.144 371.645 173.715 370.81 173.715 345.309V192C173.715 183.163 180.878 176 189.715 176H196.571C205.408 176 212.571 183.163 212.571 192V381C212.571 406.663 249.142 405.81 249.142 380.309V192C249.142 183.163 256.305 176 265.142 176H271.998C280.835 176 287.998 183.163 287.998 192V346.875C287.998 372.5470000000001 324.568 371.685 324.568 346.184V192C324.568 183.163 331.731 176 340.568 176H347.425C356.262 176 363.425 183.163 363.425 192V268.309C363.425 294.551 399.995 293.949 399.995 269V137.437z" />
|
||||
<glyph glyph-name="hand-peace"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M362.146 256.024C348.4360000000001 277.673 323.385 290.04 297.14 286.365V374C297.14 414.804 264.329 448 223.999 448C183.669 448 150.859 414.804 150.859 374L160 280L141.321 358.85C126.578 397.157 83.85 415.89 46.209 400.7920000000001C8.735 385.762 -9.571 343.0370000000001 5.008 305.15L60.765 160.223C30.208 135.267 16.771 102.414 36.032 68.005L90.885 -29.994C102.625 -50.97 124.73 -64 148.575 -64H354.277C385.021 -64 411.835 -42.56 418.832 -12.203L446.259 106.7960000000001A67.801 67.801 0 0 1 447.988 121.999L448 192C448 236.956 404.737 269.343 362.146 256.024zM399.987 122C399.987 120.512 399.8180000000001 119.023 399.485 117.577L372.058 -1.424C370.08 -10.006 362.768 -16 354.276 -16H148.575C142.089 -16 136.033 -12.379 132.77 -6.551L77.916 91.449C73.359 99.59 75.297 110.117 82.424 115.937L109.071 137.701A16 16 0 0 1 113.883 155.84L49.793 322.389C37.226 355.044 84.37 373.163 96.51 341.611L156.294 186.254A16 16 0 0 1 171.227 176H182.859C191.696 176 198.859 183.163 198.859 192V374C198.859 408.375 249.14 408.43 249.14 374V192C249.14 183.163 256.303 176 265.14 176H271.996C280.833 176 287.996 183.163 287.996 192V220C287.996 245.122 324.563 245.159 324.563 220V192C324.563 183.163 331.726 176 340.563 176H347.419C356.256 176 363.419 183.163 363.419 192C363.419 217.12 399.986 217.16 399.986 192V122z" />
|
||||
<glyph glyph-name="hand-point-down"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M188.8 -64C234.416 -64 272 -26.235 272 19.2V54.847A93.148 93.148 0 0 1 294.064 62.776C316.0700000000001 60.269 339.0420000000001 66.2789999999999 356.855 78.761C409.342 79.9 448 116.159 448 178.701V200C448 260.063 408 298.512 408 327.2V329.879C412.952 335.626 416 343.415 416 351.999V416C416 433.673 403.106 448 387.2 448H156.8C140.894 448 128 433.673 128 416V352C128 343.416 131.048 335.627 136 329.88V327.201C136 320.237 129.807 312.339 112.332 297.0180000000001L112.184 296.889L112.038 296.7580000000001C102.101 287.9020000000001 91.197 278.642 78.785 270.9070000000001C48.537 252.202 0 240.514 0 195.2C0 138.272 35.286 103.2 83.2 103.2C91.226 103.2 98.689 104.014 105.6 105.376V19.2C105.6 -25.899 143.701 -64 188.8 -64zM188.8 -16C170.1 -16 153.6 0.775 153.6 19.2V177.6C136.275 177.6 118.4 151.2000000000001 83.2 151.2000000000001C56.8 151.2000000000001 48 171.8250000000001 48 195.2000000000001C48 203.9940000000001 80.712 215.6450000000001 104.1 230.1260000000001C118.675 239.2000000000001 131.325 249.6500000000001 143.975 260.9250000000001C162.349 277.0340000000001 180.608 294.761 183.571 320.0000000000001H360.3230000000001C364.087 277.2100000000001 400 245.491 400 200V178.701C400 138.177 377.803 121.577 338.675 128.1C330.6740000000001 113.488 304.6960000000001 103.949 285.05 115.175C266.825 95.81 238.669 97.388 224 110.225V19.2C224 0.225 207.775 -16 188.8 -16zM328 384C328 397.255 338.745 408 352 408S376 397.255 376 384S365.255 360 352 360S328 370.745 328 384z" />
|
||||
<glyph glyph-name="hand-point-left"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M0 227.2C0 181.584 37.765 144 83.2 144H118.847A93.148 93.148 0 0 1 126.776 121.936C124.269 99.93 130.279 76.958 142.761 59.145C143.9 6.658 180.159 -32 242.701 -32H264C324.063 -32 362.512 8 391.2 8H393.879C399.626 3.048 407.415 0 415.999 0H479.999C497.672 0 511.999 12.894 511.999 28.8V259.2C511.999 275.106 497.672 288 479.999 288H415.999C407.415 288 399.626 284.952 393.879 280H391.2C384.236 280 376.338 286.193 361.017 303.668L360.888 303.8160000000001L360.757 303.962C351.901 313.899 342.641 324.803 334.906 337.215C316.202 367.463 304.514 416 259.2 416C202.272 416 167.2 380.714 167.2 332.8C167.2 324.774 168.014 317.3110000000001 169.376 310.4H83.2C38.101 310.4 0 272.299 0 227.2zM48 227.2C48 245.9 64.775 262.4 83.2 262.4H241.6C241.6 279.725 215.2 297.6 215.2 332.8C215.2 359.2 235.825 368 259.2000000000001 368C267.9940000000001 368 279.6450000000001 335.288 294.1260000000001 311.9C303.2000000000001 297.325 313.6500000000001 284.675 324.925 272.025C341.034 253.651 358.761 235.392 384 232.429V55.677C341.21 51.913 309.491 16 264 16H242.701C202.177 16 185.577 38.197 192.1 77.325C177.488 85.326 167.949 111.304 179.175 130.95C159.81 149.175 161.388 177.331 174.225 192H83.2C64.225 192 48 208.225 48 227.2zM448 88C461.255 88 472 77.255 472 64S461.255 40 448 40S424 50.745 424 64S434.745 88 448 88z" />
|
||||
<glyph glyph-name="hand-point-right"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M428.8 310.4H342.623A115.52 115.52 0 0 1 344.799 332.8C344.799 380.714 309.727 416 252.799 416C207.485 416 195.797 367.463 177.092 337.216C169.357 324.803 160.098 313.899 151.241 303.963L151.11 303.817L150.981 303.6690000000001C135.662 286.193 127.764 280 120.8 280H118.121C112.374 284.952 104.585 288 96.001 288H32C14.327 288 0 275.106 0 259.2V28.8C0 12.894 14.327 0 32 0H96C104.584 0 112.373 3.048 118.12 8H120.799C149.487 8 187.936 -32 247.999 -32H269.298C331.8400000000001 -32 368.098 6.658 369.238 59.145C381.7200000000001 76.958 387.729 99.93 385.223 121.936A93.148 93.148 0 0 1 393.152 144H428.8C474.235 144 512 181.584 512 227.2C512 272.299 473.899 310.4 428.8 310.4zM428.8 192H337.774C350.611 177.331 352.189 149.175 332.824 130.95C344.051 111.304 334.511 85.326 319.899 77.325C326.423 38.197 309.823 16 269.299 16H248C202.509 16 170.79 51.913 128 55.676V232.429C153.239 235.393 170.966 253.651 187.075 272.025C198.35 284.675 208.8 297.3250000000001 217.874 311.9C232.355 335.288 244.006 368 252.8 368C276.175 368 296.8 359.2 296.8 332.8C296.8 297.6 270.4000000000001 279.725 270.4000000000001 262.4H428.8000000000001C447.2250000000001 262.4 464.0000000000001 245.9 464.0000000000001 227.2C464.0000000000001 208.225 447.7750000000001 192 428.8000000000001 192zM88 64C88 50.745 77.255 40 64 40S40 50.745 40 64S50.745 88 64 88S88 77.255 88 64z" />
|
||||
<glyph glyph-name="hand-point-up"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M105.6 364.8V278.623A115.52 115.52 0 0 1 83.2 280.799C35.286 280.799 0 245.727 0 188.799C0 143.485 48.537 131.797 78.784 113.092C91.197 105.357 102.101 96.098 112.037 87.241L112.183 87.11L112.331 86.981C129.807 71.662 136 63.764 136 56.8V54.121C131.048 48.374 128 40.585 128 32.001V-31.999C128 -49.672 140.894 -63.999 156.8 -63.999H387.2000000000001C403.1060000000001 -63.999 416.0000000000001 -49.672 416.0000000000001 -31.999V32.001C416.0000000000001 40.585 412.9520000000001 48.374 408.0000000000001 54.121V56.8C408.0000000000001 85.488 448.0000000000001 123.937 448.0000000000001 184V205.299C448.0000000000001 267.841 409.3420000000001 304.099 356.8550000000001 305.2390000000001C339.0420000000001 317.721 316.0700000000001 323.73 294.0640000000001 321.224A93.148 93.148 0 0 1 272 329.153V364.8C272 410.235 234.416 448 188.8 448C143.701 448 105.6 409.899 105.6 364.8zM224 364.8V273.774C238.669 286.611 266.825 288.189 285.05 268.824C304.6960000000001 280.0510000000001 330.6740000000001 270.511 338.675 255.899C377.803 262.423 400 245.823 400 205.299V184C400 138.509 364.087 106.79 360.324 64H183.571C180.607 89.239 162.349 106.966 143.975 123.075C131.325 134.35 118.675 144.8 104.1 153.874C80.712 168.355 48 180.006 48 188.8C48 212.175 56.8 232.8 83.2 232.8C118.4 232.8 136.275 206.4 153.6 206.4V364.8C153.6 383.225 170.1 400 188.8 400C207.775 400 224 383.775 224 364.8zM352 24C365.255 24 376 13.255 376 0S365.255 -24 352 -24S328 -13.255 328 0S338.745 24 352 24z" />
|
||||
<glyph glyph-name="hand-pointer"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M358.182 268.639C338.689 293.4070000000001 305.5030000000001 300.584 278.31 287.737C263.183 303.4240000000001 242.128 310.2240000000001 221.715 307.366V381C221.715 417.944 191.979 448 155.429 448S89.143 417.944 89.143 381V219.871C69.234 227.281 45.871 224.965 27.06 210.999C-2.295 189.204 -8.733 147.6660000000001 12.51 117.847L122.209 -36.154C134.632 -53.59 154.741 -64 176 -64H354.286C385.088 -64 411.86 -42.5 418.843 -12.203L446.272 106.7960000000001A67.873 67.873 0 0 1 448 122V206C448 252.844 401.375 285.273 358.182 268.639zM80.985 168.303L108.111 130.224C117.106 117.598 137.142 123.937 137.142 139.507V381C137.142 406.12 173.713 406.16 173.713 381V206C173.713 197.164 180.876 190 189.713 190H196.57C205.407 190 212.57 197.164 212.57 206V241C212.57 266.12 249.141 266.16 249.141 241V206C249.141 197.164 256.304 190 265.141 190H272C280.837 190 288 197.164 288 206V227C288 252.12 324.5710000000001 252.16 324.5710000000001 227V206C324.5710000000001 197.164 331.7340000000001 190 340.5710000000001 190H347.4280000000001C356.2650000000001 190 363.4280000000001 197.164 363.4280000000001 206C363.4280000000001 231.121 399.999 231.16 399.999 206V122C399.999 120.512 399.8300000000001 119.023 399.497 117.577L372.067 -1.424C370.089 -10.006 362.777 -16 354.2850000000001 -16H176C170.231 -16 164.737 -13.122 161.303 -8.303L51.591 145.697C37.185 165.92 66.585 188.515 80.985 168.303zM176.143 48V144C176.143 152.837 182.411 160 190.143 160H196.143C203.875 160 210.143 152.837 210.143 144V48C210.143 39.163 203.875 32 196.143 32H190.143C182.41 32 176.143 39.163 176.143 48zM251.571 48V144C251.571 152.837 257.839 160 265.5710000000001 160H271.5710000000001C279.3030000000001 160 285.5710000000001 152.837 285.5710000000001 144V48C285.5710000000001 39.163 279.3030000000001 32 271.5710000000001 32H265.5710000000001C257.839 32 251.5710000000001 39.163 251.5710000000001 48zM327 48V144C327 152.837 333.268 160 341 160H347C354.7320000000001 160 361 152.837 361 144V48C361 39.163 354.7320000000001 32 347 32H341C333.268 32 327 39.163 327 48z" />
|
||||
<glyph glyph-name="hand-rock"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M408.864 368.948C386.463 402.846 342.756 411.221 310.051 392.536C280.577 424.005 230.906 423.629 201.717 392.558C154.557 419.578 93.007 387.503 91.046 331.752C44.846 342.593 0 307.999 0 260.5710000000001V203.618C0 170.877 14.28 139.664 39.18 117.984L136.89 32.903C141.142 29.201 140 27.33 140 -1e-13C140 -17.6730000000001 154.327 -32.0000000000001 172 -32.0000000000001H424C441.673 -32.0000000000001 456 -17.6730000000001 456 -1e-13C456 23.5129999999999 454.985 30.745 459.982 42.37L502.817 142.026C508.911 156.203 512 171.198 512 186.5939999999999V301.0370000000001C512 353.876 457.686 389.699 408.8640000000001 368.948zM464 186.594A64.505 64.505 0 0 0 458.718 160.981L415.8830000000001 61.326C410.653 49.155 408.0000000000001 36.286 408.0000000000001 23.076V16H188V26.286C188 42.656 180.86 58.263 168.41 69.103L70.7 154.183C56.274 166.745 48 184.764 48 203.619V260.572C48 293.78 100 294.1090000000001 100 259.895V218.667A16 16 0 0 1 105.493 206.6L112.493 200.505A16 16 0 0 1 139 212.571V329.1430000000001C139 362.24 191 362.868 191 328.466V301.7150000000001C191 292.879 198.164 285.7150000000001 207 285.7150000000001H214C222.836 285.7150000000001 230 292.879 230 301.7150000000001V342.858C230 375.992 282 376.533 282 342.181V301.7150000000001C282 292.879 289.163 285.7150000000001 298 285.7150000000001H305C313.837 285.7150000000001 321 292.879 321 301.7150000000001V329.144C321 362.174 373 362.924 373 328.467V301.716C373 292.88 380.163 285.716 389 285.716H396C404.837 285.716 412 292.88 412 301.716C412 334.862 464 335.329 464 301.039V186.5940000000001z" />
|
||||
<glyph glyph-name="hand-scissors"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 -32L326 -31.987C331.114 -31.987 336.231 -31.404 341.203 -30.258L460.202 -2.831C490.56 4.165 512 30.98 512 61.723V267.425C512 291.27 498.97 313.376 477.995 325.115L379.996 379.968C345.587 399.2290000000001 312.733 385.7920000000001 287.778 355.235L142.85 410.992C104.963 425.5710000000001 62.238 407.265 47.208 369.791C32.11 332.149 50.843 289.421 89.15 274.679L168 256L74 265.141C33.196 265.141 0 232.33 0 192.001C0 151.671 33.196 118.86 74 118.86H161.635C157.96 92.615 170.327 67.563 191.976 53.8539999999999C178.657 11.263 211.044 -32 256 -32zM256 16.013C230.84 16.013 230.88 52.58 256 52.58C264.837 52.58 272 59.743 272 68.58V75.436C272 84.273 264.837 91.436 256 91.436H228C202.841 91.436 202.878 128.003 228 128.003H256C264.837 128.003 272 135.166 272 144.003V150.859C272 159.696 264.837 166.859 256 166.859H74C39.57 166.859 39.625 217.14 74 217.14H256C264.837 217.14 272 224.303 272 233.14V244.772A16 16 0 0 1 261.746 259.705L106.389 319.49C74.837 331.63 92.957 378.773 125.611 366.207L292.16 302.116A16.001 16.001 0 0 1 310.299 306.928L332.063 333.5750000000001C337.883 340.702 348.411 342.639 356.551 338.0830000000001L454.551 283.2290000000001C460.379 279.966 464 273.911 464 267.424V61.723C464 53.232 458.006 45.919 449.424 43.941L330.423 16.514A19.743 19.743 0 0 0 326 16.012H256z" />
|
||||
<glyph glyph-name="hand-spock"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M21.096 66.21L150.188 -55.303A32 32 0 0 1 172.12 -64.001H409.7200000000001C423.8900000000001 -64.001 436.3730000000001 -54.682 440.4000000000001 -41.097L472.215 66.216A115.955 115.955 0 0 1 477 99.189V136.028C477 140.079 477.476 144.132 478.414 148.073L510.144 281.4830000000001C520.243 323.8950000000001 487.828 364.221 444.6 364.0080000000001C440.456 388.8640000000001 422.057 411.1730000000001 394.75 418.0000000000001C358.947 426.9520000000001 322.523 405.3450000000001 313.5 369.25L296.599 264L274.924 395.99C266.638 432.06 230.621 454.562 194.62 446.286C165.004 439.4820000000001 144.482 413.897 142.738 384.991C100.101 384.16 69.283 344.428 78.667 303.147L109.707 166.639C82.513 189.154 42.423 186.631 18.225 160.917C-7.151 133.956 -5.873 91.592 21.096 66.21zM53.164 128.021L53.166 128.0219999999999C60.385 135.694 72.407 136.002 80.022 128.8349999999999L133.034 78.9409999999999C143.225 69.351 160 76.6 160 90.594V160.073C160 161.266 159.866 162.456 159.603 163.619L125.473 313.791C119.877 338.408 156.975 346.651 162.527 322.212L192.926 188.4549999999999A16 16 0 0 1 208.529 176.0009999999999H217.1330000000001C227.4090000000001 176.0009999999999 235.0270000000001 185.5679999999999 232.7270000000001 195.5839999999999L191.107 376.7369999999999C185.484 401.2059999999999 222.497 409.813 228.142 385.2449999999999L273.362 188.4169999999999A16 16 0 0 1 288.956 176H302.173A16 16 0 0 1 317.695 188.119L360.067 357.6090000000001C366.171 382.0310000000001 403.029 372.7680000000001 396.932 348.3920000000001L358.805 195.88C356.284 185.792 363.92 176 374.327 176H384.021A16 16 0 0 1 399.586 188.295L426.509 301.4C432.3300000000001 325.848 469.306 317.087 463.475 292.598L431.7200000000001 159.19A100.094 100.094 0 0 1 429 136.028V99.189C429 92.641 428.057 86.138 426.195 79.8610000000001L397.775 -16H178.465L53.978 101.164C46.349 108.344 45.984 120.393 53.164 128.021z" />
|
||||
<glyph glyph-name="handshake"
|
||||
unicode=""
|
||||
horiz-adv-x="640" d=" M616 352H568C560.893 352 554.51 348.909 550.116 344H526.59L495.46 380.3L495.3 380.48A103.974 103.974 0 0 1 417.03 416H370.48C352.73 416 335.58 411.06 320.79 401.99C304.33 411.07 285.67 416 266.62 416H234.51C205.607 416 176.911 404.781 155.31 383.2L116.12 344H89.884C85.49 348.909 79.107 352 72 352H24C10.745 352 0 341.255 0 328V88C0 74.745 10.745 64 24 64H72C82.449 64 91.334 70.68 94.629 80H113.43L188.78 12.43C214.322 -14.02 248.705 -32 285.36 -32C301.75 -32 317.64 -28.15 331.4600000000001 -21.07C356.396 -21.566 382.5610000000001 -10.702 400.5300000000001 10.34C420.2140000000001 15.919 438.033 27.766 451.25 44.9400000000001C472.239 49.3410000000001 491.978 61.4320000000001 504.67 80.0000000000001H545.371C548.6659999999999 70.6800000000001 557.5509999999999 64.0000000000001 568 64.0000000000001H616C629.255 64.0000000000001 640 74.7450000000001 640 88.0000000000001V328C640 341.255 629.255 352 616 352zM48 96C39.163 96 32 103.163 32 112S39.163 128 48 128S64 120.837 64 112S56.837 96 48 96zM460.52 101.76C445.17 87.465 423.636 90.432 420.57 93.76C421.984 80.378 402.313 52.717 371.49 54.88C365.949 36.357 343.272 21.054 320 29.13C311.11 20.24 297.54 16 285.36 16C260.4100000000001 16 237.59 30.54 222.22 46.91L140.92 119.8200000000001A31.975999999999996 31.975999999999996 0 0 1 119.56 128.0000000000001H96V296H122.75C131.23 296 139.37 299.37 145.37 305.37L189.25 349.25A64.004 64.004 0 0 0 234.51 368H266.62C272.42 368 278.13 367.21 283.62 365.7L240.35 315.2100000000001C216.79 287.73 216.51 247.59 239.69 219.77C272.078 180.904 331.068 180.542 364.17 217.79L390.1500000000001 247.87L462.59 152C476.03 137.4 473.54 113.87 460.52 101.76zM544 128H519.542C519.6460000000001 148.261 512.743 167.33 499.78 182.4L421.7 285.7200000000001C426.21 295.23 424.04 306.95 415.69 314.17C405.615 322.861 390.46 321.669 381.83 311.69L328.2 249.57C314.372 234.16 289.977 234.425 276.56 250.5A25.856999999999996 25.856999999999996 0 0 0 276.79 283.9700000000001L334.7100000000001 351.55A47.09 47.09 0 0 0 370.48 368H417.0300000000001C433.1400000000001 368 448.4700000000001 361.06 459.1 348.9600000000001L504.52 296H544V128zM592 96C583.163 96 576 103.163 576 112S583.163 128 592 128S608 120.837 608 112S600.837 96 592 96z" />
|
||||
<glyph glyph-name="hdd"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M567.403 212.358L462.323 363.411A48 48 0 0 1 422.919 384H153.081A48 48 0 0 1 113.677 363.411L8.597 212.358A48.001 48.001 0 0 1 0 184.946V48C0 21.49 21.49 0 48 0H528C554.51 0 576 21.49 576 48V184.946C576 194.747 573 204.312 567.403 212.358zM153.081 336H422.919L500.832 224H75.168L153.081 336zM528 48H48V176H528V48zM496 112C496 94.327 481.673 80 464 80S432 94.327 432 112S446.327 144 464 144S496 129.673 496 112zM400 112C400 94.327 385.673 80 368 80S336 94.327 336 112S350.327 144 368 144S400 129.673 400 112z" />
|
||||
<glyph glyph-name="heart"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M257.3 -27.4L92.5 134.4C85.4 141 24 199.9 24 273.2C24 363.9 80.8 424 176 424C217.4 424 256.6 401.2 288 374.2C319.3 401.2 358.6 424 400 424C491.7 424 552 367.5 552 273.2C552 221.2 520.2 169.7 483.9 134.5L483.5 134.1L318.7 -27.4A43.7 43.7 0 0 0 257.3 -27.4zM125.9 168.9L288 9.7L449.8 168.4C477.1 195.4 504 234.7 504 273.2C504 340.1 465.8 376 400 376C352.8 376 307.2 326.7 288 307.6C271 324.6 224 376 176 376C110.1 376 72 340.1 72 273.2C72 235.9 98.7 194.3 125.9 168.9z" />
|
||||
<glyph glyph-name="hospital"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M128 204V244C128 250.627 133.373 256 140 256H180C186.627 256 192 250.627 192 244V204C192 197.373 186.627 192 180 192H140C133.373 192 128 197.373 128 204zM268 192H308C314.627 192 320 197.373 320 204V244C320 250.627 314.627 256 308 256H268C261.373 256 256 250.627 256 244V204C256 197.373 261.373 192 268 192zM192 108V148C192 154.627 186.627 160 180 160H140C133.373 160 128 154.627 128 148V108C128 101.373 133.373 96 140 96H180C186.627 96 192 101.373 192 108zM268 96H308C314.627 96 320 101.373 320 108V148C320 154.627 314.627 160 308 160H268C261.373 160 256 154.627 256 148V108C256 101.373 261.373 96 268 96zM448 -28V-64H0V-28C0 -21.373 5.373 -16 12 -16H31.5V362.9650000000001C31.5 374.582 42.245 384 55.5 384H144V424C144 437.255 154.745 448 168 448H280C293.255 448 304 437.255 304 424V384H392.5C405.755 384 416.5 374.582 416.5 362.9650000000001V-16H436C442.627 -16 448 -21.373 448 -28zM79.5 -15H192V52C192 58.627 197.373 64 204 64H244C250.627 64 256 58.627 256 52V-15H368.5V336H304V312C304 298.745 293.255 288 280 288H168C154.745 288 144 298.745 144 312V336H79.5V-15zM266 384H240V410A6 6 0 0 1 234 416H214A6 6 0 0 1 208 410V384H182A6 6 0 0 1 176 378V358A6 6 0 0 1 182 352H208V326A6 6 0 0 1 214 320H234A6 6 0 0 1 240 326V352H266A6 6 0 0 1 272 358V378A6 6 0 0 1 266 384z" />
|
||||
<glyph glyph-name="hourglass"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M368 400H372C378.627 400 384 405.373 384 412V436C384 442.627 378.627 448 372 448H12C5.373 448 0 442.627 0 436V412C0 405.373 5.373 400 12 400H16C16 319.4360000000001 48.188 234.193 113.18 192C47.899 149.619 16 64.1 16 -16H12C5.373 -16 0 -21.373 0 -28V-52C0 -58.627 5.373 -64 12 -64H372C378.627 -64 384 -58.627 384 -52V-28C384 -21.373 378.627 -16 372 -16H368C368 64.564 335.812 149.807 270.82 192C336.102 234.381 368 319.9 368 400zM64 400H320C320 298.38 262.693 216 192 216S64 298.379 64 400zM320 -16H64C64 85.62 121.308 168 192 168S320 85.62 320 -16z" />
|
||||
<glyph glyph-name="id-badge"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M0 400V-16C0 -42.51 21.49 -64 48 -64H336C362.51 -64 384 -42.51 384 -16V400C384 426.51 362.51 448 336 448H48C21.49 448 0 426.51 0 400zM336 368V-10A6 6 0 0 0 330 -16H54A6 6 0 0 0 48 -10V368H336zM192 288C230.66 288 262 256.66 262 218S230.66 148 192 148S122 179.34 122 218S153.34 288 192 288zM272.187 141.953L240.987 149.753C208.208 126.176 168.477 131.437 143.013 149.753L111.813 141.953C93.116 137.279 80 120.48 80 101.207V85C80 73.402 89.402 64 101 64H283C294.598 64 304 73.402 304 85V101.207C304 120.48 290.884 137.279 272.187 141.953z" />
|
||||
<glyph glyph-name="id-card"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M404 192H300C293.373 192 288 197.373 288 204V220C288 226.627 293.373 232 300 232H404C410.627 232 416 226.627 416 220V204C416 197.373 410.627 192 404 192zM416 132V148C416 154.627 410.627 160 404 160H300C293.373 160 288 154.627 288 148V132C288 125.373 293.373 120 300 120H404C410.627 120 416 125.373 416 132zM512 336V48C512 21.49 490.51 0 464 0H48C21.49 0 0 21.49 0 48V336C0 362.51 21.49 384 48 384H464C490.51 384 512 362.51 512 336zM464 54V304H48V54A6 6 0 0 1 54 48H458A6 6 0 0 1 464 54zM176 256C203.614 256 226 233.614 226 206S203.614 156 176 156S126 178.386 126 206S148.386 256 176 256zM233.276 151.681L210.991 157.252C187.578 140.411 159.198 144.169 141.01 157.252L118.725 151.681C105.369 148.342 96 136.343 96 122.577V111C96 102.716 102.716 96 111 96H241C249.284 96 256 102.716 256 111V122.577C256 136.343 246.631 148.342 233.276 151.681z" />
|
||||
<glyph glyph-name="image"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M464 384H48C21.49 384 0 362.51 0 336V48C0 21.49 21.49 0 48 0H464C490.51 0 512 21.49 512 48V336C512 362.51 490.51 384 464 384zM458 48H54A6 6 0 0 0 48 54V330A6 6 0 0 0 54 336H458A6 6 0 0 0 464 330V54A6 6 0 0 0 458 48zM128 296C105.909 296 88 278.091 88 256S105.909 216 128 216S168 233.909 168 256S150.091 296 128 296zM96 96H416V176L328.485 263.515C323.7990000000001 268.201 316.201 268.201 311.514 263.515L192 144L152.485 183.515C147.799 188.201 140.201 188.201 135.514 183.515L96 144V96z" />
|
||||
<glyph glyph-name="images"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M480 32V16C480 -10.51 458.51 -32 432 -32H48C21.49 -32 0 -10.51 0 16V272C0 298.51 21.49 320 48 320H64V272H54A6 6 0 0 1 48 266V22A6 6 0 0 1 54 16H426A6 6 0 0 1 432 22V32H480zM522 368H150A6 6 0 0 1 144 362V118A6 6 0 0 1 150 112H522A6 6 0 0 1 528 118V362A6 6 0 0 1 522 368zM528 416C554.51 416 576 394.51 576 368V112C576 85.49 554.51 64 528 64H144C117.49 64 96 85.49 96 112V368C96 394.51 117.49 416 144 416H528zM264 304C264 281.909 246.091 264 224 264S184 281.909 184 304S201.909 344 224 344S264 326.091 264 304zM192 208L231.515 247.515C236.201 252.201 243.799 252.201 248.486 247.515L288 208L391.515 311.515C396.201 316.201 403.799 316.201 408.486 311.515L480 240V160H192V208z" />
|
||||
<glyph glyph-name="keyboard"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M528 384H48C21.49 384 0 362.51 0 336V48C0 21.49 21.49 0 48 0H528C554.51 0 576 21.49 576 48V336C576 362.51 554.51 384 528 384zM536 48C536 43.589 532.411 40 528 40H48C43.589 40 40 43.589 40 48V336C40 340.411 43.589 344 48 344H528C532.411 344 536 340.411 536 336V48zM170 178V206C170 212.627 164.627 218 158 218H130C123.373 218 118 212.627 118 206V178C118 171.373 123.373 166 130 166H158C164.627 166 170 171.373 170 178zM266 178V206C266 212.627 260.627 218 254 218H226C219.373 218 214 212.627 214 206V178C214 171.373 219.373 166 226 166H254C260.627 166 266 171.373 266 178zM362 178V206C362 212.627 356.627 218 350 218H322C315.373 218 310 212.627 310 206V178C310 171.373 315.373 166 322 166H350C356.627 166 362 171.373 362 178zM458 178V206C458 212.627 452.627 218 446 218H418C411.373 218 406 212.627 406 206V178C406 171.373 411.373 166 418 166H446C452.627 166 458 171.373 458 178zM122 96V124C122 130.627 116.627 136 110 136H82C75.373 136 70 130.627 70 124V96C70 89.373 75.373 84 82 84H110C116.627 84 122 89.373 122 96zM506 96V124C506 130.627 500.627 136 494 136H466C459.373 136 454 130.627 454 124V96C454 89.373 459.373 84 466 84H494C500.627 84 506 89.373 506 96zM122 260V288C122 294.627 116.627 300 110 300H82C75.373 300 70 294.627 70 288V260C70 253.373 75.373 248 82 248H110C116.627 248 122 253.373 122 260zM218 260V288C218 294.627 212.627 300 206 300H178C171.373 300 166 294.627 166 288V260C166 253.373 171.373 248 178 248H206C212.627 248 218 253.373 218 260zM314 260V288C314 294.627 308.627 300 302 300H274C267.373 300 262 294.627 262 288V260C262 253.373 267.373 248 274 248H302C308.627 248 314 253.373 314 260zM410 260V288C410 294.627 404.627 300 398 300H370C363.373 300 358 294.627 358 288V260C358 253.373 363.373 248 370 248H398C404.627 248 410 253.373 410 260zM506 260V288C506 294.627 500.627 300 494 300H466C459.373 300 454 294.627 454 288V260C454 253.373 459.373 248 466 248H494C500.627 248 506 253.373 506 260zM408 102V118C408 124.627 402.627 130 396 130H180C173.373 130 168 124.627 168 118V102C168 95.373 173.373 90 180 90H396C402.627 90 408 95.373 408 102z" />
|
||||
<glyph glyph-name="lemon"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M484.112 420.111C455.989 448.233 416.108 456.057 387.0590000000001 439.135C347.604 416.152 223.504 489.111 91.196 356.803C-41.277 224.328 31.923 100.528 8.866 60.942C-8.056 31.891 -0.234 -7.99 27.888 -36.112C56.023 -64.247 95.899 -72.0499999999999 124.945 -55.133C164.368 -32.163 288.502 -105.102 420.803 27.196C553.277 159.673 480.076 283.473 503.134 323.057C520.056 352.1070000000001 512.234 391.988 484.112 420.111zM461.707 347.217C422.907 280.608 507.307 181.582 386.862 61.137C266.422 -59.306 167.387 25.089 100.786 -13.706C78.1069999999999 -26.913 36.751 13.535 50.2929999999999 36.782C89.0929999999999 103.391 4.6929999999999 202.417 125.138 322.862C245.573 443.298 344.616 358.914 411.219 397.708C433.949 410.948 475.224 370.42 461.707 347.217zM291.846 338.481C293.216 327.521 285.442 317.524 274.481 316.154C219.635 309.299 138.702 228.367 131.846 173.519C130.473 162.53 120.447 154.785 109.52 156.154C98.559 157.524 90.785 167.52 92.155 178.48C101.317 251.766 196.322 346.6950000000001 269.5200000000001 355.8450000000001C280.473 357.213 290.4760000000001 349.442 291.8460000000001 338.481z" />
|
||||
<glyph glyph-name="life-ring"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 -56C392.967 -56 504 55.033 504 192S392.967 440 256 440S8 328.967 8 192S119.033 -56 256 -56zM152.602 20.72L206.013 74.131C237.819 60.625 274.141 60.609 305.987 74.131L359.398 20.72C296.1810000000001 -17.599 215.819 -17.599 152.602 20.72zM336 192C336 147.888 300.112 112 256 112S176 147.888 176 192S211.888 272 256 272S336 236.112 336 192zM427.28 88.602L373.869 142.013C387.374 173.819 387.391 210.141 373.869 241.987L427.28 295.398C465.599 232.181 465.599 151.819 427.28 88.602zM359.397 363.28L305.986 309.8690000000001C274.18 323.374 237.858 323.391 206.013 309.8690000000001L152.602 363.28C215.819 401.599 296.1810000000001 401.599 359.397 363.28zM84.72 295.398L138.131 241.987C124.625 210.181 124.609 173.859 138.131 142.013L84.72 88.602C46.401 151.819 46.401 232.181 84.72 295.398z" />
|
||||
<glyph glyph-name="lightbulb"
|
||||
unicode=""
|
||||
horiz-adv-x="384" d=" M272 20V-8C272 -18.449 265.32 -27.334 256 -30.629V-40C256 -53.255 245.255 -64 232 -64H152C138.745 -64 128 -53.255 128 -40V-30.629C118.68 -27.334 112 -18.449 112 -8V20C112 26.627 117.373 32 124 32H260C266.627 32 272 26.627 272 20zM128 272C128 307.29 156.71 336 192 336C200.837 336 208 343.164 208 352S200.837 368 192 368C139.065 368 96 324.935 96 272C96 263.164 103.164 256 112 256S128 263.164 128 272zM192 400C262.734 400 320 342.746 320 272C320 194.398 282.617 211.523 239.02 112H144.98C101.318 211.67 64 194.131 64 272C64 342.735 121.254 400 192 400M192 448C94.805 448 16 369.197 16 272C16 170.269 67.697 180.459 106.516 79.326C110.066 70.077 118.986 64 128.892 64H255.107C265.013 64 273.933 70.078 277.483 79.326C316.303 180.459 368 170.269 368 272C368 369.197 289.195 448 192 448z" />
|
||||
<glyph glyph-name="list-alt"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M464 416H48C21.49 416 0 394.51 0 368V16C0 -10.51 21.49 -32 48 -32H464C490.51 -32 512 -10.51 512 16V368C512 394.51 490.51 416 464 416zM458 16H54A6 6 0 0 0 48 22V362A6 6 0 0 0 54 368H458A6 6 0 0 0 464 362V22A6 6 0 0 0 458 16zM416 108V84C416 77.373 410.627 72 404 72H204C197.373 72 192 77.373 192 84V108C192 114.627 197.373 120 204 120H404C410.627 120 416 114.627 416 108zM416 204V180C416 173.373 410.627 168 404 168H204C197.373 168 192 173.373 192 180V204C192 210.627 197.373 216 204 216H404C410.627 216 416 210.627 416 204zM416 300V276C416 269.373 410.627 264 404 264H204C197.373 264 192 269.373 192 276V300C192 306.627 197.373 312 204 312H404C410.627 312 416 306.627 416 300zM164 288C164 268.118 147.882 252 128 252S92 268.118 92 288S108.118 324 128 324S164 307.882 164 288zM164 192C164 172.118 147.882 156 128 156S92 172.118 92 192S108.118 228 128 228S164 211.882 164 192zM164 96C164 76.118 147.882 60 128 60S92 76.118 92 96S108.118 132 128 132S164 115.882 164 96z" />
|
||||
<glyph glyph-name="map"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M508.505 411.83L381.517 355.424L207.179 413.537A47.992 47.992 0 0 1 172.505 411.863L28.505 347.863A48 48 0 0 1 0 304V16.033C0 -18.905 35.991 -41.831 67.495 -27.83L194.483 28.576L368.822 -29.537A47.992 47.992 0 0 1 403.496 -27.863L547.496 36.137A48 48 0 0 1 576 80V367.967C576 402.905 540.009 425.831 508.505 411.83zM360 24L216 72V360L360 312V24zM48 16V304L168 357.333V69.333L48 16zM528 80L408 26.667V314.6670000000001L528 368V80z" />
|
||||
<glyph glyph-name="meh"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 392C366.532 392 456 302.549 456 192C456 81.468 366.549 -8 256 -8C145.468 -8 56 81.451 56 192C56 302.532 145.451 392 256 392M256 440C119.033 440 8 328.967 8 192S119.033 -56 256 -56S504 55.033 504 192S392.967 440 256 440zM320 304C310.465 304 301.488 301.6140000000001 293.63 297.411H293.647C306.382 297.411 316.706 287.087 316.706 274.352C316.706 261.617 306.382 251.293 293.647 251.293S270.588 261.617 270.588 274.352V274.3690000000001C266.386 266.512 264 257.535 264 248C264 217.072 289.072 192 320 192S376 217.072 376 248S350.928 304 320 304zM192 304C182.465 304 173.488 301.6140000000001 165.63 297.411H165.647C178.382 297.411 188.706 287.087 188.706 274.352C188.706 261.617 178.382 251.293 165.647 251.293C152.912 251.293 142.588 261.617 142.588 274.352V274.3690000000001C138.386 266.512 136 257.535 136 248C136 217.072 161.072 192 192 192S248 217.072 248 248S222.928 304 192 304zM328 120H184C152.224 120 152.251 72 184 72H328C359.776 72 359.749 120 328 120z" />
|
||||
<glyph glyph-name="minus-square"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M108 164C101.4 164 96 169.4 96 176V208C96 214.6 101.4 220 108 220H340C346.6 220 352 214.6 352 208V176C352 169.4 346.6 164 340 164H108zM448 368V16C448 -10.5 426.5 -32 400 -32H48C21.5 -32 0 -10.5 0 16V368C0 394.5 21.5 416 48 416H400C426.5 416 448 394.5 448 368zM400 22V362C400 365.3 397.3 368 394 368H54C50.7 368 48 365.3 48 362V22C48 18.7 50.7 16 54 16H394C397.3 16 400 18.7 400 22z" />
|
||||
<glyph glyph-name="money-bill-alt"
|
||||
unicode=""
|
||||
horiz-adv-x="640" d=" M320 304C266.979 304 224 253.857 224 192C224 130.153 266.977 80 320 80C373 80 416 130.13 416 192C416 253.857 373.021 304 320 304zM368 139.572C368 132.095 364.0830000000001 128 356.428 128H289.135C281.479 128 277.562 132.095 277.562 139.572V148.473C277.562 155.95 281.479 160.045 289.135 160.045H304.266V199.923C304.266 205.086 304.8 210.426 304.8 210.426H304.444S302.665 207.756 301.596 206.688C297.1449999999999 202.415 291.092 202.237 285.93 207.756L280.412 213.987C275.07 219.328 275.428 225.203 280.946 230.366L302.666 250.305C307.115 254.4 311.032 256.002 317.086 256.002H329.191C336.847 256.002 340.941 252.086 340.941 244.43V160.046H356.429C364.084 160.046 368.001 155.952 368.001 148.474V139.572zM616 384H24C10.745 384 0 373.255 0 360V25C0 11.745 10.745 1 24 1H616C629.255 1 640 11.745 640 25V360C640 373.255 629.255 384 616 384zM512 48H128C128 92.183 92.183 128 48 128V256C92.183 256 128 291.817 128 336H512C512 291.817 547.817 256 592 256V128C547.817 128 512 92.183 512 48z" />
|
||||
<glyph glyph-name="moon"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M279.135 -64C357.891 -64 430.117 -28.196 477.979 30.775C506.249 65.606 475.421 116.497 431.73 108.176C349.382 92.493 273.458 155.444 273.458 238.968C273.458 287.392 299.518 331.26 340.892 354.804C379.637 376.854 369.891 435.592 325.87 443.723A257.936 257.936 0 0 1 279.135 448C137.775 448 23.135 333.425 23.135 192C23.135 50.64 137.711 -64 279.135 -64zM279.135 400C292.12 400 304.824 398.799 317.151 396.522C262.391 365.359 225.4580000000001 306.48 225.4580000000001 238.968C225.4580000000001 125.12 329.0990000000001 39.768 440.7100000000001 61.024C402.574 14.036 344.366 -16 279.135 -16C164.26 -16 71.135 77.125 71.135 192S164.26 400 279.135 400z" />
|
||||
<glyph glyph-name="newspaper"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M552 384H112C91.142 384 73.357 370.623 66.752 352H24C10.745 352 0 341.255 0 328V56C0 25.072 25.072 0 56 0H552C565.255 0 576 10.745 576 24V360C576 373.255 565.255 384 552 384zM48 56V304H64V56C64 51.589 60.411 48 56 48S48 51.589 48 56zM528 48H111.422C111.796 50.614 112 53.283 112 56V336H528V48zM172 168H308C314.627 168 320 173.373 320 180V276C320 282.627 314.627 288 308 288H172C165.373 288 160 282.627 160 276V180C160 173.373 165.373 168 172 168zM200 248H280V208H200V248zM160 108V132C160 138.627 165.373 144 172 144H308C314.627 144 320 138.627 320 132V108C320 101.373 314.627 96 308 96H172C165.373 96 160 101.373 160 108zM352 108V132C352 138.627 357.373 144 364 144H468C474.627 144 480 138.627 480 132V108C480 101.373 474.627 96 468 96H364C357.373 96 352 101.373 352 108zM352 252V276C352 282.627 357.373 288 364 288H468C474.627 288 480 282.627 480 276V252C480 245.373 474.627 240 468 240H364C357.373 240 352 245.373 352 252zM352 180V204C352 210.627 357.373 216 364 216H468C474.627 216 480 210.627 480 204V180C480 173.373 474.627 168 468 168H364C357.373 168 352 173.373 352 180z" />
|
||||
<glyph glyph-name="object-group"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M500 320C506.627 320 512 325.373 512 332V404C512 410.627 506.627 416 500 416H428C421.373 416 416 410.627 416 404V392H96V404C96 410.627 90.627 416 84 416H12C5.373 416 0 410.627 0 404V332C0 325.373 5.373 320 12 320H24V64H12C5.373 64 0 58.627 0 52V-20C0 -26.627 5.373 -32 12 -32H84C90.627 -32 96 -26.627 96 -20V-8H416V-20C416 -26.627 421.373 -32 428 -32H500C506.627 -32 512 -26.627 512 -20V52C512 58.627 506.627 64 500 64H488V320H500zM448 384H480V352H448V384zM32 384H64V352H32V384zM64 0H32V32H64V0zM480 0H448V32H480V0zM440 64H428C421.373 64 416 58.627 416 52V40H96V52C96 58.627 90.627 64 84 64H72V320H84C90.627 320 96 325.373 96 332V344H416V332C416 325.373 421.373 320 428 320H440V64zM404 256H320V308C320 314.628 314.627 320 308 320H108C101.373 320 96 314.628 96 308V140C96 133.372 101.373 128 108 128H192V76C192 69.372 197.373 64 204 64H404C410.627 64 416 69.372 416 76V244C416 250.628 410.627 256 404 256zM136 280H280V168H136V280zM376 104H232V128H308C314.627 128 320 133.372 320 140V216H376V104z" />
|
||||
<glyph glyph-name="object-ungroup"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M564 224C570.627 224 576 229.373 576 236V308C576 314.627 570.627 320 564 320H492C485.373 320 480 314.627 480 308V296H392V320H404C410.627 320 416 325.373 416 332V404C416 410.627 410.627 416 404 416H332C325.373 416 320 410.627 320 404V392H96V404C96 410.627 90.627 416 84 416H12C5.373 416 0 410.627 0 404V332C0 325.373 5.373 320 12 320H24V160H12C5.373 160 0 154.627 0 148V76C0 69.373 5.373 64 12 64H84C90.627 64 96 69.373 96 76V88H184V64H172C165.373 64 160 58.627 160 52V-20C160 -26.627 165.373 -32 172 -32H244C250.627 -32 256 -26.627 256 -20V-8H480V-20C480 -26.627 485.373 -32 492 -32H564C570.627 -32 576 -26.627 576 -20V52C576 58.627 570.627 64 564 64H552V224H564zM352 384H384V352H352V384zM352 128H384V96H352V128zM64 96H32V128H64V96zM64 352H32V384H64V352zM96 136V148C96 154.627 90.627 160 84 160H72V320H84C90.627 320 96 325.373 96 332V344H320V332C320 325.373 325.373 320 332 320H344V160H332C325.373 160 320 154.627 320 148V136H96zM224 0H192V32H224V0zM504 64H492C485.373 64 480 58.627 480 52V40H256V52C256 58.627 250.627 64 244 64H232V88H320V76C320 69.373 325.373 64 332 64H404C410.627 64 416 69.373 416 76V148C416 154.627 410.627 160 404 160H392V248H480V236C480 229.373 485.373 224 492 224H504V64zM544 0H512V32H544V0zM544 256H512V288H544V256z" />
|
||||
<glyph glyph-name="paper-plane"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M440 441.5L24 201.6C-10.4 181.7 -7.1 130.8 29.7 115.7L144 68.4V-16C144 -62.4 203.2 -81.5 230.6 -44.6L274.4 14.5L386.3 -31.7C392.2 -34.1 398.4 -35.3 404.6 -35.3C412.8 -35.3 420.9 -33.2 428.2 -29.1C441 -21.9 449.8 -9.1 452.1 5.4L511.4999999999999 392.6C517.5999999999999 432.7 474.6 461.4 440 441.5zM192 -16V48.6L228.6 33.5L192 -16zM404.6 12.7L250.8 76.2L391 278.5C401.7 294 381.5 312 367.3 299.7L155.8 115.4L48 160L464 400L404.6 12.7z" />
|
||||
<glyph glyph-name="pause-circle"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119 440 8 329 8 192S119 -56 256 -56S504 55 504 192S393 440 256 440zM256 -8C145.5 -8 56 81.5 56 192S145.5 392 256 392S456 302.5 456 192S366.5 -8 256 -8zM352 272V112C352 103.2 344.8 96 336 96H288C279.2 96 272 103.2 272 112V272C272 280.8 279.2 288 288 288H336C344.8 288 352 280.8 352 272zM240 272V112C240 103.2 232.8 96 224 96H176C167.2 96 160 103.2 160 112V272C160 280.8 167.2 288 176 288H224C232.8 288 240 280.8 240 272z" />
|
||||
<glyph glyph-name="play-circle"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M371.7 210L195.7 317C179.9 325.8 160 314.5 160 296V88C160 69.6 179.8 58.2 195.7 67L371.7 168C388.1 177.1 388.1 200.8 371.7 210zM504 192C504 329 393 440 256 440S8 329 8 192S119 -56 256 -56S504 55 504 192zM56 192C56 302.5 145.5 392 256 392S456 302.5 456 192S366.5 -8 256 -8S56 81.5 56 192z" />
|
||||
<glyph glyph-name="plus-square"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M352 208V176C352 169.4 346.6 164 340 164H252V76C252 69.4 246.6 64 240 64H208C201.4 64 196 69.4 196 76V164H108C101.4 164 96 169.4 96 176V208C96 214.6 101.4 220 108 220H196V308C196 314.6 201.4 320 208 320H240C246.6 320 252 314.6 252 308V220H340C346.6 220 352 214.6 352 208zM448 368V16C448 -10.5 426.5 -32 400 -32H48C21.5 -32 0 -10.5 0 16V368C0 394.5 21.5 416 48 416H400C426.5 416 448 394.5 448 368zM400 22V362C400 365.3 397.3 368 394 368H54C50.7 368 48 365.3 48 362V22C48 18.7 50.7 16 54 16H394C397.3 16 400 18.7 400 22z" />
|
||||
<glyph glyph-name="question-circle"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119.043 440 8 328.9170000000001 8 192C8 55.003 119.043 -56 256 -56S504 55.003 504 192C504 328.9170000000001 392.957 440 256 440zM256 -8C145.468 -8 56 81.431 56 192C56 302.495 145.472 392 256 392C366.491 392 456 302.529 456 192C456 81.47 366.569 -8 256 -8zM363.2440000000001 247.2C363.2440000000001 180.148 290.8230000000001 179.116 290.8230000000001 154.337V148C290.8230000000001 141.373 285.4500000000001 136 278.8230000000001 136H233.1760000000001C226.5490000000001 136 221.1760000000001 141.373 221.1760000000001 148V156.659C221.1760000000001 192.404 248.2760000000001 206.693 268.7550000000001 218.175C286.3160000000001 228.02 297.0790000000001 234.716 297.0790000000001 247.754C297.0790000000001 265 275.0800000000001 276.447 257.2950000000001 276.447C234.1060000000001 276.447 223.4010000000001 265.4700000000001 208.3530000000001 246.478C204.2960000000001 241.358 196.8930000000001 240.407 191.6870000000001 244.354L163.8630000000001 265.452C158.7560000000001 269.324 157.6120000000001 276.5180000000001 161.2190000000001 281.815C184.846 316.509 214.94 336 261.794 336C310.865 336 363.244 297.6960000000001 363.244 247.2zM298 80C298 56.841 279.159 38 256 38S214 56.841 214 80S232.841 122 256 122S298 103.159 298 80z" />
|
||||
<glyph glyph-name="registered"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119.033 440 8 328.967 8 192S119.033 -56 256 -56S504 55.033 504 192S392.967 440 256 440zM256 -8C145.468 -8 56 81.451 56 192C56 302.531 145.451 392 256 392C366.532 392 456 302.549 456 192C456 81.468 366.549 -8 256 -8zM366.442 73.791C313.396 170.075 316.192 165.259 313.171 169.876C337.438 183.755 352.653 211.439 352.653 243.052C352.653 295.555 322.406 328.304 251.1550000000001 328.304H172.488C165.8710000000001 328.304 160.488 322.921 160.488 316.304V68C160.488 61.383 165.8710000000001 56 172.488 56H211.0560000000001C217.673 56 223.0560000000001 61.383 223.0560000000001 68V151.663H255.0140000000001L302.5290000000001 62.36A11.98 11.98 0 0 1 313.1220000000001 56H355.9320000000001C365.0720000000001 56 370.8460000000001 65.799 366.4420000000001 73.791zM256.933 208.094H223.058V272.234H250.435C282.852 272.234 289.3640000000001 260.101 289.3640000000001 240.525C289.3630000000001 219.612 277.846 208.094 256.9330000000001 208.094z" />
|
||||
<glyph glyph-name="save"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M433.941 318.059L350.059 401.9410000000001A48 48 0 0 1 316.118 416H48C21.49 416 0 394.51 0 368V16C0 -10.51 21.49 -32 48 -32H400C426.51 -32 448 -10.51 448 16V284.118A48 48 0 0 1 433.941 318.059zM272 368V288H144V368H272zM394 16H54A6 6 0 0 0 48 22V362A6 6 0 0 0 54 368H96V264C96 250.745 106.745 240 120 240H296C309.255 240 320 250.745 320 264V364.118L398.243 285.875A6 6 0 0 0 400 281.632V22A6 6 0 0 0 394 16zM224 216C175.477 216 136 176.523 136 128S175.477 40 224 40S312 79.477 312 128S272.523 216 224 216zM224 88C201.944 88 184 105.944 184 128S201.944 168 224 168S264 150.056 264 128S246.056 88 224 88z" />
|
||||
<glyph glyph-name="share-square"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M561.938 289.94L417.94 433.908C387.926 463.922 336 442.903 336 399.968V342.77C293.55 340.89 251.97 336.2200000000001 215.24 324.7800000000001C180.07 313.8300000000001 152.17 297.2000000000001 132.33 275.36C108.22 248.8 96 215.4 96 176.06C96 114.363 129.178 63.605 180.87 31.3C218.416 7.792 266.118 43.951 251.89 87.04C236.375 134.159 234.734 157.963 336 165.8V112C336 69.007 387.968 48.087 417.94 78.06L561.938 222.06C580.688 240.8 580.688 271.2 561.938 289.94zM384 112V215.84C255.309 213.918 166.492 192.65 206.31 72C176.79 90.45 144 123.92 144 176.06C144 285.394 273.14 295.007 384 295.91V400L528 256L384 112zM408.74 27.507A82.658 82.658 0 0 1 429.714 36.81C437.69 41.762 448 35.984 448 26.596V-16C448 -42.51 426.51 -64 400 -64H48C21.49 -64 0 -42.51 0 -16V336C0 362.51 21.49 384 48 384H180C186.627 384 192 378.627 192 372V367.514C192 362.597 189.013 358.145 184.431 356.362C170.729 351.031 158.035 344.825 146.381 337.777A12.138 12.138 0 0 0 140.101 336H54A6 6 0 0 1 48 330V-10A6 6 0 0 1 54 -16H394A6 6 0 0 1 400 -10V15.966C400 21.336 403.579 26.025 408.74 27.507z" />
|
||||
<glyph glyph-name="smile"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 392C366.532 392 456 302.549 456 192C456 81.468 366.549 -8 256 -8C145.468 -8 56 81.451 56 192C56 302.532 145.451 392 256 392M256 440C119.033 440 8 328.967 8 192S119.033 -56 256 -56S504 55.033 504 192S392.967 440 256 440zM320 304C310.465 304 301.488 301.6140000000001 293.63 297.411H293.647C306.382 297.411 316.706 287.087 316.706 274.352C316.706 261.617 306.382 251.293 293.647 251.293S270.588 261.617 270.588 274.352V274.3690000000001C266.386 266.512 264 257.535 264 248C264 217.072 289.072 192 320 192S376 217.072 376 248S350.928 304 320 304zM192 304C182.465 304 173.488 301.6140000000001 165.63 297.411H165.647C178.382 297.411 188.706 287.087 188.706 274.352C188.706 261.617 178.382 251.293 165.647 251.293C152.912 251.293 142.588 261.617 142.588 274.352V274.3690000000001C138.386 266.512 136 257.535 136 248C136 217.072 161.072 192 192 192S248 217.072 248 248S222.928 304 192 304zM387.372 121.781C406.1910000000001 147.373 367.516 175.798 348.702 150.219C298.567 82.042 213.473 82.039 163.335 150.219C144.507 175.82 105.857 147.358 124.665 121.781C193.963 27.55 317.988 27.43 387.372 121.781z" />
|
||||
<glyph glyph-name="snowflake"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M438.237 92.073L371.663 130.613L431.111 140.94C436.957 142.315 441.72 146.123 444.569 151.07C447.0490000000001 155.377 448.075 160.548 447.093 165.721C444.983 176.836 434.4070000000001 183.76 423.4720000000001 181.188L338.0490000000001 150.073L255.914 192L338.05 233.926L423.473 202.811C434.409 200.239 444.985 207.163 447.094 218.278C449.205 229.393 442.048 240.487 431.113 243.059L371.665 253.386L438.238 291.926C447.778 297.449 450.853 310.018 445.105 320C439.357 329.982 426.965 333.596 417.425 328.074L350.851 289.534L371.656 346.3210000000001C374.902 357.103 368.898 368.863 358.243 372.589C347.589 376.314 336.3209999999999 370.592 333.075 359.81L317.2369999999999 270.075L244.8139999999999 228.149V312L314.3989999999999 370.621C322.0879999999999 378.831 321.3959999999999 391.4770000000001 312.8509999999999 398.866C304.3059999999999 406.257 291.1459999999999 405.589 283.4569999999999 397.38L244.8129999999999 350.92V428C244.8129999999999 439.046 235.4949999999999 448 223.9999999999999 448S203.1869999999999 439.046 203.1869999999999 428V350.92L164.5429999999999 397.38C156.8539999999999 405.5900000000001 143.6939999999999 406.256 135.1489999999999 398.866C126.6049999999999 391.477 125.9129999999999 378.831 133.6019999999999 370.621L203.187 312V228.147L130.764 270.073L114.926 359.809C111.679 370.591 100.411 376.313 89.757 372.588C79.101 368.863 73.098 357.102 76.344 346.32L97.149 289.533L30.576 328.073C21.036 333.596 8.643 329.981 2.896 319.999S0.223 297.448 9.763 291.925L76.337 253.385L16.888 243.057C5.953 240.485 -1.202 229.391 0.907 218.276C3.017 207.162 13.593 200.238 24.529 202.81L109.951 233.925L192.086 192L109.95 150.074L24.527 181.189C13.591 183.761 3.016 176.8370000000001 0.905 165.723C-1.204 154.61 5.951 143.514 16.886 140.942L76.335 130.614L9.761 92.074C0.223 86.551 -2.852 73.982 2.896 64S21.036 50.403 30.576 55.926L97.15 94.466L76.345 37.68C74.61 31.916 75.517 25.875 78.365 20.929C80.845 16.622 84.798 13.145 89.757 11.412C100.412 7.687 111.68 13.409 114.926 24.191L130.764 113.927L203.187 155.853V72L133.602 13.379C125.912 5.169 126.605 -7.476 135.149 -14.866C143.693 -22.254 156.854 -21.589 164.543 -13.379L203.187 33.081V-44C203.187 -55.046 212.505 -64 224 -64S244.813 -55.046 244.813 -44V33.081L283.457 -13.379C287.568 -17.768 293.2389999999999 -19.9999999999999 298.935 -19.9999999999999C303.8949999999999 -19.9999999999999 308.874 -18.3059999999999 312.851 -14.8659999999999C321.396 -7.4759999999999 322.088 5.1690000000001 314.399 13.3790000000001L244.813 72V155.853L317.236 113.927L333.074 24.191C336.32 13.409 347.588 7.687 358.242 11.412C368.8950000000001 15.138 374.901 26.8990000000001 371.654 37.6800000000001L350.849 94.467L417.423 55.927C426.963 50.404 439.356 54.019 445.103 64.001C450.852 73.982 447.778 86.5510000000001 438.237 92.073z" />
|
||||
<glyph glyph-name="square"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M400 416H48C21.5 416 0 394.5 0 368V16C0 -10.5 21.5 -32 48 -32H400C426.5 -32 448 -10.5 448 16V368C448 394.5 426.5 416 400 416zM394 16H54C50.7 16 48 18.7 48 22V362C48 365.3 50.7 368 54 368H394C397.3 368 400 365.3 400 362V22C400 18.7 397.3 16 394 16z" />
|
||||
<glyph glyph-name="star-half"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M288 62.7L163.7 -2.7L187.4 135.6999999999999L86.8 233.7L225.8 253.8999999999999L288 379.8999999999999V448C276.6 448 265.2 442.1 259.3 430.2L194 297.8L47.9 276.6C21.7 272.8 11.2 240.5 30.2 222L135.9 119L110.9 -26.5C106.4 -52.6 133.9 -72.5 157.3 -60.2L288 8.4V62.7z" />
|
||||
<glyph glyph-name="star"
|
||||
unicode=""
|
||||
horiz-adv-x="576" d=" M528.1 276.5L382 297.8L316.7 430.2C305 453.8 271.1 454.1 259.3 430.2L194 297.8L47.9 276.5C21.7 272.7 11.2 240.4 30.2 221.9L135.9 118.9L110.9 -26.6C106.4 -52.9 134.1 -72.6 157.3 -60.3L288 8.4L418.7 -60.3C441.9 -72.5 469.6 -52.9 465.1 -26.6L440.1 118.9L545.8 221.9C564.8 240.4 554.3 272.7 528.0999999999999 276.5zM388.6 135.7L412.3 -2.7L288 62.6L163.7 -2.7L187.4 135.7000000000001L86.8 233.7000000000001L225.8 253.9000000000001L288 379.9000000000001L350.2 253.9000000000001L489.2 233.7000000000001L388.6 135.7000000000001z" />
|
||||
<glyph glyph-name="sticky-note"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M448 99.894V368C448 394.51 426.51 416 400 416H48C21.49 416 0 394.51 0 368V16.012C0 -10.498 21.49 -31.988 48 -31.988H316.118A48 48 0 0 1 350.059 -17.929L433.941 65.953A48 48 0 0 1 448 99.894zM320 19.894V96.012H396.118L320 19.894zM400 368V144.012H296C282.745 144.012 272 133.267 272 120.012V16.012H48V368H400z" />
|
||||
<glyph glyph-name="stop-circle"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M504 192C504 329 393 440 256 440S8 329 8 192S119 -56 256 -56S504 55 504 192zM56 192C56 302.5 145.5 392 256 392S456 302.5 456 192S366.5 -8 256 -8S56 81.5 56 192zM352 272V112C352 103.2 344.8 96 336 96H176C167.2 96 160 103.2 160 112V272C160 280.8 167.2 288 176 288H336C344.8 288 352 280.8 352 272z" />
|
||||
<glyph glyph-name="sun"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M220.116 -39.936L199.903 9.489A3.9920000000000004 3.9920000000000004 0 0 1 194.095 11.3750000000001L148.691 -16.7289999999999C119.225 -34.9689999999999 82.396 -8.2099999999999 90.637 25.45L103.336 77.3150000000001A3.9930000000000003 3.9930000000000003 0 0 1 99.746 82.256L46.495 86.2070000000001C11.941 88.7690000000001 -2.137 132.0620000000001 24.321 154.4540000000001L65.08 188.95A3.9920000000000004 3.9920000000000004 0 0 1 65.08 195.056L24.32 229.553C-2.13 251.937 11.93 295.235 46.494 297.799L99.745 301.75A3.9930000000000003 3.9930000000000003 0 0 1 103.335 306.691L90.637 358.557C82.398 392.213 119.218 418.977 148.691 400.736L194.094 372.632A3.9930000000000003 3.9930000000000003 0 0 1 199.902 374.519L220.115 423.944C233.231 456.015 278.753 456.025 291.873 423.944L312.085 374.52A3.9939999999999998 3.9939999999999998 0 0 1 317.894 372.6330000000001L363.2970000000001 400.737C392.761 418.973 429.5940000000001 392.224 421.351 358.558L408.652 306.693A3.9950000000000006 3.9950000000000006 0 0 1 412.242 301.752L465.4929999999999 297.8010000000001C500.0459999999999 295.2380000000001 514.126 251.947 487.6679999999999 229.555L446.908 195.058A3.9930000000000003 3.9930000000000003 0 0 1 446.908 188.951L487.6679999999999 154.455C514.179 132.014 499.99 88.766 465.4929999999999 86.208L412.242 82.257A3.9930000000000003 3.9930000000000003 0 0 1 408.653 77.3149999999999L421.351 25.451C429.592 -8.207 392.7679999999999 -34.97 363.2969999999999 -16.729L317.8939999999999 11.3749999999999A3.9939999999999998 3.9939999999999998 0 0 1 312.0849999999999 9.4879999999999L291.8729999999999 -39.936C278.7139999999999 -72.114 233.1979999999999 -71.9290000000001 220.1159999999999 -39.936zM236.93 24.632L255.994 -21.984L275.058 24.631C285.366 49.831 315.836 59.697 338.95 45.39L381.772 18.883L369.796 67.802C363.321 94.246 382.176 120.141 409.283 122.151L459.509 125.877L421.065 158.413C400.283 176.004 400.318 208.034 421.066 225.593L459.508 258.129L409.283 261.856C382.132 263.871 363.333 289.8040000000001 369.795 316.2050000000001L381.773 365.124L338.95 338.617C315.799 324.29 285.347 334.217 275.058 359.377L255.994 405.992L236.93 359.375C226.625 334.177 196.152 324.3090000000001 173.039 338.615L130.216 365.123L142.193 316.2050000000001C148.667 289.759 129.812 263.867 102.705 261.855L52.481 258.129L90.924 225.592C111.706 208.004 111.671 175.973 90.924 158.414L52.48 125.877L102.706 122.151C129.857 120.137 148.656 94.204 142.193 67.802L130.216 18.883L173.039 45.39C196.227 59.7450000000001 226.661 49.742 236.93 24.6320000000001zM256 64C185.42 64 128 121.421 128 192C128 262.58 185.42 320 256 320C326.579 320 384 262.58 384 192C384 121.421 326.579 64 256 64zM256 272C211.888 272 176 236.112 176 192S211.888 112 256 112S336 147.888 336 192S300.112 272 256 272z" />
|
||||
<glyph glyph-name="thumbs-down"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M466.27 222.69C470.944 245.337 467.134 267.228 457.28 285.68C460.238 309.548 453.259 334.245 439.94 352.67C438.986 408.577 404.117 448 327 448C320 448 312 447.99 304.78 447.99C201.195 447.99 168.997 408 128 408H117.155C111.515 412.975 104.113 416 96 416H32C14.327 416 0 401.673 0 384V144C0 126.327 14.327 112 32 112H96C107.842 112 118.175 118.438 123.708 128H130.76C149.906 111.047 176.773 67.347 199.52 44.6C213.187 30.9330000000001 209.673 -64 271.28 -64C328.86 -64 366.55 -32.064 366.55 40.73C366.55 59.14 362.62 74.46 357.7 87.27H394.18C442.782 87.27 479.9999999999999 128.835 479.9999999999999 172.85C479.9999999999999 192 475.04 207.84 466.2699999999999 222.69zM64 152C50.745 152 40 162.745 40 176S50.745 200 64 200S88 189.255 88 176S77.255 152 64 152zM394.18 135.27H290.19C290.19 97.45 318.55 79.9 318.55 40.73C318.55 16.98 318.55 -16.0000000000001 271.2800000000001 -16.0000000000001C252.3700000000001 2.91 261.8200000000001 50.18 233.4600000000001 78.54C206.9 105.11 167.28 176 138.92 176H128V362.17C181.611 362.17 228.001 399.99 299.64 399.99H337.46C372.972 399.99 398.28 382.87 390.58 334.0900000000001C405.78 325.93 417.08 297.65 404.52 276.52C426.101 256.136 423.219 225.455 409.73 210.9C419.18 210.9 432.09 191.99 432 173.09C431.91 154.18 415.29 135.2700000000001 394.18 135.2700000000001z" />
|
||||
<glyph glyph-name="thumbs-up"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M466.27 161.31C475.04 176.16 480 192 480 211.15C480 255.165 442.782 296.73 394.18 296.73H357.7C362.62 309.54 366.55 324.86 366.55 343.27C366.55 416.064 328.86 448 271.28 448C209.673 448 213.187 353.067 199.52 339.4C176.773 316.653 149.905 272.953 130.76 256H32C14.327 256 0 241.673 0 224V-16C0 -33.673 14.327 -48 32 -48H96C110.893 -48 123.408 -37.826 126.978 -24.05C171.487 -25.051 202.038 -63.99 304.78 -63.99C312 -63.99 320 -64 327 -64C404.117 -64 438.986 -24.577 439.94 31.33C453.259 49.755 460.239 74.452 457.28 98.32C467.134 116.772 470.944 138.663 466.27 161.31zM404.52 107.48C417.08 86.35 405.78 58.0700000000001 390.58 49.91C398.28 1.13 372.972 -15.99 337.46 -15.99H299.64C228.001 -15.99 181.611 21.83 128 21.83V208H138.92C167.28 208 206.9 278.89 233.46 305.46C261.82 333.82 252.37 381.09 271.28 400C318.55 400 318.55 367.02 318.55 343.27C318.55 304.1 290.19 286.55 290.19 248.73H394.18C415.29 248.73 431.91 229.82 432 210.91C432.0899999999999 192.01 419.18 173.1 409.73 173.1C423.219 158.545 426.101 127.864 404.52 107.48zM88 16C88 2.745 77.255 -8 64 -8S40 2.745 40 16S50.745 40 64 40S88 29.255 88 16z" />
|
||||
<glyph glyph-name="times-circle"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119 440 8 329 8 192S119 -56 256 -56S504 55 504 192S393 440 256 440zM256 -8C145.5 -8 56 81.5 56 192S145.5 392 256 392S456 302.5 456 192S366.5 -8 256 -8zM357.8 254.2L295.6 192L357.8 129.8C362.5 125.1 362.5 117.5 357.8 112.8L335.2 90.2C330.5 85.5 322.9 85.5 318.2 90.2L256 152.4L193.8 90.2C189.1 85.5 181.5 85.5 176.8 90.2L154.2 112.8C149.5 117.5 149.5 125.1 154.2 129.8L216.4 192L154.2000000000001 254.2C149.5000000000001 258.9 149.5000000000001 266.5 154.2000000000001 271.2L176.8000000000001 293.8C181.5 298.5 189.1000000000001 298.5 193.8000000000001 293.8L256.0000000000001 231.6L318.2000000000001 293.8C322.9000000000001 298.5 330.5000000000001 298.5 335.2000000000001 293.8L357.8000000000001 271.2C362.5000000000001 266.5 362.5000000000001 258.9 357.8000000000001 254.2z" />
|
||||
<glyph glyph-name="trash-alt"
|
||||
unicode=""
|
||||
horiz-adv-x="448" d=" M192 260V44C192 37.373 186.627 32 180 32H156C149.373 32 144 37.373 144 44V260C144 266.627 149.373 272 156 272H180C186.627 272 192 266.627 192 260zM292 272H268C261.373 272 256 266.627 256 260V44C256 37.373 261.373 32 268 32H292C298.627 32 304 37.373 304 44V260C304 266.627 298.627 272 292 272zM424 368C437.255 368 448 357.255 448 344V332C448 325.373 442.627 320 436 320H416V-16C416 -42.51 394.51 -64 368 -64H80C53.49 -64 32 -42.51 32 -16V320H12C5.373 320 0 325.373 0 332V344C0 357.255 10.745 368 24 368H98.411L132.429 424.6960000000001A48 48 0 0 0 173.589 448H274.412A48 48 0 0 0 315.572 424.6960000000001L349.589 368H424zM154.389 368H293.612L276.1600000000001 397.087A6 6 0 0 1 271.015 400H176.987A6 6 0 0 1 171.842 397.087L154.389 368zM368 320H80V-10A6 6 0 0 1 86 -16H362A6 6 0 0 1 368 -10V320z" />
|
||||
<glyph glyph-name="user-circle"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M256 440C119.033 440 8 328.967 8 192S119.033 -56 256 -56S504 55.033 504 192S392.967 440 256 440zM256 392C366.457 392 456 302.457 456 192C456 155.018 445.951 120.389 428.452 90.672C421.38 116.1160000000001 402.789 144.88 364.522 156.0460000000001C377.207 176.218 384 199.586 384 224C384 294.689 326.811 352 256 352C185.311 352 128 294.81 128 224C128 199.586 134.793 176.217 147.478 156.046C109.179 144.871 90.602 116.133 83.54 90.684C66.046 120.399 56 155.024 56 192C56 302.457 145.543 392 256 392zM336 224C336 179.817 300.183 144 256 144S176 179.817 176 224S211.817 304 256 304S336 268.183 336 224zM128 38.331V66.089C128 86.499 141.53 104.437 161.156 110.044L185.632 117.037C206.342 103.352 230.605 96 256 96S305.658 103.352 326.3690000000001 117.038L350.8450000000001 110.045C370.4700000000001 104.437 384 86.5 384 66.089V38.331C349.315 9.408 304.693 -8 256 -8S162.685 9.408 128 38.331z" />
|
||||
<glyph glyph-name="user"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M423.3090000000001 156.975L402.221 163C431.798 204.11 436 245.706 436 268C436 367.351 355.484 448 256 448C156.649 448 76 367.484 76 268C76 245.701 80.198 204.116 109.779 163L88.691 156.975C21.28 137.715 0 76.41 0 39.395V13.714C0 -29.138 34.862 -64 77.714 -64H434.2850000000001C477.138 -64 512 -29.138 512 13.714V39.395C512 75.642 491.275 137.556 423.309 156.975zM256 400C328.902 400 388 340.901 388 268S328.902 136 256 136S124 195.099 124 268S183.098 400 256 400zM464 13.714C464 -2.696 450.696 -16 434.286 -16H77.714C61.304 -16 48 -2.696 48 13.714V39.395C48 72.562 69.987 101.711 101.878 110.822L147.981 123.994C162.683 112.942 200.427 88 256 88S349.317 112.942 364.019 123.994L410.122 110.822C442.013 101.71 464 72.562 464 39.395V13.714z" />
|
||||
<glyph glyph-name="window-close"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M464 416H48C21.5 416 0 394.5 0 368V16C0 -10.5 21.5 -32 48 -32H464C490.5 -32 512 -10.5 512 16V368C512 394.5 490.5 416 464 416zM464 22C464 18.7 461.3 16 458 16H54C50.7 16 48 18.7 48 22V362C48 365.3 50.7 368 54 368H458C461.3 368 464 365.3 464 362V22zM356.5 253.4L295.1 192L356.5 130.6C361.1 126 361.1 118.5 356.5 113.8L334.2 91.5C329.6 86.9 322.1 86.9 317.4 91.5L256 152.9L194.6 91.5C190 86.9 182.5 86.9 177.8 91.5L155.5 113.8C150.9 118.4 150.9 125.9 155.5 130.6L216.9 192L155.5 253.4000000000001C150.9 258 150.9 265.5 155.5 270.2000000000001L177.8 292.5000000000001C182.4 297.1 189.9 297.1 194.6 292.5000000000001L256 231.1000000000001L317.4 292.5000000000001C322 297.1 329.5 297.1 334.2 292.5000000000001L356.5 270.2000000000001C361.2 265.6 361.2 258.1 356.5 253.4000000000001z" />
|
||||
<glyph glyph-name="window-maximize"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M464 416H48C21.5 416 0 394.5 0 368V16C0 -10.5 21.5 -32 48 -32H464C490.5 -32 512 -10.5 512 16V368C512 394.5 490.5 416 464 416zM464 22C464 18.7 461.3 16 458 16H54C50.7 16 48 18.7 48 22V256H464V22z" />
|
||||
<glyph glyph-name="window-minimize"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M480 -32H32C14.3 -32 0 -17.7 0 0S14.3 32 32 32H480C497.7 32 512 17.7 512 0S497.7 -32 480 -32z" />
|
||||
<glyph glyph-name="window-restore"
|
||||
unicode=""
|
||||
horiz-adv-x="512" d=" M464 448H144C117.5 448 96 426.5 96 400V352H48C21.5 352 0 330.5 0 304V-16C0 -42.5 21.5 -64 48 -64H368C394.5 -64 416 -42.5 416 -16V32H464C490.5 32 512 53.5 512 80V400C512 426.5 490.5 448 464 448zM368 -16H48V192H368V-16zM464 80H416V304C416 330.5 394.5 352 368 352H144V400H464V80z" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 105 KiB |
BIN
static/ext/semantic-fonts/outline-icons.ttf
Normal file
BIN
static/ext/semantic-fonts/outline-icons.ttf
Normal file
Binary file not shown.
BIN
static/ext/semantic-fonts/outline-icons.woff
Normal file
BIN
static/ext/semantic-fonts/outline-icons.woff
Normal file
Binary file not shown.
BIN
static/ext/semantic-fonts/outline-icons.woff2
Normal file
BIN
static/ext/semantic-fonts/outline-icons.woff2
Normal file
Binary file not shown.
374
static/ext/semantic-ubuntu.min.css
vendored
Normal file
374
static/ext/semantic-ubuntu.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
372
static/ext/semantic.min.css
vendored
Normal file
372
static/ext/semantic.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
static/ext/semantic.min.js
vendored
Normal file
11
static/ext/semantic.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
29
static/ext/ubuntu-font.css
Normal file
29
static/ext/ubuntu-font.css
Normal file
@ -0,0 +1,29 @@
|
||||
/* from https://fonts.googleapis.com/css?family=Ubuntu:400,400i,700,700i&display=swap */
|
||||
@font-face {
|
||||
font-family: 'Ubuntu';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: local('Ubuntu Italic'), local('Ubuntu-Italic'), url(ubuntu/4iCu6KVjbNBYlgoKej70l0w.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Ubuntu';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: local('Ubuntu Bold Italic'), local('Ubuntu-BoldItalic'), url(ubuntu/4iCp6KVjbNBYlgoKejZPslyPN4Q.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Ubuntu';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: local('Ubuntu Regular'), local('Ubuntu-Regular'), url(ubuntu/4iCs6KVjbNBYlgoKfw7z.ttf) format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Ubuntu';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: local('Ubuntu Bold'), local('Ubuntu-Bold'), url(ubuntu/4iCv6KVjbNBYlgoCxCvjsGyI.ttf) format('truetype');
|
||||
}
|
||||
BIN
static/ext/ubuntu/4iCp6KVjbNBYlgoKejZPslyPN4Q.ttf
Normal file
BIN
static/ext/ubuntu/4iCp6KVjbNBYlgoKejZPslyPN4Q.ttf
Normal file
Binary file not shown.
BIN
static/ext/ubuntu/4iCs6KVjbNBYlgoKfw7z.ttf
Normal file
BIN
static/ext/ubuntu/4iCs6KVjbNBYlgoKfw7z.ttf
Normal file
Binary file not shown.
BIN
static/ext/ubuntu/4iCu6KVjbNBYlgoKej70l0w.ttf
Normal file
BIN
static/ext/ubuntu/4iCu6KVjbNBYlgoKej70l0w.ttf
Normal file
Binary file not shown.
BIN
static/ext/ubuntu/4iCv6KVjbNBYlgoCxCvjsGyI.ttf
Normal file
BIN
static/ext/ubuntu/4iCv6KVjbNBYlgoCxCvjsGyI.ttf
Normal file
Binary file not shown.
11965
static/ext/vue.js
Normal file
11965
static/ext/vue.js
Normal file
File diff suppressed because it is too large
Load Diff
6
static/ext/vue.min.js
vendored
Normal file
6
static/ext/vue.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
static/favicon.png
Normal file
BIN
static/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
BIN
static/fonts/proximanova-semibold.ttf
Normal file
BIN
static/fonts/proximanova-semibold.ttf
Normal file
Binary file not shown.
BIN
static/fonts/ransom-note.ttf
Normal file
BIN
static/fonts/ransom-note.ttf
Normal file
Binary file not shown.
67
static/html/login.html
Normal file
67
static/html/login.html
Normal file
@ -0,0 +1,67 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Login</title>
|
||||
<style>
|
||||
*{
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body{
|
||||
background-color: #1d7cb6;
|
||||
font-family: "Arial", sans-serif;
|
||||
padding: 50px;
|
||||
}
|
||||
.container {
|
||||
margin: 20px auto;
|
||||
padding: 10px;
|
||||
width: 300px;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
margin-top: 15%;
|
||||
}
|
||||
form {
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
margin-block-end: 0px;
|
||||
}
|
||||
input {
|
||||
padding: 12px 0;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 3px;
|
||||
border: 2px solid transparent;
|
||||
text-align: center;
|
||||
width: 90%;
|
||||
font-size: 16px;
|
||||
transition: border .2s, background-color .2s;
|
||||
}
|
||||
form img {
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
form .field {
|
||||
background-color: #ECF0F1;
|
||||
}
|
||||
form .field:focus {
|
||||
border: 2px solid #3498DB;
|
||||
}
|
||||
form .btn {
|
||||
background-color: #3498DB;
|
||||
color: #fff;
|
||||
line-height: 25px;
|
||||
cursor: pointer;
|
||||
letter-spacing: .5;
|
||||
}
|
||||
form .btn:hover,
|
||||
form .btn:active {
|
||||
background-color: #1F78B4;
|
||||
border: 2px solid #1F78B4;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<form action="/login" method="POST">
|
||||
<img src="/captcha" width=256 height=64 alt="Captcha image loading...">
|
||||
<input type="text" placeholder="captcha" class="field" name="captcha"
|
||||
autofocus autocomplete="off" required pattern="[a-zA-Z0-9]{8}">
|
||||
<input type="password" placeholder="password" class="field" name="password" required>
|
||||
<input type="submit" value="LOGIN" class="btn">
|
||||
</form>
|
||||
</div>
|
||||
18
static/html/logout.html
Normal file
18
static/html/logout.html
Normal file
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Logged Out</title>
|
||||
<body>
|
||||
<pre style="margin: 50px;">
|
||||
You are logged out.
|
||||
|
||||
|
||||
In 3 seconds this tab will clear itself... But you should still close it.
|
||||
</pre>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
history.replaceState(null, '', '/');
|
||||
window.location.replace('about:blank');
|
||||
window.location = 'about:blank';
|
||||
}, 3000);
|
||||
</script>
|
||||
|
||||
301
static/html5shiv.js
vendored
Normal file
301
static/html5shiv.js
vendored
Normal file
@ -0,0 +1,301 @@
|
||||
/**
|
||||
* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
;(function(window, document) {
|
||||
/*jshint evil:true */
|
||||
/** version */
|
||||
var version = '3.7.0';
|
||||
|
||||
/** Preset options */
|
||||
var options = window.html5 || {};
|
||||
|
||||
/** Used to skip problem elements */
|
||||
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
|
||||
|
||||
/** Not all elements can be cloned in IE **/
|
||||
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
|
||||
|
||||
/** Detect whether the browser supports default html5 styles */
|
||||
var supportsHtml5Styles;
|
||||
|
||||
/** Name of the expando, to work with multiple documents or to re-shiv one document */
|
||||
var expando = '_html5shiv';
|
||||
|
||||
/** The id for the the documents expando */
|
||||
var expanID = 0;
|
||||
|
||||
/** Cached data for each document */
|
||||
var expandoData = {};
|
||||
|
||||
/** Detect whether the browser supports unknown elements */
|
||||
var supportsUnknownElements;
|
||||
|
||||
(function() {
|
||||
try {
|
||||
var a = document.createElement('a');
|
||||
a.innerHTML = '<xyz></xyz>';
|
||||
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
|
||||
supportsHtml5Styles = ('hidden' in a);
|
||||
|
||||
supportsUnknownElements = a.childNodes.length == 1 || (function() {
|
||||
// assign a false positive if unable to shiv
|
||||
(document.createElement)('a');
|
||||
var frag = document.createDocumentFragment();
|
||||
return (
|
||||
typeof frag.cloneNode == 'undefined' ||
|
||||
typeof frag.createDocumentFragment == 'undefined' ||
|
||||
typeof frag.createElement == 'undefined'
|
||||
);
|
||||
}());
|
||||
} catch(e) {
|
||||
// assign a false positive if detection fails => unable to shiv
|
||||
supportsHtml5Styles = true;
|
||||
supportsUnknownElements = true;
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a style sheet with the given CSS text and adds it to the document.
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @param {String} cssText The CSS text.
|
||||
* @returns {StyleSheet} The style element.
|
||||
*/
|
||||
function addStyleSheet(ownerDocument, cssText) {
|
||||
var p = ownerDocument.createElement('p'),
|
||||
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
|
||||
|
||||
p.innerHTML = 'x<style>' + cssText + '</style>';
|
||||
return parent.insertBefore(p.lastChild, parent.firstChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of `html5.elements` as an array.
|
||||
* @private
|
||||
* @returns {Array} An array of shived element node names.
|
||||
*/
|
||||
function getElements() {
|
||||
var elements = html5.elements;
|
||||
return typeof elements == 'string' ? elements.split(' ') : elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data associated to the given document
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @returns {Object} An object of data.
|
||||
*/
|
||||
function getExpandoData(ownerDocument) {
|
||||
var data = expandoData[ownerDocument[expando]];
|
||||
if (!data) {
|
||||
data = {};
|
||||
expanID++;
|
||||
ownerDocument[expando] = expanID;
|
||||
expandoData[expanID] = data;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived element for the given nodeName and document
|
||||
* @memberOf html5
|
||||
* @param {String} nodeName name of the element
|
||||
* @param {Document} ownerDocument The context document.
|
||||
* @returns {Object} The shived element.
|
||||
*/
|
||||
function createElement(nodeName, ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createElement(nodeName);
|
||||
}
|
||||
if (!data) {
|
||||
data = getExpandoData(ownerDocument);
|
||||
}
|
||||
var node;
|
||||
|
||||
if (data.cache[nodeName]) {
|
||||
node = data.cache[nodeName].cloneNode();
|
||||
} else if (saveClones.test(nodeName)) {
|
||||
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
|
||||
} else {
|
||||
node = data.createElem(nodeName);
|
||||
}
|
||||
|
||||
// Avoid adding some elements to fragments in IE < 9 because
|
||||
// * Attributes like `name` or `type` cannot be set/changed once an element
|
||||
// is inserted into a document/fragment
|
||||
// * Link elements with `src` attributes that are inaccessible, as with
|
||||
// a 403 response, will cause the tab/window to crash
|
||||
// * Script elements appended to fragments will execute when their `src`
|
||||
// or `text` property is set
|
||||
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived DocumentFragment for the given document
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The context document.
|
||||
* @returns {Object} The shived DocumentFragment.
|
||||
*/
|
||||
function createDocumentFragment(ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createDocumentFragment();
|
||||
}
|
||||
data = data || getExpandoData(ownerDocument);
|
||||
var clone = data.frag.cloneNode(),
|
||||
i = 0,
|
||||
elems = getElements(),
|
||||
l = elems.length;
|
||||
for(;i<l;i++){
|
||||
clone.createElement(elems[i]);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
|
||||
* @private
|
||||
* @param {Document|DocumentFragment} ownerDocument The document.
|
||||
* @param {Object} data of the document.
|
||||
*/
|
||||
function shivMethods(ownerDocument, data) {
|
||||
if (!data.cache) {
|
||||
data.cache = {};
|
||||
data.createElem = ownerDocument.createElement;
|
||||
data.createFrag = ownerDocument.createDocumentFragment;
|
||||
data.frag = data.createFrag();
|
||||
}
|
||||
|
||||
|
||||
ownerDocument.createElement = function(nodeName) {
|
||||
//abort shiv
|
||||
if (!html5.shivMethods) {
|
||||
return data.createElem(nodeName);
|
||||
}
|
||||
return createElement(nodeName, ownerDocument, data);
|
||||
};
|
||||
|
||||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
|
||||
'var n=f.cloneNode(),c=n.createElement;' +
|
||||
'h.shivMethods&&(' +
|
||||
// unroll the `createElement` calls
|
||||
getElements().join().replace(/[\w\-]+/g, function(nodeName) {
|
||||
data.createElem(nodeName);
|
||||
data.frag.createElement(nodeName);
|
||||
return 'c("' + nodeName + '")';
|
||||
}) +
|
||||
');return n}'
|
||||
)(html5, data.frag);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Shivs the given document.
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The document to shiv.
|
||||
* @returns {Document} The shived document.
|
||||
*/
|
||||
function shivDocument(ownerDocument) {
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
var data = getExpandoData(ownerDocument);
|
||||
|
||||
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
|
||||
data.hasCSS = !!addStyleSheet(ownerDocument,
|
||||
// corrects block display not defined in IE6/7/8/9
|
||||
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
|
||||
// adds styling not present in IE6/7/8/9
|
||||
'mark{background:#FF0;color:#000}' +
|
||||
// hides non-rendered elements
|
||||
'template{display:none}'
|
||||
);
|
||||
}
|
||||
if (!supportsUnknownElements) {
|
||||
shivMethods(ownerDocument, data);
|
||||
}
|
||||
return ownerDocument;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The `html5` object is exposed so that more elements can be shived and
|
||||
* existing shiving can be detected on iframes.
|
||||
* @type Object
|
||||
* @example
|
||||
*
|
||||
* // options can be changed before the script is included
|
||||
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
|
||||
*/
|
||||
var html5 = {
|
||||
|
||||
/**
|
||||
* An array or space separated string of node names of the elements to shiv.
|
||||
* @memberOf html5
|
||||
* @type Array|String
|
||||
*/
|
||||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
|
||||
|
||||
/**
|
||||
* current version of html5shiv
|
||||
*/
|
||||
'version': version,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the HTML5 style sheet should be inserted.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivCSS': (options.shivCSS !== false),
|
||||
|
||||
/**
|
||||
* Is equal to true if a browser supports creating unknown/HTML5 elements
|
||||
* @memberOf html5
|
||||
* @type boolean
|
||||
*/
|
||||
'supportsUnknownElements': supportsUnknownElements,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
|
||||
* methods should be overwritten.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivMethods': (options.shivMethods !== false),
|
||||
|
||||
/**
|
||||
* A string to describe the type of `html5` object ("default" or "default print").
|
||||
* @memberOf html5
|
||||
* @type String
|
||||
*/
|
||||
'type': 'default',
|
||||
|
||||
// shivs the document according to the specified `html5` object options
|
||||
'shivDocument': shivDocument,
|
||||
|
||||
//creates a shived element
|
||||
createElement: createElement,
|
||||
|
||||
//creates a shived documentFragment
|
||||
createDocumentFragment: createDocumentFragment
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose html5
|
||||
window.html5 = html5;
|
||||
|
||||
// shiv the document
|
||||
shivDocument(document);
|
||||
|
||||
}(this, document));
|
||||
BIN
static/navicon.png
Normal file
BIN
static/navicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
181
static/project.js
Normal file
181
static/project.js
Normal file
@ -0,0 +1,181 @@
|
||||
|
||||
function ready(fn)
|
||||
{
|
||||
if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){
|
||||
fn();
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', fn);
|
||||
}
|
||||
}
|
||||
|
||||
ready(function() {
|
||||
|
||||
// after JQ loaded...
|
||||
|
||||
$('.js-api-btn').on('click', function() {
|
||||
var el = $(this);
|
||||
var action = el.data('api-action');
|
||||
var picker = $('input[type=checkbox].js-api-picker');
|
||||
|
||||
// limitation: arg cannot be falsy
|
||||
var req = { action: action,
|
||||
noun: el.data('api-noun') || window.PAGE_NOUN || '',
|
||||
arg: el.data('api-arg') || null };
|
||||
|
||||
if(picker.length) {
|
||||
picker.each(function(index, chk) {
|
||||
if(chk.checked) {
|
||||
if(req.noun) req.noun += ',';
|
||||
req.noun += $(chk).data('api-noun');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
console.log("ACTION: " + window.PAGE_NOUN + " => " + action);
|
||||
|
||||
window.WEBSOCKET('api', req);
|
||||
});
|
||||
|
||||
$('.js-api-clear-all').on('click', function() {
|
||||
$('input[type=checkbox].js-api-picker').prop('checked', false);
|
||||
});
|
||||
$('.js-api-set-all').on('click', function() {
|
||||
$('input[type=checkbox].js-api-picker').prop('checked', true);
|
||||
});
|
||||
|
||||
$('body').on('click', '.js-clickable', function(evt) {
|
||||
var el = $(this)
|
||||
var target = el.data("href");
|
||||
if(!target) return;
|
||||
|
||||
|
||||
// special case cell, probably has input
|
||||
var cell = $(evt.target);
|
||||
if(cell.hasClass('js-not-clickable')) return;
|
||||
var td = $(evt.target).parents('td');
|
||||
if(td && td.hasClass('js-not-clickable')) return;
|
||||
|
||||
var tabname = el.data("tabname");
|
||||
if(tabname) {
|
||||
window.open(target, tabname);
|
||||
} else {
|
||||
window.location = target;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Semantic UI modules that we use
|
||||
$('.ui.dropdown').dropdown({fullTextSearch: true});
|
||||
$('.ui.checkbox').checkbox();
|
||||
$('.ui.accordion').accordion();
|
||||
$('.ui.popup').popup();
|
||||
$('.js-long-popup').popup({ inline: true });
|
||||
|
||||
$('.message .close').on('click', function() {
|
||||
$(this)
|
||||
.closest('.message')
|
||||
.transition('slide down')
|
||||
;
|
||||
});
|
||||
|
||||
|
||||
if(window.WEBSOCKET_URL) {
|
||||
|
||||
var WS = new WebSocket( (location.protocol == 'http:' ? 'ws://' : 'wss://')
|
||||
+ location.host + window.WEBSOCKET_URL);
|
||||
var keepalive = 0;
|
||||
|
||||
WS.onopen = function(e) {
|
||||
|
||||
console.log("websocket ready");
|
||||
keepalive = window.setInterval(function() {
|
||||
WS.send(JSON.stringify({_ping: 1}));
|
||||
}, 10000);
|
||||
|
||||
|
||||
WS.send(JSON.stringify({action: '_connected', args: [window.location.pathname]}));
|
||||
}
|
||||
|
||||
WS.onmessage = function(e) {
|
||||
var r = JSON.parse(e.data);
|
||||
if(r.keepalive) return;
|
||||
|
||||
if(r.show_modal) {
|
||||
// show a modal
|
||||
var el = $(r.selector);
|
||||
el.find('.content').html(r.html);
|
||||
el.modal('show');
|
||||
} else if(r.html && r.selector) {
|
||||
// XXX bad idea, delete?
|
||||
var el = $(r.selector);
|
||||
if(el) el.html(r.html);
|
||||
}
|
||||
if(r.show_flash_msg) {
|
||||
// update content in a message and show it
|
||||
var el = $('#js-flash-msg');
|
||||
|
||||
el.find('.js-content').text(r.show_flash_msg);
|
||||
|
||||
if(!el.transition('is visible')) {
|
||||
el.transition('slide down');
|
||||
}
|
||||
}
|
||||
if(r.redirect) {
|
||||
location.href = r.redirect;
|
||||
}
|
||||
if(r.reload) {
|
||||
setTimeout(function() { location.reload() }, 100);
|
||||
}
|
||||
if(r.local_download) {
|
||||
// trigger download/save-as to user's system
|
||||
data = r.local_download.data
|
||||
if(r.is_b64) {
|
||||
data = base64js.fromByteArray(data);
|
||||
}
|
||||
download(r.local_download.filename, data)
|
||||
}
|
||||
|
||||
// send data back to VUE code
|
||||
if(r.vue_app_cb) {
|
||||
window.vue_app_cb(r.vue_app_cb)
|
||||
}
|
||||
|
||||
if(r.cb) {
|
||||
// obsolete
|
||||
window.ws_cb(r)
|
||||
}
|
||||
};
|
||||
function done(e) {
|
||||
// show we are broken.
|
||||
console.log("websocket broken");
|
||||
window.clearInterval(keepalive);
|
||||
$('#ws_fail_msg').show();
|
||||
$('.ui.main.container input,select').attr('disabled', true);
|
||||
$('.field').addClass('disabled');
|
||||
}
|
||||
WS.onerror = done;
|
||||
WS.onclose = done;
|
||||
|
||||
window.WEBSOCKET = function(action) { // accepts varargs
|
||||
let args = Array.prototype.slice.call(arguments, 1);
|
||||
WS.send(JSON.stringify({action: action, args: args}));
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function download(filename, text) {
|
||||
// from <https://ourcodeworld.com/articles/read/189/how-to-create-a-file-and-generate-a-download-with-javascript-in-the-browser-without-a-server>
|
||||
|
||||
var element = document.createElement('a');
|
||||
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
|
||||
element.setAttribute('download', filename);
|
||||
|
||||
element.style.display = 'none';
|
||||
document.body.appendChild(element);
|
||||
|
||||
element.click();
|
||||
|
||||
document.body.removeChild(element);
|
||||
}
|
||||
|
||||
142
static/style.css
Normal file
142
static/style.css
Normal file
@ -0,0 +1,142 @@
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
flex-direction: column;
|
||||
}
|
||||
.ui.menu .item img.logo {
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
.main.container {
|
||||
margin-top: 6em;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 767px) {
|
||||
.main.container {
|
||||
margin-top: 13em;
|
||||
}
|
||||
}
|
||||
|
||||
.main-content-wrapper {
|
||||
margin-top: 7em;
|
||||
flex: 1;
|
||||
}
|
||||
.ui.menu .item img.logo {
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
.ui.footer.segment {
|
||||
margin: 9em 0em 0em;
|
||||
}
|
||||
|
||||
/* mobile hacks */
|
||||
@media only screen and (max-width: 767px) {
|
||||
.seg7-container {
|
||||
}
|
||||
.seg7-row {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
.indicators {
|
||||
font-size: 0.5em;
|
||||
width: 2em;
|
||||
margin-top: -5.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.js-expr-help-btn {
|
||||
margin-left: 0.10em;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* compress search results */
|
||||
.js-key-search-results {
|
||||
overflow-y: auto;
|
||||
max-height: 500px;
|
||||
}
|
||||
|
||||
.ui.category.search >.results .category .result {
|
||||
padding: 2px 12px;
|
||||
}
|
||||
.ui.search>.results .result .title {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
a.extlink {
|
||||
color: #4d4d4d;
|
||||
}
|
||||
.inverted a.extlink {
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
/* accordion headings, make big, more like H2 they are */
|
||||
.ui.accordion .title.bigger {
|
||||
font-size: 1.8em !important;
|
||||
}
|
||||
.ui.accordion span.my_sub {
|
||||
font-size: 60%;
|
||||
margin-left: 2em;
|
||||
float: right;
|
||||
margin: 9px 0 0 0 ;
|
||||
}
|
||||
|
||||
hr.my_hr {
|
||||
border-color: rgba(255,255,255,.5);
|
||||
}
|
||||
|
||||
input.inputfile {
|
||||
width: 0.1px;
|
||||
height: 0.1px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
|
||||
.tt-font {
|
||||
font-family: courier !important;
|
||||
}
|
||||
|
||||
.tt-font-small {
|
||||
font-family: courier !important;
|
||||
font-size: 13px !important;
|
||||
}
|
||||
|
||||
|
||||
pre.wordwrap {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
/* keep at bottom */
|
||||
/* see https://stackoverflow.com/questions/36186831 */
|
||||
[v-cloak] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.bignum {
|
||||
font-size: 180%;
|
||||
line-height: 160%;
|
||||
}
|
||||
|
||||
.btcnum {
|
||||
font-size: 120%;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
code.sha256 {
|
||||
/*border: #ccc solid 0.5px;
|
||||
border-radius: 3px; */
|
||||
padding: 2px 6px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
input.width-fix {
|
||||
width: 12em !important;
|
||||
}
|
||||
|
||||
/* Firefox bugfixes */
|
||||
.ui.toggle.checkbox label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
116
status.py
Normal file
116
status.py
Normal file
@ -0,0 +1,116 @@
|
||||
#
|
||||
# Store and watch all **status** values in system.
|
||||
#
|
||||
import sys, logging, asyncio
|
||||
from pprint import pprint, pformat
|
||||
from decimal import Decimal
|
||||
from chrono import NOW
|
||||
from objstruct import ObjectStruct
|
||||
from hashlib import sha256
|
||||
from copy import deepcopy
|
||||
from utils import WatchableMixin
|
||||
|
||||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
class SystemStatus(WatchableMixin, ObjectStruct):
|
||||
|
||||
def __init__(self):
|
||||
# define all values here. keep simple, small!
|
||||
# - values must be JSON-able.
|
||||
super(SystemStatus, self).__init__()
|
||||
|
||||
self.connected = False
|
||||
self.serial_number = None
|
||||
|
||||
#self.xfp = None
|
||||
|
||||
self.hsm = dict(users=[], wallets=[]) # short for "hsm_status"
|
||||
self.is_testnet = False
|
||||
|
||||
# storage locker has been read ok.
|
||||
self.sl_loaded = False
|
||||
|
||||
# user doesn't want Tor regardless of other settings (also disables login process)
|
||||
self.force_local_mode = False
|
||||
|
||||
# we are in setup mode
|
||||
self.setup_mode = False
|
||||
|
||||
# PSBT related
|
||||
self._pending_psbt = None # raw binary
|
||||
self.psbt_hash = None # hex digits (sha256)
|
||||
self.psbt_size = None # size of binary
|
||||
self.local_code = None # string of 6 digits
|
||||
self.psbt_preview = None # text
|
||||
self.busy_signing = False
|
||||
|
||||
# tor related
|
||||
self.tord_good = False # local tord control connection good
|
||||
self.onion_addr = None # our present onion addr, if any
|
||||
self.tor_enabled = False # config calls for tor (ie. BP['tor_enabled'])
|
||||
|
||||
# list of structs about creditials given by remote users
|
||||
self.pending_auth = []
|
||||
|
||||
def reset_pending_auth(self):
|
||||
# clear and setup pending auth list
|
||||
from persist import BP
|
||||
|
||||
# make a list of users that might need to auth
|
||||
ul = self.hsm.get('users')
|
||||
if not ul:
|
||||
if BP.get('policy'):
|
||||
ul = set()
|
||||
for r in BP['policy'].rules:
|
||||
ul.union(r.users)
|
||||
ul = list(sorted(ul))
|
||||
|
||||
# they might have picked privacy over UX, so provide some "slots"
|
||||
# regardless of above.
|
||||
if not ul:
|
||||
ul = ['' for i in range(5)]
|
||||
|
||||
# construct an obj for UX purposes, but keep the actual secrets separate
|
||||
self.pending_auth = [ObjectStruct(name=n, has_name=bool(n),
|
||||
has_guess='', totp=0) for n in ul]
|
||||
self._auth_guess = [None]*len(ul)
|
||||
|
||||
|
||||
def clear_psbt(self):
|
||||
# wipe knowledge of PSBT
|
||||
self._pending_psbt = None
|
||||
self.psbt_hash = None
|
||||
self.psbt_size = None
|
||||
self.local_code = None
|
||||
self.psbt_preview = None
|
||||
|
||||
def import_psbt(self, psbt):
|
||||
from ckcc.utils import calc_local_pincode
|
||||
from utils import cleanup_psbt
|
||||
from binascii import b2a_hex
|
||||
|
||||
self.clear_psbt()
|
||||
|
||||
self._pending_psbt = cleanup_psbt(psbt)
|
||||
|
||||
self.psbt_size = len(self._pending_psbt)
|
||||
|
||||
hh = sha256(self._pending_psbt).digest()
|
||||
self.psbt_hash = b2a_hex(hh).decode('ascii')
|
||||
|
||||
# local PIN code will be wrong/stale now.
|
||||
if self.hsm and self.hsm.get('next_local_code'):
|
||||
self.local_code = calc_local_pincode(hh, self.hsm.next_local_code)
|
||||
|
||||
logging.info("Imported PSBT with hash: " + self.psbt_hash)
|
||||
|
||||
def as_dict(self):
|
||||
# we stream changes to web clients, so provide JSON
|
||||
return dict((k, deepcopy(self[k]))
|
||||
for k in self.keys() if k[0] != '_' and not callable(self[k]))
|
||||
|
||||
|
||||
# singleton
|
||||
STATUS = SystemStatus()
|
||||
|
||||
# EOF
|
||||
70
templates/base.html
Normal file
70
templates/base.html
Normal file
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<meta name="robots" content="noindex,nosnippet,noarchive">
|
||||
|
||||
<title>
|
||||
{% block page_title %}
|
||||
CK Bunker
|
||||
{% endblock page_title %}
|
||||
</title>
|
||||
|
||||
{% block extra_page_meta %}
|
||||
{% endblock extra_page_meta %}
|
||||
|
||||
{# TODO: add integretry values to these, "just in case" #}
|
||||
{# <link rel="stylesheet" href="/static/ext/semantic.min.css"> #}
|
||||
<link rel="stylesheet" href="/static/ext/semantic-ubuntu.min.css">
|
||||
<script src="/static/ext/jquery-3.1.1.min.js"
|
||||
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="/static/ext/lodash.min.js"></script>
|
||||
<script src="/static/ext/semantic.min.js"></script>
|
||||
<script src="/static/ext/base64js.min.js"></script>
|
||||
<script src="/static/ext/vue.js"></script> {# leave in dev mode #}
|
||||
|
||||
{% block extra_head_code %}
|
||||
{% endblock extra_head_code %}
|
||||
|
||||
<script src="/static/project.js"></script>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
|
||||
<link rel="icon" href="/static/favicon.png">
|
||||
|
||||
{% block head_style %}
|
||||
{% endblock head_style %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{% block body %}{% endblock body %}
|
||||
|
||||
|
||||
{% if ws_url %}
|
||||
<div class="ui small modal js-api-fail">
|
||||
<div class="header">Failed.</div>
|
||||
<div class="content"></div>
|
||||
<div class="actions">
|
||||
<div class="ui cancel button">Dismiss</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui small modal js-api-success">
|
||||
<div class="header">Success!</div>
|
||||
<div class="content"></div>
|
||||
<div class="actions">
|
||||
<div class="ui cancel button">Dismiss</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.WEBSOCKET_URL = "{{ws_url}}";
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% block even_more_js %}{% endblock %}
|
||||
{% block endscript %}{% endblock %}
|
||||
|
||||
</body></html>
|
||||
2
templates/basic.html
Normal file
2
templates/basic.html
Normal file
@ -0,0 +1,2 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
182
templates/bunker/index.html
Normal file
182
templates/bunker/index.html
Normal file
@ -0,0 +1,182 @@
|
||||
{% extends "navpage.html" %}
|
||||
|
||||
{% from "macros.html" import message_box, bool_choice, amount, info_hover,
|
||||
text_field, bool_choice, wrap_field %}
|
||||
|
||||
{% block main_body %}
|
||||
<div class="ui segment" id="bunker" v-cloak>
|
||||
|
||||
{% call message_box('Tor Daemon Missing', '!STATUS.tord_good && !force_local_mode',
|
||||
icon='warning sign') %}
|
||||
The Bunker cannot communicate with <tt>tord</tt> (Tor daemon) which we need. It should
|
||||
be available on ports 9051 and 9151 of localhost.
|
||||
{% endcall %}
|
||||
|
||||
<h2>Bunker Setup & Configuration</h2>
|
||||
|
||||
<div class="ui form">
|
||||
|
||||
<template v-if="!force_local_mode">
|
||||
{{ bool_choice('tor_enabled', "Operate Tor Hidden Service", disabled_if='using_onion') }}
|
||||
|
||||
{% call wrap_field(None, 'Onion Address', disabled_if="!tor_enabled || using_onion") %}
|
||||
<div class="ui action input">
|
||||
<input v-model="onion_addr" class="tt-font" minlength=70 maxlength=70 required
|
||||
type="text" readonly placeholder="(disabled)">
|
||||
<button class="ui button" @click="pick_onion_addr()"><i class="recycle icon"></i> Spin Again</button>
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
{% call wrap_field(None, 'Master Login Password') %}
|
||||
<div class="ui action input">
|
||||
<input v-model="master_pw" class="tt-font" minlength=4 maxlength=128 required
|
||||
type="text" placeholder="{{placeholder}}">
|
||||
<button class="ui button" @click="pick_master_pw()"><i class="recycle icon"></i> Spin Again</button>
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
{{ bool_choice('easy_captcha', "Use a simple captcha without animation") }}
|
||||
</template>
|
||||
|
||||
{% call bool_choice('allow_reboots', None) %}
|
||||
<label>Allow Bunker to be restarted without requiring a restart
|
||||
of the Coldcard
|
||||
{{ info_hover("Change applied on next update to Coldcard's HSM policy.") }}
|
||||
</label>
|
||||
{% endcall %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<br>
|
||||
<div class="ui grid">
|
||||
<div class="eight wide column ">
|
||||
<button class="ui large primary button"
|
||||
@click="save_changes()">
|
||||
<i class="check mark icon"></i> Save Changes </button>
|
||||
</div>
|
||||
<div class="eight wide column right aligned">
|
||||
<button class="ui mini basic button"
|
||||
@click="logout_everyone()">
|
||||
<i class="logout icon"></i> Everyone Logout </button>
|
||||
|
||||
<button class="ui mini basic button"
|
||||
@click="shutdown_bunker()">
|
||||
<i class="stop sign icon"></i> Stop Bunker </button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% call message_box('Write These Down!', '!force_local_mode', icon='edit', closable=1) %}
|
||||
We recommend you make note of the the onion address and/or master password.
|
||||
{% endcall %}
|
||||
|
||||
{% if STATUS.setup_mode and not STATUS.force_local_mode %}
|
||||
{% call message_box('No Tor Connections during Setup Mode', 'tor_enabled && !STATUS.onion_addr && STATUS.tor_enabled', closable=1) %}
|
||||
<div class="ui grid">
|
||||
<div class="ten wide column">
|
||||
To enable Tor (onion) connections, either
|
||||
restart bunker in normal mode (it is in 'setup mode' now) or use this button.
|
||||
</div>
|
||||
<div class="right aligned six wide column">
|
||||
<button class="ui large green icon button" @click="leave_setup_btn()">
|
||||
<i class="play icon"></i> Start Tor</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
|
||||
{% call message_box('Visit on Tor', '!using_onion && STATUS.onion_addr', icon='external link', closable=1) %}
|
||||
{% raw %}
|
||||
Go to <a :href="STATUS.onion_addr|http_link" target="torbrowser">{{STATUS.onion_addr}}</a>
|
||||
{% endraw %}
|
||||
{% endcall %}
|
||||
|
||||
|
||||
</div>
|
||||
{% endblock main_body %}
|
||||
|
||||
|
||||
{% block endscript %}
|
||||
|
||||
<script>
|
||||
|
||||
window.bunker_page = new Vue({
|
||||
el: '#bunker',
|
||||
data: {
|
||||
STATUS: {{ STATUS|tojson }},
|
||||
|
||||
tor_enabled: {{ BP.tor_enabled|tojson }},
|
||||
master_pw: {{ BP.master_pw|tojson }},
|
||||
onion_addr: {{ BP.onion_addr|tojson }},
|
||||
easy_captcha: {{ BP.easy_captcha|tojson }},
|
||||
allow_reboots: {{ BP.allow_reboots|tojson }},
|
||||
onion_pk: null,
|
||||
|
||||
force_local_mode: {{ force_local_mode|tojson }},
|
||||
},
|
||||
computed: {
|
||||
using_onion: function() {
|
||||
return Boolean(window.location.host.match(/\.onion$/))
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
tor_enabled: function(nv) {
|
||||
if(nv && !this.onion_addr) {
|
||||
this.pick_onion_addr();
|
||||
}
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
http_link: function(v) {
|
||||
return 'http://' + v;
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
pick_onion_addr: function() {
|
||||
window.WEBSOCKET('pick_onion_addr');
|
||||
},
|
||||
pick_master_pw: function() {
|
||||
window.WEBSOCKET('pick_master_pw');
|
||||
},
|
||||
save_changes: function() {
|
||||
var t = _.omit(this.$data, ['STATUS']);
|
||||
window.WEBSOCKET('new_bunker_config', JSON.stringify(t));
|
||||
},
|
||||
logout_everyone: function() {
|
||||
window.WEBSOCKET('logout_everyone');
|
||||
},
|
||||
shutdown_bunker: function() {
|
||||
window.WEBSOCKET('shutdown_bunker');
|
||||
},
|
||||
leave_setup_btn: function() {
|
||||
window.WEBSOCKET('leave_setup_mode');
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
mounted: function() {
|
||||
// results come back thru here
|
||||
window.vue_app_cb = function(resp) {
|
||||
var self = window.bunker_page;
|
||||
|
||||
if(resp.update_status) {
|
||||
self.STATUS = resp.update_status;
|
||||
}
|
||||
|
||||
if(resp.new_onion_addr) {
|
||||
self.tor_enabled = true;
|
||||
self.onion_addr = resp.new_onion_addr[0];
|
||||
self.onion_pk = resp.new_onion_addr[1];
|
||||
}
|
||||
if(resp.new_master_pw) {
|
||||
self.master_pw = resp.new_master_pw;
|
||||
}
|
||||
};
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
9
templates/help.html
Normal file
9
templates/help.html
Normal file
@ -0,0 +1,9 @@
|
||||
{% extends "navpage.html" %}
|
||||
|
||||
{% block main_body %}
|
||||
|
||||
<h1>Help</h1>
|
||||
|
||||
<h2>Background</h2>
|
||||
|
||||
{% endblock %}
|
||||
2
templates/login.html
Normal file
2
templates/login.html
Normal file
@ -0,0 +1,2 @@
|
||||
{% extends "basic.html" %}
|
||||
|
||||
221
templates/macros.html
Normal file
221
templates/macros.html
Normal file
@ -0,0 +1,221 @@
|
||||
|
||||
{% macro ws_fail_message() %}
|
||||
<div id="ws_fail_msg" class="ui icon negative message" style="display:none">
|
||||
<i class="warning sign icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">
|
||||
Websocket Connection Broken.
|
||||
</div>
|
||||
<p>Something's wrong with the connection back to the Bunker.
|
||||
You will have to reload this page.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro flash_msg_holder() %}
|
||||
<div class="ui yellow message transition hidden" id='js-flash-msg'>
|
||||
<i class="close icon"></i>
|
||||
<div class="content">
|
||||
<div class="icon header">
|
||||
<i class="info circle icon"></i>
|
||||
Note
|
||||
</div>
|
||||
<p class="js-content"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
{# these values are mirroring real config values, must share same name; use in JS #}
|
||||
{% macro cfg_mirrors(fld_names) %}
|
||||
{% for fn in fld_names %}
|
||||
{{fn}}: {{ CFG.get(fn)|tojson }},
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro select_field(title, cfgname, values, labels, default_idx=0, numeric=False, width='eight', hide_label=False) %}
|
||||
<div class="{{width}} wide field">
|
||||
{% if not hide_label %}<label>{{title}}</label>{% endif %}
|
||||
<select class="ui dropdown"
|
||||
{% if numeric %}
|
||||
v-model.number="{{cfgname}}"
|
||||
{% else %}
|
||||
v-model="{{cfgname}}"
|
||||
{% endif %}
|
||||
@change="changed_field('{{cfgname}}', $event, {{numeric|tojson}})">
|
||||
{% for val,lab in zip(values, labels) %}
|
||||
<option value='{{val}}'>{{lab}}
|
||||
{% if loop.index0 == default_idx %} (default){% endif %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro needs_coldcard_message() %}
|
||||
<div v-cloak>
|
||||
<div v-if="!STATUS.connected" class="ui icon negative small compact message">
|
||||
<i class="usb icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">
|
||||
Coldcard USB Not Connected
|
||||
</div>
|
||||
<p>This feature needs a USB connection to the Coldcard. Please
|
||||
check the USB cable is connected, and verify the Coldcard
|
||||
is unlocked with the master PIN code.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro message_box(title, show_if, icon='warning sign', closable=False) %}
|
||||
<div v-if="{{show_if|safe}}" class="ui icon small compact message">
|
||||
{% if closable %} <i class="close icon"></i> {% endif %}
|
||||
<i class="{{icon}} icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">{{ title }}</div>
|
||||
<p>{{ caller() }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro needs_coldcard_callout(dir='left') %}
|
||||
<div v-if="!STATUS.connected" class="ui {{dir}} pointing red basic label" v-cloak>
|
||||
<i class="usb icon"></i>Coldcard not connected
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro select_field(title, cfgname, values, labels, default_idx=0, numeric=False, width='eight', hide_label=False) %}
|
||||
<div class="{{width}} wide field">
|
||||
{% if not hide_label %}<label>{{title}}</label>{% endif %}
|
||||
<select class="ui dropdown"
|
||||
{% if numeric %}
|
||||
v-model.number="{{cfgname}}"
|
||||
{% else %}
|
||||
v-model="{{cfgname}}"
|
||||
{% endif %}
|
||||
@change="changed_field('{{cfgname}}', $event, {{numeric|tojson}})">
|
||||
{% for val,lab in zip(values, labels) %}
|
||||
<option value='{{val}}'>{{lab}}
|
||||
{% if loop.index0 == default_idx %} (default){% endif %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro wrap_field(fldname, label, desc, disabled_if=None) %}
|
||||
<div class="ui field"
|
||||
{% if disabled_if %}
|
||||
:class="{ disabled: ({{disabled_if}})}"
|
||||
{% endif %}>
|
||||
{% if label %}
|
||||
<label>{{label}} <br><small>{{desc}}</small></label>
|
||||
{% endif %}
|
||||
{{ caller() }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro amount(fldname, label, desc, placeholder="(any amount)", disabled_if=None) %}
|
||||
{% call wrap_field(fldname, label, desc, disabled_if) %}
|
||||
<div class="ui right labeled input">
|
||||
<input v-model="{{fldname}}" type="number" placeholder="{{placeholder}}"
|
||||
step="any" min="0" max="21E6" list="default-amts"
|
||||
style="text-align: right;" maxlength="12">
|
||||
<div class="ui basic label">{% raw %}{{ chain }}{% endraw %}</div>
|
||||
</div>
|
||||
{% endcall %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro text_field(fldname, label, desc, placeholder="(not used)", extras="", rhs_label="tbd", disabled_if=None) %}
|
||||
{% call wrap_field(fldname, label, desc, disabled_if) %}
|
||||
<div class="ui right labeled input">
|
||||
<input v-model="{{fldname}}" type="text" placeholder="{{placeholder}}" {{extras}}>
|
||||
<div class="ui basic label">
|
||||
{{rhs_label|safe}}
|
||||
</div>
|
||||
</div>
|
||||
{% endcall %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro textarea(fldname, label, desc, placeholder, disabled_if=None, rows=1) %}
|
||||
{% call wrap_field(fldname, label, desc, disabled_if) %}
|
||||
<textarea v-model="{{fldname}}" rows="{{rows}}" placeholder="{{placeholder}}"></textarea>
|
||||
{% endcall %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro choice(fldname, label, desc, values=None, extras=[], multi=False, disabled_if=None, default_text='') %}
|
||||
{% call wrap_field(fldname, label, desc, disabled_if) %}
|
||||
<div class="ui selection dropdown {% if multi %} multiple {% endif %}">
|
||||
<input :value="{{fldname}}" :data-obj="{{fldname}}" type="hidden"
|
||||
@change="select_fixit('{{fldname}}', $event)">
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="default text">{{default_text}}</div>
|
||||
<div class="menu">
|
||||
{% for val,label in extras %}
|
||||
<div class="item" data-value="{{val}}">{{label}}</div>
|
||||
{% endfor %}
|
||||
{% if values %}
|
||||
<div v-for="i in {{values}}" class="item"
|
||||
{% raw %} :data-value="i">{{i}} {% endraw %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endcall %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro bool_choice(fldname, desc, disabled_if=None, style="toggle", fld_kls="field", readonly_if=None) %}
|
||||
<div class="{{fld_kls}}">
|
||||
<div class="ui {{style}} checkbox">
|
||||
<input type="checkbox" v-model="{{fldname}}"
|
||||
{% if readonly_if %}
|
||||
:readonly="{{readonly_if}}"
|
||||
{% endif %}
|
||||
{% if disabled_if %}
|
||||
:disabled="{{disabled_if}}"
|
||||
{% endif %}>
|
||||
{% if not caller %}
|
||||
<label>{{desc}}</label>
|
||||
{% else %}
|
||||
{{ caller() }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro subhead(tt) %}
|
||||
<h3 class="ui dividing header">{{tt}}</h3>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro HR() %}
|
||||
<hr class="my_hr"></hr>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro fileupload(label, change, kls="ui large button") %}
|
||||
<input type="file" @change="{{change}}" class="inputfile" id="embedpollfileinput"
|
||||
accept="text/plain,.txt,.json,application/json" />
|
||||
<label for="embedpollfileinput" class="{{kls}}">
|
||||
<i class="ui upload icon"></i>
|
||||
{{ label }}
|
||||
</label>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro info_hover(msg) %}
|
||||
<span data-tooltip="{{msg}}">
|
||||
<i class="info circle icon"></i>
|
||||
</span>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro info_hover_long(pos=None) %}
|
||||
<span style="float: right;">
|
||||
<i class="info circle icon js-long-popup"
|
||||
data-variation="very wide"
|
||||
{% if pos %} data-position="{{pos}}" {% endif %}></i>
|
||||
<div class="ui popup">
|
||||
{{ caller() }}
|
||||
</div>
|
||||
</span>
|
||||
{% endmacro %}
|
||||
57
templates/navpage.html
Normal file
57
templates/navpage.html
Normal file
@ -0,0 +1,57 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "macros.html" import ws_fail_message, flash_msg_holder %}
|
||||
|
||||
{% block body %}
|
||||
<header class="ui fixed stackable inverted menu">
|
||||
<div class="ui container">
|
||||
<a href="/" class="header item"
|
||||
><img src="/static/navicon.png" style="height: 20px; width: 20px; margin-right: .5em;"
|
||||
><i>CK Bunker</i></a>
|
||||
|
||||
{% for (path, title) in PAGES %}
|
||||
<a class="item {% if CUR_PAGE == path %}active{% endif %}"
|
||||
href="{{path}}">{{title}}</a>
|
||||
{% endfor %}
|
||||
<a class="item" href="https://coldcardwallet.com/docs" target="docs"
|
||||
>Docs <i class="external alternate icon"></i></a>
|
||||
<div class="right menu">
|
||||
<a class="icon item" title="Immediate logout"
|
||||
href="/logout"><i class="logout icon"></i></a>
|
||||
<a href="/" class="text item"
|
||||
style="font-size: 80%;" title="Current software version: {{VERSION}}"
|
||||
>{{VERSION}} <span class="ui blue mini label">BETA</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{% block uncontained_body %}
|
||||
{% block pre_main_body %}{% endblock %}
|
||||
|
||||
<main class="ui main container main-content-wrapper">
|
||||
{{ flash_msg_holder() }}
|
||||
{{ ws_fail_message() }}
|
||||
|
||||
{% block main_body %}{% endblock %}
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<footer class="ui footer inverted segment">
|
||||
<div class="ui grid container">
|
||||
<div class="row">
|
||||
<div class="five wide column">
|
||||
© 2020 by {{ "https://coinkite.com" | extlink("Coinkite Inc.") }}
|
||||
</div>
|
||||
<div class="six wide center aligned column">
|
||||
{{ ''|link_to_explorer }}
|
||||
</div>
|
||||
<div class="five wide column right aligned">
|
||||
{{ "https://coldcardwallet.com/" | extlink("Coldcard Website") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{% endblock footer %}
|
||||
|
||||
|
||||
{% endblock body %}
|
||||
50
templates/setup/hsm-rule-component.html
Normal file
50
templates/setup/hsm-rule-component.html
Normal file
@ -0,0 +1,50 @@
|
||||
{# implement a "vue component" for individual HSM rules
|
||||
|
||||
limitation:
|
||||
- dropdown's do not track changes to the data, but the other direction (user makes choice)
|
||||
does get into the vue data model
|
||||
- other controls are bi-directional
|
||||
#}
|
||||
|
||||
<script type="x-template" id="hsm-rule-template">
|
||||
{% include "setup/hsm-rule.html" %}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
Vue.component('hsmrule', {
|
||||
template: "#hsm-rule-template",
|
||||
props: ['rule', 'user_list', 'wallet_list', 'chain', 'no_period'],
|
||||
watch: {
|
||||
/*
|
||||
'rule.users': function(new_val, old_val) {
|
||||
// enforce consistency stuff
|
||||
let cnt = new_val.length;
|
||||
console.log('changed', new_val, "cnt", cnt);
|
||||
if(!cnt) {
|
||||
this.rule.min_users = 0;
|
||||
} else {
|
||||
this.rule.min_users = 'all';
|
||||
}
|
||||
$(this.$el).dropdown('set selected', new_val);
|
||||
},
|
||||
*/
|
||||
},
|
||||
methods: {
|
||||
select_fixit: function(fldname, evt) {
|
||||
// LIKE THIS: this.rule.users = val;
|
||||
let val = $(evt.target).val();
|
||||
eval('this.' + fldname + ' = val');
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
console.log('init an hsm rule');
|
||||
/* not using this, seee select_fixit() instead
|
||||
$(this.$el).dropdown('refresh').dropdown({onChange: function (value, text, $choice) {
|
||||
t.$emit('input', value);
|
||||
}});
|
||||
*/
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
39
templates/setup/hsm-rule.html
Normal file
39
templates/setup/hsm-rule.html
Normal file
@ -0,0 +1,39 @@
|
||||
{% from "macros.html" import amount, textarea, choice, bool_choice %}
|
||||
|
||||
{% macro mu_radio(label, desc) %}
|
||||
{{ choice('rule.min_users', label, desc, extras=[('', "(n/a)"), (1, 'Any One'), (2, 'Two Users'), (3, 'Three Users'), ('all', 'All Users')], disabled_if="rule.users.length == 0") }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<div>
|
||||
<div class="ui two fields">
|
||||
{{amount('rule.max_amount', "Max Amount",
|
||||
"Max amount allowed per single transaction. Leave blank for no limit.")}}
|
||||
{{amount('rule.per_period', "Per-Period Amount",
|
||||
"Max amount in one period. Leave blank for no period limit.",
|
||||
disabled_if="no_period")}}
|
||||
</div>
|
||||
|
||||
<div class="ui two fields">
|
||||
{{textarea('rule.whitelist', "Destination Whitelist",
|
||||
"Can only send to these specific payment addresses.",
|
||||
"(base58 or segwit addresses)")}}
|
||||
{{ choice('rule.wallet', "Multisig Wallet Name",
|
||||
"Rule only applies to a specific multisig wallet, or only single-signer (not multisig), or all wallets.",
|
||||
"wallet_list",
|
||||
extras = [('', '(any wallet)'), ('1', '(single signer wallet)')],
|
||||
disabled_if="wallet_list.length==0") }}
|
||||
</div>
|
||||
|
||||
<div class="ui two fields">
|
||||
{{ choice('rule.users', "Authorizing Users",
|
||||
"These users must authenticate to allow the transaction, or blank for no user auth.",
|
||||
"user_list", multi=1, default_text="(no user auth)")}}
|
||||
{{ mu_radio("Minimum Users Needed", "How many of those users are required?") }}
|
||||
</div>
|
||||
|
||||
{{ bool_choice('rule.local_conf', "Unique 6-digit code (per transaction) must be entered on Coldcard keypad.") }}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
268
templates/setup/index.html
Normal file
268
templates/setup/index.html
Normal file
@ -0,0 +1,268 @@
|
||||
{% extends "navpage.html" %}
|
||||
{% from "macros.html" import needs_coldcard_callout %}
|
||||
{% from "macros.html" import fileupload, bool_choice %}
|
||||
|
||||
{% macro accord(title, subtitle, active=False, pill=None) %}
|
||||
<div class="title bigger {% if active %}active{% endif %}" id="{{title|slugify}}">
|
||||
<i class="dropdown icon"></i>
|
||||
{{ title }}
|
||||
<span class="my_sub">
|
||||
{% if pill %}
|
||||
<div class="ui basic mini label" style="margin-right: 2em; margin-bottom: 4px;">{{pill}}</div>
|
||||
{% endif %}
|
||||
|
||||
{{subtitle}}
|
||||
<a href="#{{title|slugify}}" class="ui basic mini icon label"><i class="fitted chain icon"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="content {% if active %}active{% endif %}">
|
||||
<div class="ui divider" style="margin: -5px -13px 28px;"></div>
|
||||
{{ caller() }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
{% block main_body %}
|
||||
{% raw %}
|
||||
<div class="ui" id="setup" v-cloak>
|
||||
|
||||
<div v-if="STATUS.hsm.active" class="ui icon negative message" v-cloak>
|
||||
<i class="ban icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">
|
||||
HSM Already Enabled
|
||||
</div>
|
||||
<p>
|
||||
Further changes to the policy are not possible, because
|
||||
the Coldcard is already in HSM mode.
|
||||
</p></p>
|
||||
To exit HSM mode, the Coldcard must be power-cycled.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="STATUS.hsm.policy_available" class="ui icon message" v-cloak>
|
||||
<i class="close icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">
|
||||
<i class="info circle icon"></i> Existing Policy
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Your Coldcard already holds a policy file from a previous setup. Click here
|
||||
to enable that policy and start the Coldcard in HSM mode. On-device
|
||||
confirmation will be required.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button class="ui primary button" @click="start_hsm_btn()">Start HSM Mode</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endraw %}
|
||||
|
||||
<div class="ui fluid styled accordion" v-if="!STATUS.hsm.active">
|
||||
|
||||
{% include 'setup/rules.html' with context %}
|
||||
{% include 'setup/users.html' with context %}
|
||||
{% include 'setup/paths.html' with context %}
|
||||
{% include 'setup/misc.html' with context %}
|
||||
{# include 'setup/onion.html' with context #}
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="ui grid segment" v-if="!STATUS.hsm.active">
|
||||
|
||||
<div class="nine wide column ">
|
||||
<button class="ui huge primary button"
|
||||
:class="{disabled: !STATUS.connected || STATUS.hsm.active}"
|
||||
@click="submit_policy()">
|
||||
<i class="check mark icon"></i> Save & Start Policy</button>
|
||||
{{ needs_coldcard_callout() }}
|
||||
<div style="margin-left: 1.0em; margin-top: 10px;">
|
||||
{{ bool_choice('wants_copy', "Download (sanitized) copy", style="") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="seven wide column right aligned">
|
||||
<div class="buttons">
|
||||
<button class="ui large button"
|
||||
@click="download_policy()">
|
||||
<i class="download icon"></i> Download Policy</button>
|
||||
{{ fileupload("Import Policy", 'import_policy($event)', 'ui large button') }}
|
||||
</div>
|
||||
<p style="font-size: 80%; margin-top: 4px; margin-right: 1em;">
|
||||
<em>These policy files (JSON) contain sensitive information, including private key
|
||||
for onion server and boot-to-HSM unlock code, when enabled.</em>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock main_body %}
|
||||
|
||||
|
||||
{% block endscript %}
|
||||
|
||||
{% include "setup/hsm-rule-component.html" with context %}
|
||||
|
||||
<script>
|
||||
|
||||
function nice(n) {
|
||||
if(Number.isInteger(n)) {
|
||||
return n;
|
||||
}
|
||||
return n.toFixed(1);
|
||||
}
|
||||
|
||||
// this is slightly cooked data compared to final JSON: strings in places of lists
|
||||
blank_rule = {
|
||||
whitelist: '',
|
||||
per_period: null,
|
||||
max_amount: null,
|
||||
users: '',
|
||||
min_users: 'all',
|
||||
local_conf: false,
|
||||
wallet: null,
|
||||
}
|
||||
|
||||
window.setup_page = new Vue({
|
||||
el: '#setup',
|
||||
data: {
|
||||
STATUS: {{ STATUS|tojson }},
|
||||
new_username: '',
|
||||
new_password: '',
|
||||
authmode: 'totp',
|
||||
users: [],
|
||||
wallets: [],
|
||||
wants_copy: false,
|
||||
POLICY: {
|
||||
never_log: false,
|
||||
must_log: false,
|
||||
priv_over_ux: false,
|
||||
boot_to_hsm: null,
|
||||
period: null,
|
||||
set_sl: null,
|
||||
allow_sl: null,
|
||||
rules: [_.cloneDeep(blank_rule)],
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
start_hsm_btn: function() {
|
||||
window.WEBSOCKET('start_hsm_btn');
|
||||
},
|
||||
delete_user: function(username) {
|
||||
window.WEBSOCKET('delete_user', username);
|
||||
},
|
||||
create_user: function() {
|
||||
window.WEBSOCKET('create_user', this.new_username, this.authmode, this.new_password);
|
||||
this.new_password = '';
|
||||
this.new_username = '';
|
||||
},
|
||||
submit_policy: function() {
|
||||
// final step: send it all to Coldcard (after some python cleanup)
|
||||
json = JSON.stringify(this.POLICY);
|
||||
window.WEBSOCKET('submit_policy', json, this.wants_copy);
|
||||
},
|
||||
download_policy: function() {
|
||||
json = JSON.stringify(this.POLICY);
|
||||
window.WEBSOCKET('download_policy', json);
|
||||
},
|
||||
import_policy: function(evt) {
|
||||
// could implement this locally, but then would have to write more JS
|
||||
var file = evt.target.files[0];
|
||||
file.text().then(function(t) {
|
||||
jj = JSON.parse(t);
|
||||
window.WEBSOCKET('import_policy', jj);
|
||||
});
|
||||
},
|
||||
add_rule: function() {
|
||||
this.POLICY.rules.push(_.cloneDeep(blank_rule));
|
||||
Vue.nextTick(function () {
|
||||
$('.ui.dropdown').dropdown({fullTextSearch: true});
|
||||
});
|
||||
},
|
||||
remove_rule: function(idx) {
|
||||
this.POLICY.rules.splice(idx, 1);
|
||||
},
|
||||
select_fixit: function(fldname, evt) {
|
||||
// LIKE THIS: this.rule.users = val;
|
||||
let val = $(evt.target).val();
|
||||
eval('this.' + fldname + ' = val');
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
period_hrs: function() {
|
||||
return nice(this.POLICY.period / 60.0);
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
'POLICY.must_log': function(new_val, old_val) {
|
||||
if(new_val) {
|
||||
this.POLICY.never_log = false;
|
||||
}
|
||||
},
|
||||
'POLICY.never_log': function(new_val, old_val) {
|
||||
if(new_val) {
|
||||
this.POLICY.must_log = false;
|
||||
}
|
||||
},
|
||||
'POLICY.ewaste_enable': function(new_val, old_val) {
|
||||
if(new_val) {
|
||||
this.POLICY.boot_to_hsm = null;
|
||||
}
|
||||
},
|
||||
|
||||
'POLICY.set_sl': function(new_val) {
|
||||
this.enable_onion = !!new_val;
|
||||
},
|
||||
|
||||
enable_onion: function(nv) {
|
||||
if(!this.onion_addr) {
|
||||
this.pick_onion_addr();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
filters: {
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
// results come back thru here
|
||||
window.vue_app_cb = function(resp) {
|
||||
var self = window.setup_page;
|
||||
|
||||
console.log("CB: ", resp);
|
||||
if(resp.update_policy) {
|
||||
self.POLICY = resp.update_policy;
|
||||
}
|
||||
if(resp.update_status) {
|
||||
self.STATUS = resp.update_status;
|
||||
}
|
||||
if(resp.new_onion) {
|
||||
self.onion_enabled = true;
|
||||
self.onion_addr = resp.new_onion.public;
|
||||
self.POLICY.set_sl = resp.new_onion.private;
|
||||
self.POLICY.allow_sl = 10;
|
||||
self.POLICY.set_sl = resp.new_onion.private;
|
||||
}
|
||||
if(resp.new_master_pw) {
|
||||
self.master_pw = resp.new_master_pw;
|
||||
}
|
||||
};
|
||||
|
||||
// deep-link to open accordion section
|
||||
let hh = window.location.hash;
|
||||
if(hh && hh.length>1) {
|
||||
$('#' + hh.substr(1)).accordion('open');
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
58
templates/setup/misc.html
Normal file
58
templates/setup/misc.html
Normal file
@ -0,0 +1,58 @@
|
||||
{% from "macros.html" import bool_choice, textarea, subhead, text_field, HR %}
|
||||
|
||||
{% call accord('Other Policy', 'Logging and other system-wide rules') %}
|
||||
<div class="ui form">
|
||||
<h4> Logging </h4>
|
||||
<div class="ui two fields">
|
||||
{{ bool_choice('POLICY.must_log', "Fail transactions if we cannot log to MicroSD") }}
|
||||
{{ bool_choice('POLICY.never_log', "Do not log anything, even if MicroSD is inserted") }}
|
||||
</div>
|
||||
|
||||
{{HR()}}
|
||||
|
||||
<h4> Warnings </h4>
|
||||
|
||||
{{ bool_choice('POLICY.warnings_ok', "Permit signing of transactions (PSBT) which have warnings (default: does not).") }}
|
||||
|
||||
{{HR()}}
|
||||
|
||||
<h4> Privacy Vs. Easy of Use </h4>
|
||||
{{ bool_choice('POLICY.priv_over_ux', "If you prefer privacy over convenience, this causes Coldcard to be more secretive and makes the Bunker harder to use, because both will store less data about policy, usernames, and derivation paths.") }}
|
||||
|
||||
{{HR()}}
|
||||
<h4> Boot To HSM </h4>
|
||||
|
||||
<div class="ui two fields">
|
||||
{{ text_field('POLICY.boot_to_hsm',
|
||||
"Coldcard will reboot directly to HSM mode, but will accept this 6-digit code to escape, if provided immediately.",
|
||||
placeholder="(optional)", extras='pattern="[0-9]{6}" required minlength=6 maxlength=6 ',
|
||||
rhs_label="6-digit code", disabled_if="POLICY.ewaste_enable") }}
|
||||
{{ bool_choice('POLICY.ewaste_enable', "Do not accept any code. Always boot to HSM mode.") }}
|
||||
{# bool_choice('POLICY.ewaste_enable', "Do not accept any code. Always stay in HSM mode and there is no way out. CAUTION: Even master PIN holder cannot change HSM policy nor escape HSM mode! Firmware upgrades are not possible.") #}
|
||||
</div>
|
||||
|
||||
<div class="ui yellow icon compact message" v-if="POLICY.ewaste_enable">
|
||||
<i class="warning sign icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">
|
||||
Warning
|
||||
</div>
|
||||
<p>
|
||||
This setting is <b>irreversible</b>.
|
||||
No changes to firmware, HSM policy, Coldcard settings will be possible—ever again.
|
||||
<br>
|
||||
Not even the master PIN holder can change HSM policy nor escape HSM mode! Firmware upgrades are not possible.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{{HR()}}
|
||||
<h4> Notes </h4>
|
||||
|
||||
{{ textarea('POLICY.notes', "Free-form text shown on Coldcard when approving HSM Policy.",
|
||||
placeholder="(optional)", rows=3) }}
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
36
templates/setup/onion.html
Normal file
36
templates/setup/onion.html
Normal file
@ -0,0 +1,36 @@
|
||||
{% from "macros.html" import amount, text_field, bool_choice, wrap_field %}
|
||||
|
||||
{% call accord('Onion Address', 'Enable Tor access to the Bunker') %}
|
||||
<div class="ui grid form">
|
||||
|
||||
<div class="six wide column">
|
||||
<div class="field">
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" v-model="enable_onion">
|
||||
<label>Operate Tor Hidden Service</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% call wrap_field(None, 'Tor Login Password', disabled_if="!enable_onion") %}
|
||||
<div class="ui action input">
|
||||
<input v-model="master_pw" class="tt-font" minlength=4 maxlength=128 required
|
||||
type="text" placeholder="{{placeholder}}" {{extras}}>
|
||||
<button class="ui button" @click="pick_master_pw()"><i class="recycle icon"></i> Spin Again</button>
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ui ten wide right aligned column" v-if="enable_onion">
|
||||
{% raw %}
|
||||
<tt class="tt-font-small">http://{{onion_addr}}</tt>
|
||||
{% endraw %}
|
||||
|
||||
<br>
|
||||
<button style="margin-top: 8px;" class="ui small button" @click="pick_onion_addr()"><i class="recycle icon"></i> Spin Again</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endcall %}
|
||||
|
||||
50
templates/setup/paths.html
Normal file
50
templates/setup/paths.html
Normal file
@ -0,0 +1,50 @@
|
||||
{% from "macros.html" import textarea, subhead %}
|
||||
{% call accord('Derivation Paths', 'For message signing & address generation', pill="ADVANCED") %}
|
||||
|
||||
<div class="ui grid form">
|
||||
<div class="ten wide column">
|
||||
|
||||
{{ subhead("Derivation Path Whitelists") }}
|
||||
|
||||
<p>
|
||||
You may limit text message signing to specific derivation paths. Similarly, the Coldcard will
|
||||
not share calculated addresses or derived XPUB values, unless whitelisted here.
|
||||
</p><p>
|
||||
Leave blank to block corresponding feature. Multiple values maybe be given,
|
||||
separated by spaces or commas.
|
||||
</p>
|
||||
|
||||
|
||||
{{ textarea('POLICY.msg_paths', "Will only sign messages using indicated path(s)",
|
||||
placeholder="(signing not be allowed)") }}
|
||||
</div>
|
||||
|
||||
<div class="six wide right aligned column">
|
||||
<table class="ui compact simple small table">
|
||||
<thead>
|
||||
<tr><th colspan=2>Special Values
|
||||
<tbody>
|
||||
<tr><td><tt>any</tt> <td>Allow any path.
|
||||
<tr><td><tt>m/1/2/3/*</tt> <td>Require that path but the last position is any value.
|
||||
<tr><td><tt>m/1/2/3/*'</tt> <td>Last position must be hardened.
|
||||
<tr><td><tt>p2sh</tt> <td>Allow P2SH (script) addresses for multisig wallets.
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui grid form">
|
||||
<div class="sixteen wide column">
|
||||
{{ subhead("Other Whitelisted Derivation Paths") }}
|
||||
|
||||
<div class="ui two fields">
|
||||
|
||||
{{ textarea('POLICY.share_xpubs', "Share derived XPUB values on these paths (master xpub is always shared)",
|
||||
placeholder="(xpub derivation not allowed)") }}
|
||||
|
||||
{{ textarea('POLICY.share_addrs', "Share these derived addresses (ie. deposit addresses)",
|
||||
placeholder="(address derivation not allowed)") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
96
templates/setup/rules.html
Normal file
96
templates/setup/rules.html
Normal file
@ -0,0 +1,96 @@
|
||||
{% call accord('Spending Rules', 'When and how much can be sent out') %}
|
||||
|
||||
{% from "macros.html" import subhead %}
|
||||
|
||||
<div class="ui form">
|
||||
|
||||
{{ subhead("Velocity Time Period") }}
|
||||
|
||||
<div class="fields">
|
||||
<div class="four wide field">
|
||||
<div class="ui right labeled fluid input">
|
||||
<input v-model="POLICY.period" type="number" placeholder="(disabled)"
|
||||
style="text-align: center;"
|
||||
maxlength="4">
|
||||
<div class="ui basic label">
|
||||
minutes
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% raw %}
|
||||
<div class="two wide field">
|
||||
<div v-if="POLICY.period>=30" style="line-height: 37px;">
|
||||
= {{ period_hrs }} hours
|
||||
</div>
|
||||
</div>
|
||||
{% endraw %}
|
||||
|
||||
<div class="ten wide right floated right aligned field">
|
||||
<div class="ui mini buttons">
|
||||
<button class="ui small compact button" @click="POLICY.period=null">Off</button>
|
||||
<button class="ui small compact button" @click="POLICY.period=60">1 hr</button>
|
||||
<button class="ui small compact button" @click="POLICY.period=2*60">2 hrs</button>
|
||||
<button class="ui small compact button" @click="POLICY.period=4*60">4 hrs</button>
|
||||
<button class="ui small compact button" @click="POLICY.period=8*60">8 hrs</button>
|
||||
<button class="ui small compact button" @click="POLICY.period=12*60">12 hrs</button>
|
||||
<button class="ui small compact button" @click="POLICY.period=24*60">1 day</button>
|
||||
<button class="ui small compact button" @click="POLICY.period=48*60">2 days</button>
|
||||
<button class="ui small compact button" @click="POLICY.period=72*60">3 days</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="description">
|
||||
Time period starts as soon as rule with a velocity limit is applied.
|
||||
The total amount sent is tracked, for each rule independently, until the period ends.
|
||||
All rules share the same time period for these velocity calculations.
|
||||
</p>
|
||||
|
||||
{{ subhead("Rules") }}
|
||||
|
||||
<p>
|
||||
Multiple spending rules can be defined. The first matching rule is applied
|
||||
when a PSBT is considered, and its velocity limit is the one affected, so place
|
||||
more restrictive rules first. All elements of the specific rule must be met
|
||||
before it is applied.
|
||||
</p>
|
||||
<p>
|
||||
<button class="ui compact blue icon button" @click="add_rule()" :disabled="POLICY.rules.length >= 10"><i class="icon add"></i> Add Rule</button>
|
||||
</p>
|
||||
|
||||
<div v-if="POLICY.rules.length == 0">
|
||||
<p>NOTE: You have <b>no rules defined</b>. It will not be possible to authorize transactions.
|
||||
</div>
|
||||
|
||||
<template v-for="(rule, idx) in POLICY.rules">
|
||||
{% raw %}
|
||||
<h4 class="ui dividing header">Rule #{{idx+1}}</h4>
|
||||
{% endraw %}
|
||||
|
||||
<button style="float: right; margin-top: -43px; " class="ui mini red compact icon button"
|
||||
@click="remove_rule(idx)"><i class="icon trash"></i> Delete Rule</button>
|
||||
|
||||
<hsmrule :rule="rule" :user_list="STATUS.hsm.users || []"
|
||||
:wallet_list="STATUS.hsm.wallets || []"
|
||||
:chain="STATUS.hsm.chain || 'BTC'" :no_period="!POLICY.period">
|
||||
</hsmrule>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
|
||||
<datalist id="default-amts">
|
||||
<option value="10.0">
|
||||
<option value="5.0">
|
||||
<option value="2.0">
|
||||
<option value="1.0">
|
||||
<option value="0.500">
|
||||
<option value="0.200">
|
||||
<option value="0.100">
|
||||
<option value="0.050">
|
||||
<option value="0.020">
|
||||
<option value="0.010">
|
||||
</datalist>
|
||||
|
||||
94
templates/setup/users.html
Normal file
94
templates/setup/users.html
Normal file
@ -0,0 +1,94 @@
|
||||
{% call accord('Users', 'Add and remove Coldcard users', active=False) %}
|
||||
|
||||
<div class="ui form">
|
||||
<div class="ui grid">
|
||||
<div class="ten wide column">
|
||||
|
||||
<h4>Add New Users</h4>
|
||||
<p>
|
||||
Add up to 30 user names here. These users can authorize
|
||||
spending based on the specific rules where they are named. Verification of the user is
|
||||
done via 2FA or passwords.
|
||||
</p>
|
||||
|
||||
{% raw %}
|
||||
<div class="fields">
|
||||
<div class="field">
|
||||
<label>Username</label>
|
||||
<input v-model="new_username" type="text" class="tt-font"
|
||||
maxlength="16"
|
||||
placeholder="username (16 chars)" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="field" v-if="authmode == 'give_pw'">
|
||||
<label>Password</label>
|
||||
<input v-model="new_password"
|
||||
type="password" placeholder="(password)" autocomplete="off" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label>Auth Method</label>
|
||||
|
||||
<div class="inline fields">
|
||||
|
||||
<div class="ui radio checkbox field"
|
||||
data-position="top left"
|
||||
data-tooltip="Use any RFC6238-compatible mobile app to scan the QR code and generate a 6-digit, time-based, single-use pass code">
|
||||
<input type="radio" v-model="authmode" value="totp" checked="" tabindex="0" class="hidden">
|
||||
<label>TOTP based 2FA
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ui radio checkbox field"
|
||||
data-position="top left"
|
||||
data-variation="wide"
|
||||
data-tooltip="Coldcard picks a password and shows it on-screen for you to capture (QR and text)">
|
||||
<input type="radio" v-model="authmode" value="rand_pw" tabindex="0" class="hidden">
|
||||
<label>Password (random)
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="ui radio checkbox field"
|
||||
data-tooltip="Conventional secret password you provide">
|
||||
<input type="radio" v-model="authmode" value="give_pw" tabindex="0" class="hidden">
|
||||
<label>Password (provided)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui compact blue icon button"
|
||||
:disabled="new_username.length == 0 || !STATUS.connected" @click="create_user()"
|
||||
><i class="icon add"></i> Add User</button>
|
||||
{% endraw %}
|
||||
{{ needs_coldcard_callout() }}
|
||||
{% raw %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="six wide column">
|
||||
<table class="ui table">
|
||||
<thead>
|
||||
<tr><th>Existing Coldcard Users
|
||||
<tbody>
|
||||
<tr v-for="(name, index) in STATUS.hsm.users">
|
||||
<td>
|
||||
<button class="ui mini icon button" title="Delete user!"
|
||||
@click="delete_user(name)"
|
||||
><i class="close fitted icon"></i></button>
|
||||
<tt>{{name}}</tt>
|
||||
</tr>
|
||||
<tr v-if="!STATUS.hsm.users || STATUS.hsm.users.length == 0">
|
||||
<td><em>No users yet.</em>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endraw %}
|
||||
{% endcall %}
|
||||
|
||||
164
templates/tools/index.html
Normal file
164
templates/tools/index.html
Normal file
@ -0,0 +1,164 @@
|
||||
{% extends "navpage.html" %}
|
||||
{% from "macros.html" import needs_coldcard_callout %}
|
||||
{% from "macros.html" import needs_coldcard_message, subhead, bool_choice %}
|
||||
|
||||
{% block main_body %}
|
||||
<div class="ui" id="tools" v-cloak>
|
||||
|
||||
{# needs_coldcard_message() #}
|
||||
|
||||
<div class="ui segment">
|
||||
<h2>Text Message Signing</h2>
|
||||
|
||||
<div v-if="!msg_paths.length">
|
||||
Message signing is disabled by your HSM policy so it's not possible to sign messages.
|
||||
</div>
|
||||
|
||||
<div v-else class="ui form" >
|
||||
<div class="ui field">
|
||||
<label>Message (single line recommended)</label>
|
||||
<textarea rows=2 class="ui textarea" v-model="msg_text" placeholder="(required)">
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<div class="ui three fields">
|
||||
<div class="ui field">
|
||||
<label>Derivation Path</label>
|
||||
<input type="text" v-model="signing_path" style="width: 90%"></input>
|
||||
|
||||
{% if msg_paths %}
|
||||
<div class="ui simple dropdown js-shortcuts">
|
||||
<div class="text"> Shortcuts</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{% for p in msg_paths %}
|
||||
<div class="item" @click.prevent='pick_path({{p|tojson}})'><tt>{{p}}</tt></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="ui grouped fields">
|
||||
<label>Address Format</label>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" v-model="addr_fmt" value="classic" name="addr_fmt">
|
||||
<label>Classic (base58)</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" v-model="addr_fmt" value="segwit" name="addr_fmt">
|
||||
<label>Segwit (bech32)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="field">
|
||||
<button class="ui huge icon submit primary button"
|
||||
@click.prevent="sign_message_btn"
|
||||
:class="{disabled: !msg_text.length || !signing_path.length || !STATUS.connected, loading: busy_signing}"
|
||||
><i class="pencil alternate icon"></i> Sign Message</button>
|
||||
{{ needs_coldcard_callout('top') }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ui horizontal divider" style="padding-top: .8em">
|
||||
Signature & Address
|
||||
</div>
|
||||
|
||||
<div class="ui field" :class="{disabled: !signature}">
|
||||
{#<label>Signature and Address</label> #}
|
||||
<textarea rows=2 class="ui textarea tt-font-small" v-model="signature"></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui segment">
|
||||
<h2>Recovery Tool</h2>
|
||||
|
||||
<p>This will provide a means for you to construct a PSBT
|
||||
which moves all the funds the system can find on the blockchain
|
||||
to a new address.</p>
|
||||
|
||||
<div class="ui orange label">WIP</div>
|
||||
</div>
|
||||
|
||||
<div class="ui segment">
|
||||
<h2>Address Generator</h2>
|
||||
|
||||
<p>Use this tool to make deposit addresses for your Coldcard's wallets.</p>
|
||||
|
||||
<div class="ui orange label">WIP</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block endscript %}
|
||||
<script>
|
||||
window.tools = new Vue({
|
||||
el: '#tools',
|
||||
data: {
|
||||
STATUS: {{ STATUS|tojson }},
|
||||
msg_text: '',
|
||||
signing_path: {{(msg_paths[0] or 'm') | tojson}},
|
||||
addr_fmt: 'classic',
|
||||
msg_paths: {{ msg_paths|tojson}},
|
||||
signature: '',
|
||||
busy_signing: false,
|
||||
},
|
||||
watch: {
|
||||
addr_fmt: function(nv,ov) {
|
||||
if(nv != ov) this.signature = '';
|
||||
},
|
||||
msg_text: function(nv,ov) {
|
||||
if(nv != ov) this.signature = '';
|
||||
},
|
||||
signing_path: function(nv,ov) {
|
||||
if(nv != ov) this.signature = '';
|
||||
if(nv.startsWith("m/84'/")) {
|
||||
this.addr_fmt = 'segwit';
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
sign_message_btn: function() {
|
||||
this.msg_text = this.msg_text.trim();
|
||||
this.busy_signing = true;
|
||||
window.WEBSOCKET('sign_message', this.msg_text, this.signing_path, this.addr_fmt);
|
||||
},
|
||||
pick_path: function(p) {
|
||||
this.signing_path = p;
|
||||
},
|
||||
},
|
||||
mounted: function() {
|
||||
// results come back thru here
|
||||
window.vue_app_cb = function(resp) {
|
||||
var self = window.tools;
|
||||
|
||||
if(resp.update_status) {
|
||||
self.STATUS = resp.update_status;
|
||||
}
|
||||
if(resp.msg_signing_result) {
|
||||
self.busy_signing = false;
|
||||
self.signature = resp.msg_signing_result;
|
||||
}
|
||||
};
|
||||
|
||||
console.log('config');
|
||||
|
||||
// bugfix; stop semantic from changing text of Shortbuts dropdown
|
||||
setTimeout(function() {
|
||||
$('.js-shortcuts').dropdown({ action: 'hide' });
|
||||
}, 100);
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
380
templates/txn/index.html
Normal file
380
templates/txn/index.html
Normal file
@ -0,0 +1,380 @@
|
||||
{% extends "navpage.html" %}
|
||||
{% from "macros.html" import needs_coldcard_message, subhead, bool_choice, info_hover, info_hover_long %}
|
||||
|
||||
{% macro status_value(hdr) %}
|
||||
<tr><th>{{hdr}}
|
||||
<td>
|
||||
{{ caller() }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endmacro %}
|
||||
|
||||
{% block main_body %}
|
||||
<div class="ui" id="transaction" v-cloak>
|
||||
|
||||
<div v-if="!STATUS.hsm.active && STATUS.connected" class="ui icon negative message" v-cloak>
|
||||
<i class="ban icon"></i>
|
||||
<div class="content">
|
||||
<div class="header">
|
||||
HSM Not Enabled
|
||||
</div>
|
||||
<p>
|
||||
The Coldcard is not in HSM mode.
|
||||
Typically, you should enable a <a href="/setup">spending policy</a> before using this page,
|
||||
but it is possible to upload and sign PSBT files as it is now. You will need to
|
||||
approve each transaction on the Coldcard's screen.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ needs_coldcard_message() }}
|
||||
|
||||
<div class="ui grid" v-if="STATUS.connected">
|
||||
|
||||
<div class="sixteen wide column">
|
||||
|
||||
<table class="ui celled compact inverted blue table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="four wide center aligned" data-tooltip="Number of requests approved">
|
||||
Approvals
|
||||
</th>
|
||||
<th class="four wide center aligned" data-tooltip="Number of requests refused so far">
|
||||
Refusals
|
||||
</th>
|
||||
<th class="four wide center aligned" :data-tooltip="STATUS.hsm.period | period_cleanup">
|
||||
Period Ends
|
||||
</th>
|
||||
<th class="four wide center aligned" data-tooltip="Total Spent in current period">
|
||||
Amount Spent
|
||||
</th>
|
||||
<tbody>
|
||||
{% raw %}
|
||||
<tr>
|
||||
<td class="center aligned">
|
||||
<span class="bignum">{{ STATUS.hsm.approvals || 0 }}</span>
|
||||
</td>
|
||||
<td class="center aligned" :data-tooltip="'Last problem: ' + STATUS.hsm.last_refusal">
|
||||
<span class="bignum">{{ STATUS.hsm.refusals || 0}}</span>
|
||||
</td>
|
||||
<td class="center aligned">
|
||||
<span v-if="abs_period_ends" :data-livestamp="abs_period_ends"></span>
|
||||
<span class="" v-else>—</span>
|
||||
</td>
|
||||
<td class="center aligned">
|
||||
<span class="">{{ total_spent || '—' }}</span>
|
||||
{% endraw %}
|
||||
{% call info_hover_long('bottom right') %}
|
||||
{% raw %}
|
||||
<p v-if="!STATUS.hsm.has_spent">
|
||||
No amounts spent in current period.
|
||||
</p>
|
||||
<table class="ui small compact celled striped table" style="width: 15em;"
|
||||
v-if="STATUS.hsm.has_spent && STATUS.hsm.has_spent.length">
|
||||
<thead>
|
||||
<tr><td class="one wide center aligned"><b>Rule</b>
|
||||
<td class="five wide right aligned"><b>Amount Spent</b>
|
||||
<tbody>
|
||||
<tr v-for="(amt, idx) in STATUS.hsm.has_spent">
|
||||
<td class="center aligned">#{{idx+1}}
|
||||
<td class="right aligned"><span class='btcnum'>{{ amt | btc_value }}</span>
|
||||
</tr>
|
||||
</table>
|
||||
{% endraw %}
|
||||
{% endcall %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Transaction Signing</h2>
|
||||
|
||||
<div class="ui grid celled form">
|
||||
|
||||
<div class="eight wide column">
|
||||
<div class="ui field" v-if="!STATUS.psbt_size" style="margin-top: 1em">
|
||||
<input type="file" @change="upload_psbt($event)" class="inputfile" id="embedpollfileinput"
|
||||
accept="text/plain,.txt,.psbt" />
|
||||
<label for="embedpollfileinput" class="ui fluid huge primary icon button"
|
||||
style="font-size: 1.4rem !important; line-height: 3.4rem; color: white;">
|
||||
<i class="ui upload icon"></i>
|
||||
Upload PSBT to Bunker
|
||||
</label>
|
||||
</div>
|
||||
<div v-if="STATUS.psbt_size" class="ui segment">
|
||||
{% raw %}
|
||||
<div class="ui top attached large label">PSBT File</div>
|
||||
<button class="ui red top right attached large label" @click="clear_psbt_btn()"
|
||||
data-tooltip="Forget PSBT file">
|
||||
<i class="trash icon" style="margin: 0;"></i>
|
||||
</button>
|
||||
<p style="margin-top: 3.75em">
|
||||
{{STATUS.psbt_size }} bytes, with
|
||||
SHA256: <code class='sha256'>{{STATUS.psbt_hash.substr(0, 6) }}⋯{{STATUS.psbt_hash.substr(64-6) }}</code>
|
||||
</p>
|
||||
|
||||
{% endraw %}
|
||||
|
||||
<div class="ui horizontal divider" style="padding-top: .8em">
|
||||
Transaction Preview
|
||||
</div>
|
||||
|
||||
|
||||
{% raw %}
|
||||
<template v-if="!STATUS.psbt_preview && STATUS.psbt_size">
|
||||
<button class="ui large basic blue icon button" @click="preview_psbt_btn()"
|
||||
style="float: right;"
|
||||
data-tooltip="Send transaction to Coldcard for preview">
|
||||
<i class="search icon"></i> Display
|
||||
</button>
|
||||
</template>
|
||||
<template v-if="STATUS.psbt_preview && STATUS.psbt_size">
|
||||
<button class="ui basic mini blue icon button" @click="preview_psbt_btn()"
|
||||
style="float: right;"
|
||||
data-tooltip="Preview transaction again">
|
||||
<i class="refresh icon"></i>
|
||||
</button>
|
||||
</template>
|
||||
<pre v-if="STATUS.psbt_preview" class="wordwrap">{{STATUS.psbt_preview }}</pre>
|
||||
<template v-if="!STATUS.psbt_preview && STATUS.psbt_size">
|
||||
<p>The Coldcard can preview the transaction and what it will do if
|
||||
approved, signed and broadcast. The HSM policy is not considered.
|
||||
</p>
|
||||
</template>
|
||||
{% endraw %}
|
||||
|
||||
</div>
|
||||
|
||||
<template v-if="STATUS.psbt_size && STATUS.connected">
|
||||
|
||||
{% call bool_choice('send_immediately', None) %}
|
||||
<label>Broadcast transaction immediately
|
||||
{{ info_hover("Discretely broadcast using Blockstream's API over Tor") }}
|
||||
</label>
|
||||
{% endcall %}
|
||||
{{ bool_choice('finalize', "Finalize transaction", disabled_if="send_immediately") }}
|
||||
{% call bool_choice('wants_download', None, readonly_if="!send_immediately") %}
|
||||
{% raw %}
|
||||
<label>
|
||||
Download {{finalize?'transaction (hex in text file)':'signed PSBT file'}}
|
||||
</label>
|
||||
{% endraw %}
|
||||
{% endcall %}
|
||||
|
||||
{% raw %}
|
||||
<div class="ui field">
|
||||
<button class="ui huge fluid icon primary button"
|
||||
:class="{disabled: !STATUS.psbt_size || !STATUS.connected, loading:STATUS.busy_signing}"
|
||||
@click="submit_btn()">
|
||||
<i class="check edit outline icon"></i>
|
||||
<span v-if="!send_immediately">Sign Transaction</span>
|
||||
<span v-if="send_immediately">Sign and Broadcast Transaction</span>
|
||||
</button>
|
||||
{% endraw %}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="eight wide column">
|
||||
<table class="ui compact small very basic table">
|
||||
<thead>
|
||||
<tr><th class="eight wide right aligned">Authorizing User
|
||||
<th class="eight wide">One-Time Code or Password
|
||||
{% call info_hover_long('top center') %}
|
||||
Depending on your spending policy rules, all or none of these users may be
|
||||
required to authorize spending. Leave blank those you are not using.
|
||||
{% endcall %}
|
||||
<tbody>
|
||||
{% raw %}
|
||||
<tr v-if="needs_local">
|
||||
<th class="right aligned">Local Code
|
||||
<td>
|
||||
<tt v-if="STATUS.local_code">{{STATUS.local_code}}</tt>
|
||||
<span v-else="STATUS.local_code">TBD — need PSBT first</span>
|
||||
{% endraw %}
|
||||
{% call info_hover_long('top center') %}
|
||||
When required, the local Coldcard operator should enter this 6-digit code,
|
||||
<em>before you press</em> the button on this page.
|
||||
{% endcall %}
|
||||
{% raw %}
|
||||
</tr>
|
||||
<tr v-for="(pa, index) in STATUS.pending_auth">
|
||||
<td v-if="pa.name" class="right aligned"><tt>{{pa.name}}<tt>
|
||||
</td>
|
||||
<td v-else class="right aligned">
|
||||
<input type="text" placeholder="username"
|
||||
class="width-fix"
|
||||
maxlength=16 @change="set_auth_user(index, $event)">
|
||||
</td>
|
||||
<td>
|
||||
<form>
|
||||
<div class="ui action input">
|
||||
<input type="password" placeholder="6-digits / password"
|
||||
class="width-fix"
|
||||
autocomplete="off" :value="pa.has_guess"
|
||||
@change="set_auth_pw(index, $event)">
|
||||
<button class="ui icon button"
|
||||
@click.prevent="clear_auth_pw(index)">
|
||||
<i class="close icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="!STATUS.pending_auth.length" colspan=2><td><em>No user authorization needed.</em>
|
||||
</tr>
|
||||
{% endraw %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="ui grid celled">
|
||||
<div class="sixteen wide column">
|
||||
|
||||
{{ subhead('Coldcard HSM Policy Summary') }}
|
||||
|
||||
{% if policy_summary %}
|
||||
<p>
|
||||
For your reference, here is the Coldcard's interpretation of
|
||||
the HSM policy when it was approved and installed.
|
||||
</p>
|
||||
|
||||
<pre class="wordwrap">{{- policy_summary -}}</pre>
|
||||
{% else %}
|
||||
<p>Not available. You have chosen privacy over user-experience.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
{% endblock main_body %}
|
||||
|
||||
{% block endscript %}
|
||||
<script>
|
||||
async function sha256(bin) {
|
||||
// from <https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest>
|
||||
const hashBuffer = await crypto.subtle.digest('SHA-256', bin);
|
||||
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
||||
// convert bytes to hex string
|
||||
return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
|
||||
}
|
||||
|
||||
function SAT2BTC(n) {
|
||||
var coins = n / 1E8;
|
||||
if(Number.isInteger(coins)) {
|
||||
return coins + ' BTC';
|
||||
}
|
||||
return coins.toFixed(8).replace(/0*$/, '') + ' BTC';
|
||||
}
|
||||
|
||||
window.transaction = new Vue({
|
||||
el: '#transaction',
|
||||
data: {
|
||||
STATUS: {{ STATUS|tojson }},
|
||||
finalize: true,
|
||||
send_immediately: false,
|
||||
wants_download: true,
|
||||
last_error: null,
|
||||
needs_local: {{ needs_local|tojson }},
|
||||
abs_period_ends: null,
|
||||
total_spent: null,
|
||||
},
|
||||
watch: {
|
||||
send_immediately: function(nv,ov) {
|
||||
this.finalize = nv;
|
||||
if(!nv) this.wants_download = true;
|
||||
},
|
||||
'STATUS.hsm': function(nv,ov) {
|
||||
var ts = (new Date()).getTime() / 1000;
|
||||
|
||||
if(nv.period_ends) {
|
||||
this.abs_period_ends = ts + nv.period_ends;
|
||||
} else {
|
||||
this.abs_period_ends = null;
|
||||
}
|
||||
|
||||
var v = _.sum(this.STATUS.hsm.has_spent);
|
||||
this.total_spent = v ? SAT2BTC(v) : null;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
submit_btn: function() {
|
||||
window.WEBSOCKET('submit_psbt', this.STATUS.psbt_hash, this.send_immediately,
|
||||
this.finalize, this.wants_download);
|
||||
},
|
||||
clear_psbt_btn: function() {
|
||||
window.WEBSOCKET('clear_psbt');
|
||||
},
|
||||
preview_psbt_btn: function() {
|
||||
window.WEBSOCKET('preview_psbt');
|
||||
},
|
||||
upload_psbt: function(evt) {
|
||||
// package up bytes and send
|
||||
var file = evt.target.files[0];
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function(){
|
||||
var bin = reader.result;
|
||||
|
||||
$(evt.target).val(''); // bugfix: so works 2nd time, same file.
|
||||
|
||||
sha256(bin).then(function(d) {
|
||||
window.WEBSOCKET('upload_psbt', bin.byteLength, d,
|
||||
base64js.fromByteArray(new Uint8Array(bin)));
|
||||
});
|
||||
}
|
||||
|
||||
reader.readAsArrayBuffer(file);
|
||||
},
|
||||
clear_auth_pw: function(idx) {
|
||||
window.WEBSOCKET('auth_offer_guess', idx, 0, '');
|
||||
if(!this.STATUS.pending_auth[idx].has_name) {
|
||||
window.WEBSOCKET('auth_set_name', idx, '');
|
||||
}
|
||||
},
|
||||
set_auth_user: function(idx, evt) {
|
||||
var name = $(evt.target).val();
|
||||
window.WEBSOCKET('auth_set_name', idx, name);
|
||||
},
|
||||
set_auth_pw: function(idx, evt) {
|
||||
// ideally, if it is a password, the HMAC/hashing, would be done local to browser here
|
||||
var tar = $(evt.target);
|
||||
var guess = tar.val();
|
||||
var ts = Math.round((new Date()).getTime() / (30*1000));
|
||||
|
||||
window.WEBSOCKET('auth_offer_guess', idx, ts, guess);
|
||||
},
|
||||
},
|
||||
|
||||
filters: {
|
||||
btc_value: function(n) {
|
||||
return SAT2BTC(n);
|
||||
},
|
||||
period_cleanup: function(mins) {
|
||||
if(!mins) return 'No velocity period configured'
|
||||
return 'Velocity period is ' + mins + ' minutes';
|
||||
},
|
||||
},
|
||||
mounted: function() {
|
||||
// results come back thru here
|
||||
window.vue_app_cb = function(resp) {
|
||||
var self = window.transaction;
|
||||
|
||||
if(resp.update_status) {
|
||||
self.STATUS = resp.update_status;
|
||||
}
|
||||
};
|
||||
},
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_head_code %}
|
||||
<script src="/static/ext/moment.min.js"></script>
|
||||
<script src="/static/ext/livestamp.min.js"></script>
|
||||
{% endblock extra_head_code %}
|
||||
151
torsion.py
Normal file
151
torsion.py
Normal file
@ -0,0 +1,151 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Interface to STEM and from that to Tord and the Tor network.
|
||||
#
|
||||
# Refs:
|
||||
# - <https://stem.torproject.org/tutorials/over_the_river.html#ephemeral-hidden-services>
|
||||
#
|
||||
import logging, asyncio
|
||||
from utils import json_loads, json_dumps, Singleton
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from persist import settings
|
||||
from status import STATUS
|
||||
|
||||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
executor = ThreadPoolExecutor(max_workers=10)
|
||||
|
||||
class TorViaStem(metaclass=Singleton):
|
||||
def __init__(self):
|
||||
self.controller = None
|
||||
self.service = None
|
||||
|
||||
async def startup(self):
|
||||
# just test if we can see tord
|
||||
await self.connect(raise_on_error=False)
|
||||
|
||||
def get_current_addr(self):
|
||||
# return onion address we are currently on, or None
|
||||
if not self.service:
|
||||
return None
|
||||
return self.service.service_id + '.onion'
|
||||
|
||||
async def connect(self, raise_on_error=True):
|
||||
from stem.connection import connect
|
||||
|
||||
if self.controller:
|
||||
return self.controller
|
||||
|
||||
def doit():
|
||||
self.controller = connect(control_port=('127.0.0.1', settings.TORD_PORT))
|
||||
|
||||
if self.controller:
|
||||
logging.info("Tord version: " + str(self.controller.get_version()))
|
||||
else:
|
||||
logging.error("Unable to connect to local 'tord' server")
|
||||
if raise_on_error:
|
||||
raise RuntimeError("No local 'tord' server")
|
||||
|
||||
|
||||
return self.controller
|
||||
|
||||
loop = asyncio.get_running_loop()
|
||||
rv = await loop.run_in_executor(executor, doit)
|
||||
|
||||
STATUS.tord_good = bool(rv)
|
||||
STATUS.notify_watchers()
|
||||
|
||||
async def pick_onion_addr(self):
|
||||
|
||||
c = await self.connect()
|
||||
|
||||
def doit():
|
||||
# let Tor pick the key, since they don't document their tricky stuff
|
||||
s = self.controller.create_ephemeral_hidden_service({80: 1},
|
||||
detached=False,
|
||||
await_publication=False, key_content='ED25519-V3')
|
||||
|
||||
rv = (s.service_id+'.onion', s.private_key)
|
||||
|
||||
# kill it immediately
|
||||
self.controller.remove_ephemeral_hidden_service(s.service_id)
|
||||
|
||||
return rv
|
||||
|
||||
loop = asyncio.get_running_loop()
|
||||
return await loop.run_in_executor(executor, doit)
|
||||
|
||||
async def stop_tunnel(self):
|
||||
# hang up if running
|
||||
if not self.service:
|
||||
return
|
||||
|
||||
def doit():
|
||||
if self.service:
|
||||
logging.info(f"Disconnecting previous service at: {self.service.service_id}.onion")
|
||||
self.controller.remove_ephemeral_hidden_service(self.service.service_id)
|
||||
self.service = None
|
||||
|
||||
STATUS.onion_addr = None
|
||||
STATUS.notify_watchers()
|
||||
|
||||
loop = asyncio.get_running_loop()
|
||||
return await loop.run_in_executor(executor, doit)
|
||||
|
||||
async def start_tunnel(self):
|
||||
from persist import BP, settings
|
||||
|
||||
c = await self.connect()
|
||||
|
||||
def doit():
|
||||
if self.service:
|
||||
logging.info(f"Disconnecting previous service at: {self.service.service_id}.onion")
|
||||
self.controller.remove_ephemeral_hidden_service(self.service.service_id)
|
||||
self.service = None
|
||||
|
||||
# give Tor the key from earlier run
|
||||
k = BP['onion_pk']
|
||||
s = self.controller.create_ephemeral_hidden_service({80: settings.PORT_NUMBER},
|
||||
detached=False, discard_key=True,
|
||||
await_publication=True, key_type='ED25519-V3', key_content=k)
|
||||
|
||||
addr = s.service_id+'.onion'
|
||||
assert addr == BP['onion_addr'], f"Mismatch, got: {addr} not {BP.onion_addr} expected"
|
||||
|
||||
self.service = s
|
||||
|
||||
return addr
|
||||
|
||||
loop = asyncio.get_running_loop()
|
||||
addr = await loop.run_in_executor(executor, doit)
|
||||
|
||||
STATUS.onion_addr = addr
|
||||
STATUS.notify_watchers()
|
||||
|
||||
|
||||
TOR = TorViaStem()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
controller = connect()
|
||||
|
||||
if not controller:
|
||||
sys.exit(1) # unable to get a connection
|
||||
|
||||
print('Your tord is version: %s' % controller.get_version())
|
||||
|
||||
#d = controller.get_hidden_service_descriptor('explorernuoc63nb.onion')
|
||||
d = controller.get_hidden_service_descriptor('explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion')
|
||||
print("obj = %r" % d)
|
||||
print("pubkey = %r" % d.permanent_key)
|
||||
print("published = %r" % d.published)
|
||||
|
||||
service = controller.create_ephemeral_hidden_service({80: 5000}, await_publication = True, key_content = 'ED25519-V3')
|
||||
print("Started a new hidden service with the address of %s.onion" % service.service_id)
|
||||
|
||||
print('%s %s' % (service.private_key_type, service.private_key))
|
||||
|
||||
|
||||
controller.close()
|
||||
|
||||
# EOF
|
||||
119
utils.py
Normal file
119
utils.py
Normal file
@ -0,0 +1,119 @@
|
||||
# (c) Copyright 2020 by Coinkite Inc. This file is part of Coldcard <coldcardwallet.com>
|
||||
# and is covered by GPLv3 license found in COPYING.
|
||||
#
|
||||
# utils.py
|
||||
#
|
||||
import json, struct, logging, asyncio
|
||||
from binascii import b2a_hex
|
||||
from objstruct import ObjectStruct
|
||||
from decimal import Decimal
|
||||
|
||||
B2A = lambda x: b2a_hex(x).decode('ascii')
|
||||
|
||||
def xfp2str(xfp):
|
||||
# Standardized way to show an xpub's fingerprint... it's a 4-byte string
|
||||
# and not really an integer. Used to show as '0x%08x' but that's wrong endian.
|
||||
return b2a_hex(struct.pack('<I', xfp)).decode('ascii').upper()
|
||||
|
||||
def json_dumps(obj, **k):
|
||||
def hook(dd):
|
||||
if isinstance(dd, Decimal):
|
||||
return float(dd)
|
||||
if hasattr(dd, 'strftime'):
|
||||
return str(dd) # isoformat
|
||||
logging.error("Unhandled JSON type: %r" % dd)
|
||||
raise TypeError
|
||||
|
||||
k['default'] = hook
|
||||
|
||||
return json.dumps(obj, **k)
|
||||
|
||||
def json_loads(*a, **k):
|
||||
# more useful args for json.loads
|
||||
k.setdefault('object_hook', ObjectStruct)
|
||||
k.setdefault('parse_float', Decimal)
|
||||
return json.loads(*a, **k)
|
||||
|
||||
def pformat_json(o):
|
||||
# for humans, who might pipe JSON around and debug it first
|
||||
return json_dumps(o, sort_keys=True, indent=2)
|
||||
|
||||
# from <https://stackoverflow.com/questions/6760685>
|
||||
# use like this:
|
||||
# class Foo(metaclass=Singleton): ...
|
||||
#
|
||||
class Singleton(type):
|
||||
_instances = {}
|
||||
def __call__(cls, *args, **kwargs):
|
||||
if cls not in cls._instances:
|
||||
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
|
||||
return cls._instances[cls]
|
||||
|
||||
def setup_logging(level=logging.INFO, debug=True, syslog=False):
|
||||
# get logging working for simple test code
|
||||
# - also used for normal logging
|
||||
|
||||
handlers = None
|
||||
if syslog:
|
||||
# this shows up in /var/log/user.log
|
||||
from logging.handlers import SysLogHandler
|
||||
handlers = [ SysLogHandler('/dev/log')]
|
||||
|
||||
logging.basicConfig(format="%(asctime)-11s %(message)s",
|
||||
datefmt="[%d/%m/%Y-%H:%M:%S]", level=level, handlers=handlers)
|
||||
|
||||
# maybe?
|
||||
#import warnings
|
||||
#warnings.simplefilter("ignore")
|
||||
|
||||
# kill log noise about _UnixReadPipeTransport
|
||||
logging.getLogger('asyncio').setLevel(level=logging.WARN)
|
||||
|
||||
# kill noise from STEM (tor wrapper)
|
||||
from stem.util.log import get_logger as sgl
|
||||
sgl().setLevel(level=logging.WARN)
|
||||
|
||||
if 0:
|
||||
# disable access logging
|
||||
logging.getLogger('aiohttp.access').setLevel(level=logging.WARN)
|
||||
|
||||
def cleanup_psbt(psbt):
|
||||
from base64 import b64decode
|
||||
from binascii import a2b_hex
|
||||
import re
|
||||
from hashlib import sha256
|
||||
|
||||
# we have the bytes, but might be encoded as hex or base64 inside
|
||||
taste = psbt[0:10]
|
||||
if taste.lower() == b'70736274ff':
|
||||
# Looks hex encoded; make into binary again
|
||||
hx = ''.join(re.findall(r'[0-9a-fA-F]*', psbt.decode('ascii')))
|
||||
psbt = a2b_hex(hx)
|
||||
elif taste[0:6] == b'cHNidP':
|
||||
# Base64 encoded input
|
||||
psbt = b64decode(psbt)
|
||||
|
||||
if psbt[0:5] != b'psbt\xff':
|
||||
raise ValueError("File does not have PSBT magic number at start.")
|
||||
|
||||
return psbt
|
||||
|
||||
class WatchableMixin:
|
||||
# add a consistent way to block for changes on an object
|
||||
|
||||
def __init__(self, *a, **k):
|
||||
self._update_event = asyncio.Event()
|
||||
super(WatchableMixin, self).__init__(*a,**k)
|
||||
|
||||
def notify_watchers(self):
|
||||
# unblock anyone watching us
|
||||
|
||||
self._update_event.set()
|
||||
self._update_event.clear()
|
||||
|
||||
async def wait(self):
|
||||
await self._update_event.wait()
|
||||
return self
|
||||
|
||||
|
||||
# EOF
|
||||
3
version.py
Normal file
3
version.py
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
VERSION = 'v0.9'
|
||||
|
||||
881
webapp.py
Executable file
881
webapp.py
Executable file
@ -0,0 +1,881 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# A web server.
|
||||
#
|
||||
import sys, os, asyncio, logging, aiohttp_jinja2, jinja2, time, weakref, re
|
||||
from aiohttp import web
|
||||
from yarl import URL
|
||||
from conn import Connection, MissingColdcard
|
||||
from ckcc.protocol import CCProtocolPacker
|
||||
from utils import pformat_json, json_loads, json_dumps, cleanup_psbt
|
||||
from objstruct import ObjectStruct
|
||||
from aiohttp.web_exceptions import HTTPMovedPermanently, HTTPNotFound, HTTPBadRequest, HTTPFound
|
||||
from decimal import Decimal
|
||||
import aiohttp_session
|
||||
from aiohttp_session import get_session, new_session
|
||||
from base64 import b32encode, b64decode, b64encode
|
||||
from binascii import b2a_hex, a2b_hex
|
||||
from status import STATUS
|
||||
from persist import settings, BP
|
||||
from hashlib import sha256
|
||||
from chain import broadcast_txn
|
||||
from version import VERSION
|
||||
from jinja2 import Markup
|
||||
import policy
|
||||
|
||||
from ckcc.constants import USER_AUTH_TOTP, USER_AUTH_HMAC, USER_AUTH_SHOW_QR, MAX_USERNAME_LEN
|
||||
from ckcc.constants import STXN_VISUALIZE, STXN_SIGNED, AF_P2WPKH, AF_CLASSIC
|
||||
from ckcc.protocol import CCUserRefused
|
||||
|
||||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
routes = web.RouteTableDef()
|
||||
|
||||
web_sockets = weakref.WeakSet()
|
||||
|
||||
class HTMLErrorMsg(ValueError):
|
||||
def __init__(self, html):
|
||||
super(HTMLErrorMsg, self).__init__(Markup(html))
|
||||
|
||||
APPROVE_CTA = '''\
|
||||
Please consult the Coldcard screen and review the HSM policy shown there. If you \
|
||||
are satisfied it does what you need, approve the policy and the Coldcard will enter HSM mode.
|
||||
'''
|
||||
|
||||
def default_context():
|
||||
#
|
||||
# Put values you want in every template here. They cannot vary per-request.
|
||||
#
|
||||
rv = ObjectStruct(VERSION=VERSION)
|
||||
|
||||
# this defines the nav menu in top bar
|
||||
rv.PAGES = [ ('/', 'Sign Transaction'),
|
||||
('/tools', 'Tools'),
|
||||
('/setup', 'Coldcard Setup'),
|
||||
('/bunker', 'Bunker Setup'),
|
||||
#('/help', 'Help')
|
||||
]
|
||||
|
||||
rv['zip'] = zip
|
||||
|
||||
return rv
|
||||
|
||||
async def add_shared_ctx(request, **rv):
|
||||
# add ctx vars needed to support fancy Vue.js stuff on logged-in pages
|
||||
|
||||
ses = await get_session(request)
|
||||
|
||||
|
||||
rv.update(dict(
|
||||
ws_url = '/websocket/' + ses.get('ws_token'),
|
||||
STATUS=STATUS.as_dict(),
|
||||
))
|
||||
|
||||
rv['CUR_PAGE'] = '/' + request.path.split('/')[-1]
|
||||
|
||||
return rv
|
||||
|
||||
@routes.get('/')
|
||||
@aiohttp_jinja2.template('txn/index.html')
|
||||
async def homepage(request):
|
||||
|
||||
# may take some details from the policy, and cook up into more useful forms
|
||||
|
||||
ss = BP.get('summary', None) if STATUS.hsm.get('active') else None
|
||||
|
||||
# coldcard tells us when we'll need a local code, by providing seed value
|
||||
nl = bool('next_local_code' in STATUS.hsm)
|
||||
|
||||
return await add_shared_ctx(request, policy_summary=ss, needs_local=nl)
|
||||
|
||||
@routes.get('/setup')
|
||||
@aiohttp_jinja2.template('setup/index.html')
|
||||
async def setup_page(request):
|
||||
# HSM policy setup
|
||||
|
||||
# get latest status
|
||||
dev = Connection()
|
||||
await dev.hsm_status()
|
||||
|
||||
return await add_shared_ctx(request)
|
||||
|
||||
@routes.get('/bunker')
|
||||
@aiohttp_jinja2.template('bunker/index.html')
|
||||
async def bunker_page(request):
|
||||
|
||||
# Bunker config and setup
|
||||
|
||||
# get latest status
|
||||
dev = Connection()
|
||||
await dev.hsm_status()
|
||||
|
||||
from torsion import TOR
|
||||
|
||||
return await add_shared_ctx(request, BP=BP, force_local_mode=STATUS.force_local_mode)
|
||||
|
||||
|
||||
@routes.get('/tools')
|
||||
@aiohttp_jinja2.template('tools/index.html')
|
||||
async def tools_page(request):
|
||||
# various random things I've been talked into
|
||||
# - message signing useul tho
|
||||
if BP.get('policy'):
|
||||
paths = BP['policy'].get('msg_paths') or []
|
||||
paths = set(i.replace('*', '999') for i in paths if i != 'any')
|
||||
else:
|
||||
# priv_over_ux: we don't know, but some useful ones
|
||||
paths = ['m', "m/0/0", "m/44'/0'/0'/0/0", "m/49'/0'/0'/0/0",
|
||||
"m/84'/0'/0/0" ]
|
||||
|
||||
paths = list(sorted(paths, key=lambda x: (len(x.split('/')), x.split('/'))))
|
||||
|
||||
return await add_shared_ctx(request, msg_paths=paths)
|
||||
|
||||
@routes.get('/help')
|
||||
@aiohttp_jinja2.template('help.html')
|
||||
async def help_page(request):
|
||||
return await add_shared_ctx(request)
|
||||
|
||||
|
||||
_static_html_cache = dict()
|
||||
def send_static_html(fname, disable_cache=True):
|
||||
# just return the contents of an HTML file, and cache it along the way
|
||||
# - can't use web.StaticFileResponse because want set-cookies to happen
|
||||
global _static_html_cache
|
||||
|
||||
if not disable_cache and (fname in _static_html_cache):
|
||||
page_html = _static_html_cache[fname]
|
||||
else:
|
||||
_static_html_cache[fname] = page_html = open(fname, 'rt').read()
|
||||
|
||||
return web.Response(text=page_html, content_type='text/html')
|
||||
|
||||
@routes.get('/logout')
|
||||
async def logout_page(request):
|
||||
# do a logout
|
||||
ses = await get_session(request)
|
||||
if ses and not ses.new:
|
||||
logging.warn("Logout of user.")
|
||||
|
||||
# This clears cookie, but if they come back to any page on our site,
|
||||
# they will get a new one, so we can't redirect them to any other page
|
||||
# here
|
||||
ses.invalidate()
|
||||
|
||||
return send_static_html('static/html/logout.html')
|
||||
|
||||
@routes.get('/login')
|
||||
async def login_page(request):
|
||||
# Completely static and plain.
|
||||
# thanks to <https://codepen.io/rizwanahmed19/pen/KMMoEN>
|
||||
|
||||
# Create a session, if they don't have one. Need this
|
||||
# to establish timing/authencity of login data when its posted
|
||||
ses = await get_session(request)
|
||||
if not ses:
|
||||
ses = await new_session(request)
|
||||
else:
|
||||
if ses.get('login_ok'):
|
||||
# they are already logged in, so send them to homepage
|
||||
return HTTPFound('/')
|
||||
|
||||
# - cannot leave session empty, so put anything in there.
|
||||
ses['j'] = True
|
||||
ses.changed()
|
||||
|
||||
return send_static_html('static/html/login.html')
|
||||
|
||||
|
||||
def accept_user_login(ses):
|
||||
# setup session for good user
|
||||
ses['login_ok'] = True
|
||||
ses['active'] = time.time()
|
||||
ses['ws_token'] = str(b32encode(os.urandom(15)), 'ascii')
|
||||
ses.pop('captcha', None)
|
||||
|
||||
@routes.post('/login')
|
||||
async def login_post(request):
|
||||
|
||||
# they must have a current session already
|
||||
# - hope this is enough against CSRF
|
||||
# - TODO: some rate limiting here, without DoS attacks
|
||||
ses = await get_session(request)
|
||||
form = await request.post()
|
||||
ok = False
|
||||
|
||||
if ses.new:
|
||||
logging.warn("Bad login attempt (no cookie)")
|
||||
|
||||
elif (time.time() - ses.created) > settings.MAX_LOGIN_WAIT_TIME:
|
||||
ses.invalidate()
|
||||
logging.warn("Stale login attempt (cookie too old)")
|
||||
|
||||
elif ses.get('kiddie', 0):
|
||||
logging.warn("Keeping the kiddies at bay")
|
||||
|
||||
else:
|
||||
captcha = form.get('captcha', '').lower()
|
||||
pw = form.get('password', None)
|
||||
|
||||
if not captcha or not pw:
|
||||
# keep same captcha; they just pressed enter
|
||||
ok = False
|
||||
|
||||
else:
|
||||
expect = BP.get('master_pw', settings.MASTER_PW) # XXX scrypt(pw)
|
||||
expect_code = ses.pop('captcha', None)
|
||||
|
||||
ok = (pw == expect) and (captcha == expect_code)
|
||||
|
||||
if not ok:
|
||||
# fail; do nothing visible (but they will get new captcha)
|
||||
dest = URL(request.headers.get('referer', '/login'))
|
||||
return HTTPFound(dest)
|
||||
|
||||
# SUCCESS
|
||||
accept_user_login(ses)
|
||||
|
||||
# try to put them back where they were before
|
||||
try:
|
||||
dest = URL(request.headers.get('referer', '')).query.get('u', '/')
|
||||
except:
|
||||
dest = '/'
|
||||
|
||||
logging.warn(f"Good login from user, sending to: {dest}")
|
||||
|
||||
return HTTPFound(dest)
|
||||
|
||||
@routes.get('/captcha')
|
||||
async def captcha_image(request):
|
||||
# make a captcha image, but always the same one per session
|
||||
|
||||
ses = await get_session(request)
|
||||
if ses.new:
|
||||
return HTTPNotFound()
|
||||
|
||||
from make_captcha import RansomCaptcha, MegaGifCaptcha, TOKEN_CHARS
|
||||
import random
|
||||
|
||||
if 'captcha' in ses:
|
||||
# dont let them retry?
|
||||
code = ses['captcha']
|
||||
else:
|
||||
code = ''.join(random.sample(TOKEN_CHARS, 8))
|
||||
ses['captcha'] = code
|
||||
|
||||
easy = BP.get('easy_captcha', settings.EASY_CAPTCHA)
|
||||
if easy:
|
||||
itype, data = RansomCaptcha(seed=code).draw(code, foreground='#444')
|
||||
else:
|
||||
itype, data = MegaGifCaptcha(seed=code).draw(code, foreground='#444')
|
||||
|
||||
return web.Response(body=data, content_type='image/'+itype,
|
||||
headers = {'Cache-Control': 'no-cache'})
|
||||
|
||||
|
||||
async def rx_handler(ses, ws, orig_request):
|
||||
# Block on receive, handle each message as it comes in.
|
||||
# see pp/aiohttp/client_ws.py
|
||||
|
||||
async def tx_resp(_ws=ws, **resp):
|
||||
logging.debug(f"Send resp: {resp}")
|
||||
await _ws.send_str(json_dumps(resp))
|
||||
|
||||
|
||||
async for msg in ws:
|
||||
if msg.type != web.WSMsgType.TEXT:
|
||||
raise TypeError('expected text')
|
||||
|
||||
try:
|
||||
assert len(msg.data) < 20000
|
||||
req = json_loads(msg.data)
|
||||
|
||||
if '_ping' in req:
|
||||
# connection keep alive, simple
|
||||
await tx_resp(_pong=1)
|
||||
continue
|
||||
|
||||
# Caution: lots of sensitive values here XXX
|
||||
#logging.info("WS api data: %r" % req)
|
||||
|
||||
except Exception as e:
|
||||
logging.critical("Junk data on WS", exc_info=1)
|
||||
break # the connection
|
||||
|
||||
# do something with the request
|
||||
failed = True
|
||||
try:
|
||||
await ws_api_handler(ses, tx_resp, req, orig_request)
|
||||
failed = False
|
||||
except SystemExit:
|
||||
raise
|
||||
except KeyboardInterrupt:
|
||||
break
|
||||
except HTMLErrorMsg as exc:
|
||||
# pre-formated text for display
|
||||
msg = exc.args[0]
|
||||
except RuntimeError as exc:
|
||||
# covers CCProtoError and similar
|
||||
msg = str(exc) or str(type(exc).__name__)
|
||||
except BaseException as exc:
|
||||
logging.exception("API fail: req=%r" % req)
|
||||
msg = str(exc) or str(type(exc).__name__)
|
||||
|
||||
if failed:
|
||||
# standard error response
|
||||
await tx_resp(show_modal=True, html=jinja2.escape(msg), selector='.js-api-fail')
|
||||
|
||||
async def push_status_updates_handler(ws):
|
||||
# block for a bit, and then send display updates (and all other system status changes)
|
||||
|
||||
# - there is no need for immediate update because when we rendered the HTML on page
|
||||
# load, we put in current values.
|
||||
await asyncio.sleep(0.250)
|
||||
|
||||
last = None
|
||||
while 1:
|
||||
# get latest state
|
||||
now = STATUS.as_dict()
|
||||
|
||||
if last != now:
|
||||
# it has changed, so send it.
|
||||
await ws.send_str(json_dumps(dict(vue_app_cb=dict(update_status=now))))
|
||||
last = now
|
||||
|
||||
# wait until next update, or X seconds max (for keep alive/just in case)
|
||||
try:
|
||||
await asyncio.wait_for(STATUS._update_event.wait(), 120)
|
||||
except asyncio.TimeoutError:
|
||||
# force an update
|
||||
last = None
|
||||
|
||||
async def ws_api_handler(ses, send_json, req, orig_request): # handle_api
|
||||
#
|
||||
# Handle incoming requests over websocket; send back results.
|
||||
# req = already json parsed request coming in
|
||||
# send_json() = means to send the response back
|
||||
#
|
||||
action = req.action
|
||||
args = getattr(req, 'args', None)
|
||||
|
||||
#logging.warn("API action=%s (%r)" % (action, args)) # MAJOR info leak XXX
|
||||
logging.debug(f"API action={action}")
|
||||
|
||||
if action == '_connected':
|
||||
logging.info("Websocket connected: %r" % args)
|
||||
|
||||
# can send special state update at this point, depending on the page
|
||||
|
||||
elif action == 'start_hsm_btn':
|
||||
await Connection().hsm_start()
|
||||
await send_json(show_flash_msg=APPROVE_CTA)
|
||||
|
||||
elif action == 'delete_user':
|
||||
name, = args
|
||||
assert 1 <= len(name) <= MAX_USERNAME_LEN, "bad username length"
|
||||
await Connection().delete_user(name.encode('utf8'))
|
||||
|
||||
# assume it worked, so UX updates right away
|
||||
try:
|
||||
STATUS.hsm.users.remove(name)
|
||||
except ValueError:
|
||||
pass
|
||||
STATUS.notify_watchers()
|
||||
|
||||
elif action == 'create_user':
|
||||
name, authmode, new_pw = args
|
||||
|
||||
assert 1 <= len(name) <= MAX_USERNAME_LEN, "bad username length"
|
||||
assert ',' not in name, "no commas in names"
|
||||
|
||||
if authmode == 'totp':
|
||||
mode = USER_AUTH_TOTP | USER_AUTH_SHOW_QR
|
||||
new_pw = ''
|
||||
elif authmode == 'rand_pw':
|
||||
mode = USER_AUTH_HMAC | USER_AUTH_SHOW_QR
|
||||
new_pw = ''
|
||||
elif authmode == 'give_pw':
|
||||
mode = USER_AUTH_HMAC
|
||||
else:
|
||||
raise ValueError(authmode)
|
||||
|
||||
await Connection().create_user(name.encode('utf8'), mode, new_pw)
|
||||
|
||||
# assume it worked, so UX updates right away
|
||||
try:
|
||||
STATUS.hsm.users = list(set(STATUS.hsm.users + [name]))
|
||||
except ValueError:
|
||||
pass
|
||||
STATUS.notify_watchers()
|
||||
|
||||
elif action == 'submit_policy':
|
||||
# get some JSON w/ everything the user entered.
|
||||
p, save_copy = args
|
||||
|
||||
proposed = policy.web_cleanup(json_loads(p))
|
||||
|
||||
policy.update_sl(proposed)
|
||||
|
||||
await Connection().hsm_start(proposed)
|
||||
|
||||
STATUS.notify_watchers()
|
||||
|
||||
await send_json(show_flash_msg=APPROVE_CTA)
|
||||
|
||||
if save_copy:
|
||||
d = policy.desensitize(proposed)
|
||||
await send_json(local_download=dict(data=json_dumps(d, indent=2),
|
||||
filename=f'hsm-policy-{STATUS.xfp}.json.txt'))
|
||||
|
||||
elif action == 'download_policy':
|
||||
|
||||
proposed = policy.web_cleanup(json_loads(args[0]))
|
||||
await send_json(local_download=dict(data=json_dumps(proposed, indent=2),
|
||||
filename=f'hsm-policy-{STATUS.xfp}.json.txt'))
|
||||
|
||||
elif action == 'import_policy':
|
||||
# they are uploading a JSON capture, but need values we can load in Vue
|
||||
proposed = args[0]
|
||||
cooked = policy.web_cookup(proposed)
|
||||
await send_json(vue_app_cb=dict(update_policy=cooked),
|
||||
show_flash_msg="Policy file imported.")
|
||||
|
||||
elif action == 'pick_onion_addr':
|
||||
from torsion import TOR
|
||||
addr, pk = await TOR.pick_onion_addr()
|
||||
await send_json(vue_app_cb=dict(new_onion_addr=[addr, pk]))
|
||||
|
||||
elif action == 'pick_master_pw':
|
||||
pw = b64encode(os.urandom(12)).decode('ascii')
|
||||
pw = pw.replace('/', 'S').replace('+', 'p')
|
||||
assert '=' not in pw
|
||||
|
||||
await send_json(vue_app_cb=dict(new_master_pw=pw))
|
||||
|
||||
elif action == 'new_bunker_config':
|
||||
from torsion import TOR
|
||||
# save and apply config values
|
||||
nv = json_loads(args[0])
|
||||
|
||||
assert 4 <= len(nv.master_pw) < 200, "Master password must be at least 4 chars long"
|
||||
|
||||
# copy in simple stuff
|
||||
for fn in [ 'tor_enabled', 'master_pw', 'easy_captcha', 'allow_reboots']:
|
||||
if fn in nv:
|
||||
BP[fn] = nv[fn]
|
||||
|
||||
|
||||
# update onion stuff only if PK is known (ie. they changed it)
|
||||
if nv.get('onion_pk', False) or False:
|
||||
for fn in [ 'onion_addr', 'onion_pk']:
|
||||
if fn in nv:
|
||||
BP[fn] = nv[fn]
|
||||
|
||||
BP.save()
|
||||
|
||||
await send_json(show_flash_msg="Bunker settings encrypted and saved to disk.")
|
||||
|
||||
STATUS.tor_enabled = BP['tor_enabled']
|
||||
STATUS.notify_watchers()
|
||||
|
||||
if not BP['tor_enabled']:
|
||||
await TOR.stop_tunnel()
|
||||
elif BP.get('onion_pk') and not (STATUS.force_local_mode or STATUS.setup_mode):
|
||||
# connect/reconnect
|
||||
await TOR.start_tunnel()
|
||||
|
||||
elif action == 'sign_message':
|
||||
# sign a short text message
|
||||
# - lots more checking could be done here, but CC does it anyway
|
||||
msg_text, path, addr_fmt = args
|
||||
|
||||
addr_fmt = AF_P2WPKH if addr_fmt != 'classic' else AF_CLASSIC
|
||||
|
||||
try:
|
||||
sig, addr = await Connection().sign_text_msg(msg_text, path, addr_fmt)
|
||||
except:
|
||||
# get the spinner to stop: error msg will be "refused by policy" typically
|
||||
await send_json(vue_app_cb=dict(msg_signing_result='(failed)'))
|
||||
raise
|
||||
|
||||
sig = b64encode(sig).decode('ascii').replace('\n', '')
|
||||
|
||||
await send_json(vue_app_cb=dict(msg_signing_result=f'{sig}\n{addr}'))
|
||||
|
||||
elif action == 'upload_psbt':
|
||||
# receiving a PSBT for signing
|
||||
|
||||
size, digest, contents = args
|
||||
psbt = b64decode(contents)
|
||||
assert len(psbt) == size, "truncated/padded in transit"
|
||||
assert sha256(psbt).hexdigest() == digest, "corrupted in transit"
|
||||
|
||||
STATUS.import_psbt(psbt)
|
||||
STATUS.notify_watchers()
|
||||
|
||||
elif action == 'clear_psbt':
|
||||
STATUS.clear_psbt()
|
||||
STATUS.notify_watchers()
|
||||
|
||||
elif action == 'preview_psbt':
|
||||
STATUS.psbt_preview = 'Wait...'
|
||||
STATUS.notify_watchers()
|
||||
try:
|
||||
txt = await Connection().sign_psbt(STATUS._pending_psbt, flags=STXN_VISUALIZE)
|
||||
txt = txt.decode('ascii')
|
||||
# force some line splits, especially for bech32, 32-byte values (p2wsh)
|
||||
probs = re.findall(r'([a-zA-Z0-9]{36,})', txt)
|
||||
for p in probs:
|
||||
txt = txt.replace(p, p[0:30] + '\u22ef\n\u22ef' + p[30:])
|
||||
STATUS.psbt_preview = txt
|
||||
except:
|
||||
# like if CC doesn't like the keys, whatever ..
|
||||
STATUS.psbt_preview = None
|
||||
raise
|
||||
finally:
|
||||
STATUS.notify_watchers()
|
||||
|
||||
elif action == 'auth_set_name':
|
||||
idx, name = args
|
||||
|
||||
assert 0 <= len(name) <= MAX_USERNAME_LEN
|
||||
assert 0 <= idx < len(STATUS.pending_auth)
|
||||
|
||||
STATUS.pending_auth[idx].name = name
|
||||
STATUS.notify_watchers()
|
||||
|
||||
elif action == 'auth_offer_guess':
|
||||
idx, ts, guess = args
|
||||
assert 0 <= idx < len(STATUS.pending_auth)
|
||||
STATUS.pending_auth[idx].totp = ts
|
||||
STATUS.pending_auth[idx].has_guess = 'x'*len(guess)
|
||||
STATUS._auth_guess[idx] = guess
|
||||
STATUS.notify_watchers()
|
||||
|
||||
elif action == 'submit_psbt':
|
||||
# they want to sign it now
|
||||
expect_hash, send_immediately, finalize, wants_dl = args
|
||||
|
||||
assert expect_hash == STATUS.psbt_hash, "hash mismatch"
|
||||
if send_immediately: assert finalize, "must finalize b4 send"
|
||||
|
||||
logging.info("Starting to sign...")
|
||||
STATUS.busy_signing = True
|
||||
STATUS.notify_watchers()
|
||||
|
||||
try:
|
||||
dev = Connection()
|
||||
|
||||
# do auth steps first (no feedback given)
|
||||
for pa, guess in zip(STATUS.pending_auth, STATUS._auth_guess):
|
||||
if pa.name and guess:
|
||||
await dev.user_auth(pa.name, guess, int(pa.totp), a2b_hex(STATUS.psbt_hash))
|
||||
|
||||
STATUS.reset_pending_auth()
|
||||
|
||||
try:
|
||||
result = await dev.sign_psbt(STATUS._pending_psbt, finalize=finalize)
|
||||
logging.info("Done signing")
|
||||
|
||||
msg = "Transaction signed."
|
||||
|
||||
if send_immediately:
|
||||
msg += '<br><br>' + broadcast_txn(result)
|
||||
|
||||
await send_json(show_modal=True, html=Markup(msg), selector='.js-api-success')
|
||||
|
||||
result = (b2a_hex(result) if finalize else b64encode(result)).decode('ascii')
|
||||
fname = 'transaction.txt' if finalize else ('signed-%s.psbt'%STATUS.psbt_hash[-6:])
|
||||
|
||||
if wants_dl:
|
||||
await send_json(local_download=dict(data=result, filename=fname,
|
||||
is_b64=(not finalize)))
|
||||
|
||||
await dev.hsm_status()
|
||||
except CCUserRefused:
|
||||
logging.error("Coldcard refused to sign txn")
|
||||
await dev.hsm_status()
|
||||
r = STATUS.hsm.get('last_refusal', None)
|
||||
if not r:
|
||||
raise HTMLErroMsg('Refused by local user.')
|
||||
else:
|
||||
raise HTMLErrorMsg(f"Rejected by Coldcard.<br><br>{r}")
|
||||
|
||||
finally:
|
||||
STATUS.busy_signing = False
|
||||
STATUS.notify_watchers()
|
||||
|
||||
elif action == 'shutdown_bunker':
|
||||
await send_json(show_flash_msg="Bunker is shutdown.")
|
||||
await asyncio.sleep(0.25)
|
||||
logging.warn("User-initiated shutdown")
|
||||
asyncio.get_running_loop().stop()
|
||||
sys.exit(0)
|
||||
|
||||
elif action == 'leave_setup_mode':
|
||||
# During setup process, they want to go Tor mode; which I consider leaving
|
||||
# setup mode ... in particular, logins are required.
|
||||
# - button label is "Start Tor" tho ... so user doesn't see it that way
|
||||
assert STATUS.setup_mode, 'not in setup mode?'
|
||||
assert BP['tor_enabled'], 'Tor not enabled (need to save?)'
|
||||
addr = BP['onion_addr']
|
||||
assert addr and '.onion' in addr, "Bad address?"
|
||||
|
||||
STATUS.setup_mode = False
|
||||
await send_json(show_flash_msg="Tor hidden service has been enabled. "
|
||||
"It may take a few minutes for the website to become available")
|
||||
STATUS.notify_watchers()
|
||||
|
||||
from torsion import TOR
|
||||
logging.info(f"Starting hidden service: %s" % addr)
|
||||
asyncio.create_task(TOR.start_tunnel())
|
||||
|
||||
elif action == 'logout_everyone':
|
||||
# useful for running battles...
|
||||
# - changes crypto key for cookies, so they are all invalid immediately.
|
||||
from aiohttp_session.nacl_storage import NaClCookieStorage
|
||||
import nacl
|
||||
|
||||
logging.warning("Logout of everyone!")
|
||||
|
||||
# reset all session cookies
|
||||
storage = orig_request.get('aiohttp_session_storage')
|
||||
assert isinstance(storage, NaClCookieStorage)
|
||||
storage._secretbox = nacl.secret.SecretBox(os.urandom(32))
|
||||
|
||||
# kick everyone off (bonus step)
|
||||
for w in web_sockets:
|
||||
try:
|
||||
await send_json(redirect='/logout', _ws=w)
|
||||
await w.close()
|
||||
except:
|
||||
pass
|
||||
|
||||
else:
|
||||
raise NotImplementedError(action)
|
||||
|
||||
|
||||
@routes.get('/websocket/{token}')
|
||||
async def api_websocket(request):
|
||||
'''
|
||||
Stream display activity as HTML fragments
|
||||
- accept config changes
|
||||
- and more?
|
||||
'''
|
||||
|
||||
try:
|
||||
ses = await get_session(request)
|
||||
assert not ses.new
|
||||
assert ses['login_ok']
|
||||
token = request.match_info['token']
|
||||
assert token == ses['ws_token'], ses.get('ws_token')
|
||||
except:
|
||||
logging.exception("Bad websocket link")
|
||||
raise web.HTTPForbidden
|
||||
|
||||
# begin a streaming response
|
||||
ws = web.WebSocketResponse()
|
||||
await ws.prepare(request)
|
||||
web_sockets.add(ws)
|
||||
|
||||
try:
|
||||
api_rx = asyncio.create_task(rx_handler(ses, ws, request))
|
||||
dis_tx = asyncio.create_task(push_status_updates_handler(ws))
|
||||
|
||||
await asyncio.gather(api_rx, dis_tx)
|
||||
finally:
|
||||
api_rx.cancel()
|
||||
dis_tx.cancel()
|
||||
await ws.close()
|
||||
|
||||
return ws
|
||||
|
||||
|
||||
@routes.get('/{fname}.php')
|
||||
@routes.get('/{path}/{fname}.php')
|
||||
@routes.get('/admin')
|
||||
async def kiddie_traps(request):
|
||||
# I hate skill-less people running burpsuite! Track them
|
||||
ses = await get_session(request)
|
||||
|
||||
ses['kiddie'] = ses.get('kiddie', 0) + 1
|
||||
|
||||
return HTTPFound("/login")
|
||||
|
||||
@routes.get('/favicon.ico')
|
||||
@routes.get('/robots.txt')
|
||||
@routes.get('/humans.txt')
|
||||
async def expected_404s(request):
|
||||
# we are expecting these URL's to 404
|
||||
# - don't redirect to login
|
||||
return HTTPNotFound()
|
||||
|
||||
|
||||
@routes.get('/static/ext/themes/default/assets/fonts/{fname}')
|
||||
async def remap_fonts(request):
|
||||
fn = request.match_info['fname']
|
||||
# remap some links so we don't need to edit Semantic files.
|
||||
return HTTPMovedPermanently('/static/ext/semantic-fonts/' + fn)
|
||||
|
||||
def extra_filters(app):
|
||||
|
||||
def my_time(dt):
|
||||
if dt is None: return None
|
||||
try:
|
||||
dt = pendulum.instance(dt)
|
||||
except ValueError:
|
||||
return repr(dt)
|
||||
return dt.in_tz('local').strftime('%l:%M%p').lower()
|
||||
|
||||
def my_date(dt):
|
||||
if dt is None: return None
|
||||
try:
|
||||
dt = pendulum.instance(dt)
|
||||
except ValueError:
|
||||
return repr(dt)
|
||||
return dt.in_tz('local').strftime('%b %e')
|
||||
|
||||
def duration(i):
|
||||
if i < 90:
|
||||
return '%d seconds' % i
|
||||
else:
|
||||
return '%d:%02d minutes' % (i//60, i%60)
|
||||
|
||||
def extlink(url, label=None):
|
||||
|
||||
# in the templates, use like this:
|
||||
# {{ "http://sdfsfd/sdf/sdf/" | extlink( "Hello") }}
|
||||
if not label:
|
||||
from urllib.parse import urlparse
|
||||
label = urlparse(url).netloc.lower()
|
||||
if label[0:4] == 'www.':
|
||||
label = label[4:]
|
||||
|
||||
rv = f'<a href="{url}" rel="nofollow" class="extlink" '\
|
||||
'target="external" title="External site: Opens in new tab">'\
|
||||
f'{label} <i class="external alternate icon"></i></a>'
|
||||
|
||||
return Markup(rv)
|
||||
|
||||
def link_txn(txn_hash):
|
||||
from chain import link_to_txn
|
||||
url = link_to_txn(txn_hash)
|
||||
return extlink(url, label=txn_hash)
|
||||
|
||||
def link_to_explorer(unused):
|
||||
url = settings.EXPLORA
|
||||
label = 'Bitcoin Explorer'
|
||||
if STATUS.is_testnet:
|
||||
label = 'Testnet Explorer'
|
||||
url += '/testnet'
|
||||
return extlink(url, label=label)
|
||||
|
||||
def slugify(t):
|
||||
return t.lower().strip().replace('&', 'and').replace(' ', '-')
|
||||
|
||||
rv = locals().copy()
|
||||
|
||||
return rv
|
||||
|
||||
@web.middleware
|
||||
async def auth_everything(request, handler):
|
||||
|
||||
# during setup, no login needed
|
||||
if STATUS.force_local_mode or STATUS.setup_mode:
|
||||
# bypass security completely
|
||||
ses = await get_session(request)
|
||||
if not ses:
|
||||
ses = await new_session(request)
|
||||
accept_user_login(ses)
|
||||
return await handler(request)
|
||||
|
||||
# whitelist of pages that do not need login
|
||||
# all other requests will need auth
|
||||
if handler in { login_page, login_post, captcha_image, kiddie_traps, expected_404s }:
|
||||
return await handler(request)
|
||||
|
||||
# verify auth
|
||||
ses = await get_session(request)
|
||||
if ses:
|
||||
active = ses.get('active', 0)
|
||||
idle = time.time() - active
|
||||
if idle > settings.MAX_IDLE_TIME:
|
||||
# stale / idle timeout
|
||||
logging.warn("Idle timeout")
|
||||
ses.invalidate()
|
||||
ses = None
|
||||
|
||||
if not ses:
|
||||
# no cookie/stale cookie, so send them to logout/in page
|
||||
u = URL("/login")
|
||||
target = request.path[1:]
|
||||
if target and target != 'logout':
|
||||
u = u.update_query(u=target)
|
||||
|
||||
return HTTPFound(u)
|
||||
|
||||
# normal path: continue to page
|
||||
|
||||
ses['active'] = time.time()
|
||||
|
||||
resp = await handler(request)
|
||||
|
||||
# clearly an HTML request, so force no caching
|
||||
if '/static/' not in request.path:
|
||||
resp.headers['Cache-Control'] = 'no-cache'
|
||||
|
||||
return resp
|
||||
|
||||
def startup(setup_mode):
|
||||
# Entry point. Return an awaitable to be run.
|
||||
|
||||
# encrypted cookies for session logic
|
||||
from aiohttp_session.nacl_storage import NaClCookieStorage
|
||||
from aiohttp_session import session_middleware
|
||||
todays_key = os.urandom(32)
|
||||
sml = session_middleware(NaClCookieStorage(todays_key, cookie_name='X'))
|
||||
|
||||
# create app: order of middlewares matters
|
||||
app = web.Application(middlewares=[sml, auth_everything])
|
||||
app.add_routes(routes)
|
||||
app.router.add_static('/static', './static')
|
||||
|
||||
# hack to obfuscate our identity a little
|
||||
# - from <https://w3techs.com/technologies/details/ws-nginx/1> 23% market share
|
||||
import aiohttp.web_response as ht
|
||||
ht.SERVER_SOFTWARE = 'nginx/1.14.1'
|
||||
|
||||
j_env = aiohttp_jinja2.setup(app, loader=jinja2.FileSystemLoader('templates'),
|
||||
filters=extra_filters(app))
|
||||
j_env.globals.update(default_context())
|
||||
j_env.policies['json.dumps_function'] = json_dumps
|
||||
|
||||
my_url = f"http://localhost:{settings.PORT_NUMBER}" + ('/setup' if setup_mode else '')
|
||||
logging.info(f"Web server at: {my_url}")
|
||||
|
||||
# meh; kinda annoying.
|
||||
if 0:
|
||||
def popup():
|
||||
try:
|
||||
# see <https://github.com/jupyter/notebook/issues/3746#issuecomment-444957821>
|
||||
# if this doesn't happen on MacOS
|
||||
from webbrowser import open as open_browser
|
||||
open_browser(my_url)
|
||||
except:
|
||||
logging.error("Unable to pop browser open", exc_info=1)
|
||||
asyncio.get_running_loop().call_later(3, popup)
|
||||
|
||||
from aiohttp.abc import AbstractAccessLogger
|
||||
class AccessLogger(AbstractAccessLogger):
|
||||
def log(self, request, response, time):
|
||||
self.logger.info(f'{response.status} <= {request.method} {request.path}')
|
||||
|
||||
return web._run_app(app, port=settings.PORT_NUMBER, print=None, access_log_class=AccessLogger)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from utils import setup_logging
|
||||
setup_logging()
|
||||
dev = Connection(None) # won't do anything tho, because async dev.run not called
|
||||
asyncio.run(startup())
|
||||
|
||||
# EOF
|
||||
Loading…
Reference in New Issue
Block a user