commit 8a29c8b9011a036a745e1acabe8f62f6fdf62b48 Author: Lu Wang Date: Sun Aug 5 02:03:53 2012 +0800 initial import diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f994109 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,23 @@ +project(pdftohtmlEX) +cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) + +find_package(PkgConfig) +pkg_check_modules(POPPLER REQUIRED poppler) +include_directories(${POPPLER_INCLUDE_DIRS}) +link_directories ( ${POPPLER_LIBRARY_DIRS} ) +find_package(Boost REQUIRED COMPONENTS program_options) +include_directories(${Boost_INCLUDE_DIRS}) +link_directories ( ${Boost_LIBRARY_DIRS} ) + +set(PDFTOHTMLEX_VERSION "0.1") +SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused-function") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") +#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb") + +add_executable(pdftohtmlEX src/pdftohtmlEX.cc src/HTMLRenderer.cc src/HTMLRenderer.h) +target_link_libraries(pdftohtmlEX poppler boost_program_options) + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..5f59385 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +pdf2html**EX** +============================= + +Introduction +----------------------------- +Traditional pdf -> html conversion tools are more likely pdf -> text tools. + +For those who are not satisfied with them, this might be the right one for you. + +pdf2htmlEX utilizes latest technologies of html/css, aims to provide an accuracy rendering, +while keeping optimized for Web display. + +pdf2htmlEX is optimized for recent versions of moderm web browsers such as Mozilla Firefox & Google Chrome. + +Features +---------------------------- +* Font embedding +* Proper styling +* Optimization for Web +* Transformation (Experimental) + +Not supported yet +---------------------------- +* Non-text object +* Color +* CJK + +Dependency +---------------------------- +* libpoppler with xpdf header >= 0.20.2 +* fontforge (we will compile with libfontforge later) + +HOW TO COMPILE +---------------------------- + cmake . && make + +HOW TO USE +---------------------------- + bin/pdf2htmlEX /path/to/sample.pdf + + +LICENSE +---------------------------- +GPLv3 + + +We would like to acknowledge the following projects that have been consulted while writing this program: +* pdftops & pdftohtml from poppler +* PDF.js +* Crocodoc +* Google Doc + +AUTHORS +---------------------------- +Lu Wang +Hongliang Tian + diff --git a/bin/pdf2htmlEX b/bin/pdf2htmlEX new file mode 100755 index 0000000..56f4303 --- /dev/null +++ b/bin/pdf2htmlEX @@ -0,0 +1,12 @@ +#!/bin/bash +# Get directory of the script +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done +SCRIPT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"/ +# Execute +${SCRIPT_DIR}/pdftohtmlEX $* + +for f in *.pfa; do + fontforge -script "${SCRIPT_DIR}/pfa2otf.pe" $f + rm $f +done diff --git a/bin/pfa2otf.pe b/bin/pfa2otf.pe new file mode 100644 index 0000000..0c9bf9f --- /dev/null +++ b/bin/pfa2otf.pe @@ -0,0 +1,2 @@ +Open($1); +Generate($1:r+".otf"); diff --git a/demo/all.css b/demo/all.css new file mode 100644 index 0000000..4a67803 --- /dev/null +++ b/demo/all.css @@ -0,0 +1 @@ +.f0{font-family:sans-serif;color:red;}.s0{font-size:0px;}@font-face{font-family:f1;src:url(f1.otf);}.f1{font-family:f1;}.s1{font-size:17.9328px;}.t0{transform:matrix(1,0,0,1,0,0);-ms-transform:matrix(1,0,0,1,0,0);-moz-transform:matrix(1,0,0,1,0px,0px);-webkit-transform:matrix(1,0,0,1,0,0);-o-transform:matrix(1,0,0,1,0,0);}.w0{width:4.4832px;}@font-face{font-family:f2;src:url(f2.otf);}.f2{font-family:f2;}.s2{font-size:10.9589px;}.w1{width:2.73972px;}@font-face{font-family:f3;src:url(f3.otf);}.f3{font-family:f3;}.s3{font-size:7.9701px;}@font-face{font-family:f4;src:url(f4.otf);}.f4{font-family:f4;}.s4{font-size:8.9664px;}@font-face{font-family:f5;src:url(f5.otf);}.f5{font-family:f5;}.s5{font-size:5.9776px;}@font-face{font-family:f6;src:url(f6.otf);}.f6{font-family:f6;}@font-face{font-family:f7;src:url(f7.otf);}.f7{font-family:f7;}@font-face{font-family:f8;src:url(f8.otf);}.f8{font-family:f8;}.w2{width:1.38482px;}@font-face{font-family:f9;src:url(f9.otf);}.f9{font-family:f9;}@font-face{font-family:fa;src:url(fa.otf);}.fa{font-family:fa;}.w3{width:10.9589px;}.s6{font-size:6.9738px;}@font-face{font-family:fb;src:url(fb.otf);}.fb{font-family:fb;}@font-face{font-family:fc;src:url(fc.otf);}.fc{font-family:fc;}.w4{width:5.604px;}.w5{width:14.1221px;}.w6{width:23.5368px;}.t1{transform:matrix(1,-0,-0,1,317.014,-651.925);-ms-transform:matrix(1,-0,-0,1,317.014,-651.925);-moz-transform:matrix(1,-0,-0,1,317.014px,-651.925px);-webkit-transform:matrix(1,-0,-0,1,317.014,-651.925);-o-transform:matrix(1,-0,-0,1,317.014,-651.925);}.t2{transform:matrix(1,-0,-0,1,317.014,-414.768);-ms-transform:matrix(1,-0,-0,1,317.014,-414.768);-moz-transform:matrix(1,-0,-0,1,317.014px,-414.768px);-webkit-transform:matrix(1,-0,-0,1,317.014,-414.768);-o-transform:matrix(1,-0,-0,1,317.014,-414.768);}.t3{transform:matrix(0.43082,-0,-0,0.43082,317.014,-414.768);-ms-transform:matrix(0.43082,-0,-0,0.43082,317.014,-414.768);-moz-transform:matrix(0.43082,-0,-0,0.43082,317.014px,-414.768px);-webkit-transform:matrix(0.43082,-0,-0,0.43082,317.014,-414.768);-o-transform:matrix(0.43082,-0,-0,0.43082,317.014,-414.768);}.t4{transform:matrix(50.8368,-0,-0,24.5567,390.684,-560.386);-ms-transform:matrix(50.8368,-0,-0,24.5567,390.684,-560.386);-moz-transform:matrix(50.8368,-0,-0,24.5567,390.684px,-560.386px);-webkit-transform:matrix(50.8368,-0,-0,24.5567,390.684,-560.386);-o-transform:matrix(50.8368,-0,-0,24.5567,390.684,-560.386);}.t5{transform:matrix(57.7299,-0,-0,24.5567,387.237,-517.304);-ms-transform:matrix(57.7299,-0,-0,24.5567,387.237,-517.304);-moz-transform:matrix(57.7299,-0,-0,24.5567,387.237px,-517.304px);-webkit-transform:matrix(57.7299,-0,-0,24.5567,387.237,-517.304);-o-transform:matrix(57.7299,-0,-0,24.5567,387.237,-517.304);}.t6{transform:matrix(50.8368,-0,-0,24.5567,321.322,-497.917);-ms-transform:matrix(50.8368,-0,-0,24.5567,321.322,-497.917);-moz-transform:matrix(50.8368,-0,-0,24.5567,321.322px,-497.917px);-webkit-transform:matrix(50.8368,-0,-0,24.5567,321.322,-497.917);-o-transform:matrix(50.8368,-0,-0,24.5567,321.322,-497.917);}.t7{transform:matrix(65.0538,-0,-0,24.5567,450.999,-458.281);-ms-transform:matrix(65.0538,-0,-0,24.5567,450.999,-458.281);-moz-transform:matrix(65.0538,-0,-0,24.5567,450.999px,-458.281px);-webkit-transform:matrix(65.0538,-0,-0,24.5567,450.999,-458.281);-o-transform:matrix(65.0538,-0,-0,24.5567,450.999,-458.281);}.t8{transform:matrix(59.884,-0,-0,24.5567,453.584,-497.917);-ms-transform:matrix(59.884,-0,-0,24.5567,453.584,-497.917);-moz-transform:matrix(59.884,-0,-0,24.5567,453.584px,-497.917px);-webkit-transform:matrix(59.884,-0,-0,24.5567,453.584,-497.917);-o-transform:matrix(59.884,-0,-0,24.5567,453.584,-497.917);}.t9{transform:matrix(50.8368,-0,-0,24.5567,321.322,-458.281);-ms-transform:matrix(50.8368,-0,-0,24.5567,321.322,-458.281);-moz-transform:matrix(50.8368,-0,-0,24.5567,321.322px,-458.281px);-webkit-transform:matrix(50.8368,-0,-0,24.5567,321.322,-458.281);-o-transform:matrix(50.8368,-0,-0,24.5567,321.322,-458.281);}.ta{transform:matrix(59.884,-0,-0,24.5567,453.584,-418.646);-ms-transform:matrix(59.884,-0,-0,24.5567,453.584,-418.646);-moz-transform:matrix(59.884,-0,-0,24.5567,453.584px,-418.646px);-webkit-transform:matrix(59.884,-0,-0,24.5567,453.584,-418.646);-o-transform:matrix(59.884,-0,-0,24.5567,453.584,-418.646);}.tb{transform:matrix(43.9436,-0,-0,18.5253,496.666,-562.109);-ms-transform:matrix(43.9436,-0,-0,18.5253,496.666,-562.109);-moz-transform:matrix(43.9436,-0,-0,18.5253,496.666px,-562.109px);-webkit-transform:matrix(43.9436,-0,-0,18.5253,496.666,-562.109);-o-transform:matrix(43.9436,-0,-0,18.5253,496.666,-562.109);}.tc{transform:matrix(49.1135,-0,-0,18.5253,494.081,-549.184);-ms-transform:matrix(49.1135,-0,-0,18.5253,494.081,-549.184);-moz-transform:matrix(49.1135,-0,-0,18.5253,494.081px,-549.184px);-webkit-transform:matrix(49.1135,-0,-0,18.5253,494.081,-549.184);-o-transform:matrix(49.1135,-0,-0,18.5253,494.081,-549.184);}.td{transform:matrix(49.1135,-0,-0,17.6636,494.081,-537.121);-ms-transform:matrix(49.1135,-0,-0,17.6636,494.081,-537.121);-moz-transform:matrix(49.1135,-0,-0,17.6636,494.081px,-537.121px);-webkit-transform:matrix(49.1135,-0,-0,17.6636,494.081,-537.121);-o-transform:matrix(49.1135,-0,-0,17.6636,494.081,-537.121);}.te{transform:matrix(0.43082,-0,-0,-0.43082,296.981,-598.082);-ms-transform:matrix(0.43082,-0,-0,-0.43082,296.981,-598.082);-moz-transform:matrix(0.43082,-0,-0,-0.43082,296.981px,-598.082px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,296.981,-598.082);-o-transform:matrix(0.43082,-0,-0,-0.43082,296.981,-598.082);}.tf{transform:matrix(0.43082,-0,-0,-0.43082,415.887,-574.603);-ms-transform:matrix(0.43082,-0,-0,-0.43082,415.887,-574.603);-moz-transform:matrix(0.43082,-0,-0,-0.43082,415.887px,-574.603px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,415.887,-574.603);-o-transform:matrix(0.43082,-0,-0,-0.43082,415.887,-574.603);}@font-face{font-family:fd;src:url(fd.ttf);}.fd{font-family:fd;}.s7{font-size:1px;}.t10{transform:matrix(12,-0,-0,-12,0,0);-ms-transform:matrix(12,-0,-0,-12,0,0);-moz-transform:matrix(12,-0,-0,-12,0px,0px);-webkit-transform:matrix(12,-0,-0,-12,0,0);-o-transform:matrix(12,-0,-0,-12,0,0);}@font-face{font-family:fe;src:url(fe.ttf);}.fe{font-family:fe;}.t11{transform:matrix(0.43082,-0,-0,-0.43082,415.887,-531.521);-ms-transform:matrix(0.43082,-0,-0,-0.43082,415.887,-531.521);-moz-transform:matrix(0.43082,-0,-0,-0.43082,415.887px,-531.521px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,415.887,-531.521);-o-transform:matrix(0.43082,-0,-0,-0.43082,415.887,-531.521);}.t12{transform:matrix(0.43082,-0,-0,-0.43082,346.525,-512.134);-ms-transform:matrix(0.43082,-0,-0,-0.43082,346.525,-512.134);-moz-transform:matrix(0.43082,-0,-0,-0.43082,346.525px,-512.134px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,346.525,-512.134);-o-transform:matrix(0.43082,-0,-0,-0.43082,346.525,-512.134);}.t13{transform:matrix(0.43082,-0,-0,-0.43082,483.31,-472.498);-ms-transform:matrix(0.43082,-0,-0,-0.43082,483.31,-472.498);-moz-transform:matrix(0.43082,-0,-0,-0.43082,483.31px,-472.498px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,483.31,-472.498);-o-transform:matrix(0.43082,-0,-0,-0.43082,483.31,-472.498);}.t14{transform:matrix(0.43082,-0,-0,-0.43082,483.31,-512.134);-ms-transform:matrix(0.43082,-0,-0,-0.43082,483.31,-512.134);-moz-transform:matrix(0.43082,-0,-0,-0.43082,483.31px,-512.134px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,483.31,-512.134);-o-transform:matrix(0.43082,-0,-0,-0.43082,483.31,-512.134);}.t15{transform:matrix(0.43082,-0,-0,-0.43082,346.525,-472.498);-ms-transform:matrix(0.43082,-0,-0,-0.43082,346.525,-472.498);-moz-transform:matrix(0.43082,-0,-0,-0.43082,346.525px,-472.498px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,346.525,-472.498);-o-transform:matrix(0.43082,-0,-0,-0.43082,346.525,-472.498);}.t16{transform:matrix(0.43082,-0,-0,-0.43082,483.31,-432.863);-ms-transform:matrix(0.43082,-0,-0,-0.43082,483.31,-432.863);-moz-transform:matrix(0.43082,-0,-0,-0.43082,483.31px,-432.863px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,483.31,-432.863);-o-transform:matrix(0.43082,-0,-0,-0.43082,483.31,-432.863);}.t17{transform:matrix(0.43082,-0,-0,-0.43082,407.27,-554.785);-ms-transform:matrix(0.43082,-0,-0,-0.43082,407.27,-554.785);-moz-transform:matrix(0.43082,-0,-0,-0.43082,407.27px,-554.785px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,407.27,-554.785);-o-transform:matrix(0.43082,-0,-0,-0.43082,407.27,-554.785);}.t18{transform:matrix(0.43082,-0,-0,-0.43082,387.453,-515.15);-ms-transform:matrix(0.43082,-0,-0,-0.43082,387.453,-515.15);-moz-transform:matrix(0.43082,-0,-0,-0.43082,387.453px,-515.15px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,387.453,-515.15);-o-transform:matrix(0.43082,-0,-0,-0.43082,387.453,-515.15);}.t19{transform:matrix(0.43082,-0,-0,-0.43082,341.14,-530.659);-ms-transform:matrix(0.43082,-0,-0,-0.43082,341.14,-530.659);-moz-transform:matrix(0.43082,-0,-0,-0.43082,341.14px,-530.659px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,341.14,-530.659);-o-transform:matrix(0.43082,-0,-0,-0.43082,341.14,-530.659);}.t1a{transform:matrix(0.43082,-0,-0,-0.43082,362.465,-495.763);-ms-transform:matrix(0.43082,-0,-0,-0.43082,362.465,-495.763);-moz-transform:matrix(0.43082,-0,-0,-0.43082,362.465px,-495.763px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,362.465,-495.763);-o-transform:matrix(0.43082,-0,-0,-0.43082,362.465,-495.763);}.t1b{transform:matrix(0.43082,-0,-0,-0.43082,458.969,-549.615);-ms-transform:matrix(0.43082,-0,-0,-0.43082,458.969,-549.615);-moz-transform:matrix(0.43082,-0,-0,-0.43082,458.969px,-549.615px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,458.969,-549.615);-o-transform:matrix(0.43082,-0,-0,-0.43082,458.969,-549.615);}.t1c{transform:matrix(0.43082,-0,-0,-0.43082,461.123,-528.505);-ms-transform:matrix(0.43082,-0,-0,-0.43082,461.123,-528.505);-moz-transform:matrix(0.43082,-0,-0,-0.43082,461.123px,-528.505px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,461.123,-528.505);-o-transform:matrix(0.43082,-0,-0,-0.43082,461.123,-528.505);}.t1d{transform:matrix(0.43082,-0,-0,-0.43082,441.736,-490.808);-ms-transform:matrix(0.43082,-0,-0,-0.43082,441.736,-490.808);-moz-transform:matrix(0.43082,-0,-0,-0.43082,441.736px,-490.808px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,441.736,-490.808);-o-transform:matrix(0.43082,-0,-0,-0.43082,441.736,-490.808);}.t1e{transform:matrix(0.43082,-0,-0,-0.43082,530.916,-443.633);-ms-transform:matrix(0.43082,-0,-0,-0.43082,530.916,-443.633);-moz-transform:matrix(0.43082,-0,-0,-0.43082,530.916px,-443.633px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,530.916,-443.633);-o-transform:matrix(0.43082,-0,-0,-0.43082,530.916,-443.633);}.t1f{transform:matrix(0.43082,-0,-0,-0.43082,437.643,-445.788);-ms-transform:matrix(0.43082,-0,-0,-0.43082,437.643,-445.788);-moz-transform:matrix(0.43082,-0,-0,-0.43082,437.643px,-445.788px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,437.643,-445.788);-o-transform:matrix(0.43082,-0,-0,-0.43082,437.643,-445.788);}.t20{transform:matrix(0.43082,-0,-0,-0.43082,518.422,-573.31);-ms-transform:matrix(0.43082,-0,-0,-0.43082,518.422,-573.31);-moz-transform:matrix(0.43082,-0,-0,-0.43082,518.422px,-573.31px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,518.422,-573.31);-o-transform:matrix(0.43082,-0,-0,-0.43082,518.422,-573.31);}.t21{transform:matrix(0.43082,-0,-0,-0.43082,518.422,-560.386);-ms-transform:matrix(0.43082,-0,-0,-0.43082,518.422,-560.386);-moz-transform:matrix(0.43082,-0,-0,-0.43082,518.422px,-560.386px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,518.422,-560.386);-o-transform:matrix(0.43082,-0,-0,-0.43082,518.422,-560.386);}.t22{transform:matrix(0.43082,-0,-0,-0.43082,518.422,-547.892);-ms-transform:matrix(0.43082,-0,-0,-0.43082,518.422,-547.892);-moz-transform:matrix(0.43082,-0,-0,-0.43082,518.422px,-547.892px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,518.422,-547.892);-o-transform:matrix(0.43082,-0,-0,-0.43082,518.422,-547.892);}.t23{transform:matrix(0.43082,-0,-0,-0.43082,519.715,-564.694);-ms-transform:matrix(0.43082,-0,-0,-0.43082,519.715,-564.694);-moz-transform:matrix(0.43082,-0,-0,-0.43082,519.715px,-564.694px);-webkit-transform:matrix(0.43082,-0,-0,-0.43082,519.715,-564.694);-o-transform:matrix(0.43082,-0,-0,-0.43082,519.715,-564.694);}.t24{transform:matrix(1,-0,-0,1,317.014,-403.481);-ms-transform:matrix(1,-0,-0,1,317.014,-403.481);-moz-transform:matrix(1,-0,-0,1,317.014px,-403.481px);-webkit-transform:matrix(1,-0,-0,1,317.014,-403.481);-o-transform:matrix(1,-0,-0,1,317.014,-403.481);}.w7{width:28.6925px;}.w8{width:52.2293px;}.w9{width:47.7461px;}.wa{width:38.5555px;}.wb{width:61.4198px;}.t25{transform:matrix(1,-0,-0,1,54,-580.941);-ms-transform:matrix(1,-0,-0,1,54,-580.941);-moz-transform:matrix(1,-0,-0,1,54px,-580.941px);-webkit-transform:matrix(1,-0,-0,1,54,-580.941);-o-transform:matrix(1,-0,-0,1,54,-580.941);}.wc{width:42.8146px;}.wd{width:56.9366px;}.we{width:70.8346px;}.wf{width:33.3998px;}.t26{transform:matrix(1,-0,-0,1,54,-292.243);-ms-transform:matrix(1,-0,-0,1,54,-292.243);-moz-transform:matrix(1,-0,-0,1,54px,-292.243px);-webkit-transform:matrix(1,-0,-0,1,54,-292.243);-o-transform:matrix(1,-0,-0,1,54,-292.243);}@font-face{font-family:ff;src:url(ff.otf);}.ff{font-family:ff;}@font-face{font-family:f10;src:url(f10.otf);}.f10{font-family:f10;}.w10{width:8.9664px;}.t27{transform:matrix(1,-0,-0,1,54,-95.3424);-ms-transform:matrix(1,-0,-0,1,54,-95.3424);-moz-transform:matrix(1,-0,-0,1,54px,-95.3424px);-webkit-transform:matrix(1,-0,-0,1,54,-95.3424);-o-transform:matrix(1,-0,-0,1,54,-95.3424);}.t28{transform:matrix(1,-0,-0,1,388.745,-583.8);-ms-transform:matrix(1,-0,-0,1,388.745,-583.8);-moz-transform:matrix(1,-0,-0,1,388.745px,-583.8px);-webkit-transform:matrix(1,-0,-0,1,388.745,-583.8);-o-transform:matrix(1,-0,-0,1,388.745,-583.8);}.t29{transform:matrix(0.37213,-0,-0,0.37213,388.745,-583.8);-ms-transform:matrix(0.37213,-0,-0,0.37213,388.745,-583.8);-moz-transform:matrix(0.37213,-0,-0,0.37213,388.745px,-583.8px);-webkit-transform:matrix(0.37213,-0,-0,0.37213,388.745,-583.8);-o-transform:matrix(0.37213,-0,-0,0.37213,388.745,-583.8);}.t2a{transform:matrix(0.37213,-0,-0,-0.37213,302.97,-762.237);-ms-transform:matrix(0.37213,-0,-0,-0.37213,302.97,-762.237);-moz-transform:matrix(0.37213,-0,-0,-0.37213,302.97px,-762.237px);-webkit-transform:matrix(0.37213,-0,-0,-0.37213,302.97,-762.237);-o-transform:matrix(0.37213,-0,-0,-0.37213,302.97,-762.237);}.t2b{transform:matrix(0.37213,-0,-0,-0.37213,410.119,-705.648);-ms-transform:matrix(0.37213,-0,-0,-0.37213,410.119,-705.648);-moz-transform:matrix(0.37213,-0,-0,-0.37213,410.119px,-705.648px);-webkit-transform:matrix(0.37213,-0,-0,-0.37213,410.119,-705.648);-o-transform:matrix(0.37213,-0,-0,-0.37213,410.119,-705.648);}@font-face{font-family:f11;src:url(f11.ttf);}.f11{font-family:f11;}.t2c{transform:matrix(24,-0,-0,-24,0,0);-ms-transform:matrix(24,-0,-0,-24,0,0);-moz-transform:matrix(24,-0,-0,-24,0px,0px);-webkit-transform:matrix(24,-0,-0,-24,0,0);-o-transform:matrix(24,-0,-0,-24,0,0);}.t2d{transform:matrix(0.37213,-0,-0,-0.37213,460.194,-685.392);-ms-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-685.392);-moz-transform:matrix(0.37213,-0,-0,-0.37213,460.194px,-685.392px);-webkit-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-685.392);-o-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-685.392);}.t2e{transform:matrix(0.37213,-0,-0,-0.37213,460.194,-695.439);-ms-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-695.439);-moz-transform:matrix(0.37213,-0,-0,-0.37213,460.194px,-695.439px);-webkit-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-695.439);-o-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-695.439);}.t2f{transform:matrix(0.37213,-0,-0,-0.37213,460.194,-675.344);-ms-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-675.344);-moz-transform:matrix(0.37213,-0,-0,-0.37213,460.194px,-675.344px);-webkit-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-675.344);-o-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-675.344);}.t30{transform:matrix(0.37213,-0,-0,-0.37213,460.194,-665.297);-ms-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-665.297);-moz-transform:matrix(0.37213,-0,-0,-0.37213,460.194px,-665.297px);-webkit-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-665.297);-o-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-665.297);}.t31{transform:matrix(0.37213,-0,-0,-0.37213,460.194,-655.249);-ms-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-655.249);-moz-transform:matrix(0.37213,-0,-0,-0.37213,460.194px,-655.249px);-webkit-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-655.249);-o-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-655.249);}.t32{transform:matrix(0.37213,-0,-0,-0.37213,460.194,-645.202);-ms-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-645.202);-moz-transform:matrix(0.37213,-0,-0,-0.37213,460.194px,-645.202px);-webkit-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-645.202);-o-transform:matrix(0.37213,-0,-0,-0.37213,460.194,-645.202);}.t33{transform:matrix(1,-0,-0,1,317.014,-572.513);-ms-transform:matrix(1,-0,-0,1,317.014,-572.513);-moz-transform:matrix(1,-0,-0,1,317.014px,-572.513px);-webkit-transform:matrix(1,-0,-0,1,317.014,-572.513);-o-transform:matrix(1,-0,-0,1,317.014,-572.513);}.t34{transform:matrix(1,-0,-0,1,352.88,-315.191);-ms-transform:matrix(1,-0,-0,1,352.88,-315.191);-moz-transform:matrix(1,-0,-0,1,352.88px,-315.191px);-webkit-transform:matrix(1,-0,-0,1,352.88,-315.191);-o-transform:matrix(1,-0,-0,1,352.88,-315.191);}.t35{transform:matrix(0.46622,-0,-0,0.46622,352.88,-315.191);-ms-transform:matrix(0.46622,-0,-0,0.46622,352.88,-315.191);-moz-transform:matrix(0.46622,-0,-0,0.46622,352.88px,-315.191px);-webkit-transform:matrix(0.46622,-0,-0,0.46622,352.88,-315.191);-o-transform:matrix(0.46622,-0,-0,0.46622,352.88,-315.191);}.t36{transform:matrix(0.46622,-0,-0,-0.46622,323.741,-1038.06);-ms-transform:matrix(0.46622,-0,-0,-0.46622,323.741,-1038.06);-moz-transform:matrix(0.46622,-0,-0,-0.46622,323.741px,-1038.06px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,323.741,-1038.06);-o-transform:matrix(0.46622,-0,-0,-0.46622,323.741,-1038.06);}.t37{transform:matrix(0.46622,-0,-0,-0.46622,407.427,-494.547);-ms-transform:matrix(0.46622,-0,-0,-0.46622,407.427,-494.547);-moz-transform:matrix(0.46622,-0,-0,-0.46622,407.427px,-494.547px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,407.427,-494.547);-o-transform:matrix(0.46622,-0,-0,-0.46622,407.427,-494.547);}@font-face{font-family:f12;src:url(f12.ttf);}.f12{font-family:f12;}.t38{transform:matrix(10,-0,-0,-10,0,0);-ms-transform:matrix(10,-0,-0,-10,0,0);-moz-transform:matrix(10,-0,-0,-10,0px,0px);-webkit-transform:matrix(10,-0,-0,-10,0,0);-o-transform:matrix(10,-0,-0,-10,0,0);}.t39{transform:matrix(0.46622,-0,-0,-0.46622,373.86,-494.548);-ms-transform:matrix(0.46622,-0,-0,-0.46622,373.86,-494.548);-moz-transform:matrix(0.46622,-0,-0,-0.46622,373.86px,-494.548px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,373.86,-494.548);-o-transform:matrix(0.46622,-0,-0,-0.46622,373.86,-494.548);}.t3a{transform:matrix(0.46622,-0,-0,-0.46622,496.942,-494.548);-ms-transform:matrix(0.46622,-0,-0,-0.46622,496.942,-494.548);-moz-transform:matrix(0.46622,-0,-0,-0.46622,496.942px,-494.548px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,496.942,-494.548);-o-transform:matrix(0.46622,-0,-0,-0.46622,496.942,-494.548);}.t3b{transform:matrix(0.46622,-0,-0,-0.46622,463.374,-494.548);-ms-transform:matrix(0.46622,-0,-0,-0.46622,463.374,-494.548);-moz-transform:matrix(0.46622,-0,-0,-0.46622,463.374px,-494.548px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,463.374,-494.548);-o-transform:matrix(0.46622,-0,-0,-0.46622,463.374,-494.548);}.t3c{transform:matrix(0.46622,-0,-0,-0.46622,373.859,-427.869);-ms-transform:matrix(0.46622,-0,-0,-0.46622,373.859,-427.869);-moz-transform:matrix(0.46622,-0,-0,-0.46622,373.859px,-427.869px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,373.859,-427.869);-o-transform:matrix(0.46622,-0,-0,-0.46622,373.859,-427.869);}.t3d{transform:matrix(0.46622,-0,-0,-0.46622,407.427,-427.87);-ms-transform:matrix(0.46622,-0,-0,-0.46622,407.427,-427.87);-moz-transform:matrix(0.46622,-0,-0,-0.46622,407.427px,-427.87px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,407.427,-427.87);-o-transform:matrix(0.46622,-0,-0,-0.46622,407.427,-427.87);}.t3e{transform:matrix(0.46622,-0,-0,-0.46622,463.374,-427.87);-ms-transform:matrix(0.46622,-0,-0,-0.46622,463.374,-427.87);-moz-transform:matrix(0.46622,-0,-0,-0.46622,463.374px,-427.87px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,463.374,-427.87);-o-transform:matrix(0.46622,-0,-0,-0.46622,463.374,-427.87);}.t3f{transform:matrix(0.46622,-0,-0,-0.46622,496.942,-427.87);-ms-transform:matrix(0.46622,-0,-0,-0.46622,496.942,-427.87);-moz-transform:matrix(0.46622,-0,-0,-0.46622,496.942px,-427.87px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,496.942,-427.87);-o-transform:matrix(0.46622,-0,-0,-0.46622,496.942,-427.87);}.t40{transform:matrix(0.46622,-0,-0,-0.46622,367.332,-388.094);-ms-transform:matrix(0.46622,-0,-0,-0.46622,367.332,-388.094);-moz-transform:matrix(0.46622,-0,-0,-0.46622,367.332px,-388.094px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,367.332,-388.094);-o-transform:matrix(0.46622,-0,-0,-0.46622,367.332,-388.094);}.t41{transform:matrix(8,-0,-0,-8,0,0);-ms-transform:matrix(8,-0,-0,-8,0,0);-moz-transform:matrix(8,-0,-0,-8,0px,0px);-webkit-transform:matrix(8,-0,-0,-8,0,0);-o-transform:matrix(8,-0,-0,-8,0,0);}.t42{transform:matrix(0.46622,-0,-0,-0.46622,406.495,-350.157);-ms-transform:matrix(0.46622,-0,-0,-0.46622,406.495,-350.157);-moz-transform:matrix(0.46622,-0,-0,-0.46622,406.495px,-350.157px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,406.495,-350.157);-o-transform:matrix(0.46622,-0,-0,-0.46622,406.495,-350.157);}.t43{transform:matrix(0.46622,-0,-0,-0.46622,492.918,-386.229);-ms-transform:matrix(0.46622,-0,-0,-0.46622,492.918,-386.229);-moz-transform:matrix(0.46622,-0,-0,-0.46622,492.918px,-386.229px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,492.918,-386.229);-o-transform:matrix(0.46622,-0,-0,-0.46622,492.918,-386.229);}.t44{transform:matrix(0.46622,-0,-0,-0.46622,443.793,-350.157);-ms-transform:matrix(0.46622,-0,-0,-0.46622,443.793,-350.157);-moz-transform:matrix(0.46622,-0,-0,-0.46622,443.793px,-350.157px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,443.793,-350.157);-o-transform:matrix(0.46622,-0,-0,-0.46622,443.793,-350.157);}.t45{transform:matrix(0.46622,-0,-0,-0.46622,492.918,-350.796);-ms-transform:matrix(0.46622,-0,-0,-0.46622,492.918,-350.796);-moz-transform:matrix(0.46622,-0,-0,-0.46622,492.918px,-350.796px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,492.918,-350.796);-o-transform:matrix(0.46622,-0,-0,-0.46622,492.918,-350.796);}.t46{transform:matrix(0.46622,-0,-0,-0.46622,369.197,-343.337);-ms-transform:matrix(0.46622,-0,-0,-0.46622,369.197,-343.337);-moz-transform:matrix(0.46622,-0,-0,-0.46622,369.197px,-343.337px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,369.197,-343.337);-o-transform:matrix(0.46622,-0,-0,-0.46622,369.197,-343.337);}.t47{transform:matrix(0.46622,-0,-0,-0.46622,444.725,-387.455);-ms-transform:matrix(0.46622,-0,-0,-0.46622,444.725,-387.455);-moz-transform:matrix(0.46622,-0,-0,-0.46622,444.725px,-387.455px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,444.725,-387.455);-o-transform:matrix(0.46622,-0,-0,-0.46622,444.725,-387.455);}.t48{transform:matrix(0.46622,-0,-0,-0.46622,437.933,-403.808);-ms-transform:matrix(0.46622,-0,-0,-0.46622,437.933,-403.808);-moz-transform:matrix(0.46622,-0,-0,-0.46622,437.933px,-403.808px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,437.933,-403.808);-o-transform:matrix(0.46622,-0,-0,-0.46622,437.933,-403.808);}.t49{transform:matrix(0.46622,-0,-0,-0.46622,373.86,-403.808);-ms-transform:matrix(0.46622,-0,-0,-0.46622,373.86,-403.808);-moz-transform:matrix(0.46622,-0,-0,-0.46622,373.86px,-403.808px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,373.86,-403.808);-o-transform:matrix(0.46622,-0,-0,-0.46622,373.86,-403.808);}.t4a{transform:matrix(0.46622,-0,-0,-0.46622,497.58,-403.808);-ms-transform:matrix(0.46622,-0,-0,-0.46622,497.58,-403.808);-moz-transform:matrix(0.46622,-0,-0,-0.46622,497.58px,-403.808px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,497.58,-403.808);-o-transform:matrix(0.46622,-0,-0,-0.46622,497.58,-403.808);}.t4b{transform:matrix(0.46622,-0,-0,-0.46622,373.86,-330.136);-ms-transform:matrix(0.46622,-0,-0,-0.46622,373.86,-330.136);-moz-transform:matrix(0.46622,-0,-0,-0.46622,373.86px,-330.136px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,373.86,-330.136);-o-transform:matrix(0.46622,-0,-0,-0.46622,373.86,-330.136);}.t4c{transform:matrix(0.46622,-0,-0,-0.46622,413.022,-333.866);-ms-transform:matrix(0.46622,-0,-0,-0.46622,413.022,-333.866);-moz-transform:matrix(0.46622,-0,-0,-0.46622,413.022px,-333.866px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,413.022,-333.866);-o-transform:matrix(0.46622,-0,-0,-0.46622,413.022,-333.866);}.t4d{transform:matrix(0.46622,-0,-0,-0.46622,437.933,-333.866);-ms-transform:matrix(0.46622,-0,-0,-0.46622,437.933,-333.866);-moz-transform:matrix(0.46622,-0,-0,-0.46622,437.933px,-333.866px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,437.933,-333.866);-o-transform:matrix(0.46622,-0,-0,-0.46622,437.933,-333.866);}.t4e{transform:matrix(0.46622,-0,-0,-0.46622,496.942,-333.641);-ms-transform:matrix(0.46622,-0,-0,-0.46622,496.942,-333.641);-moz-transform:matrix(0.46622,-0,-0,-0.46622,496.942px,-333.641px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,496.942,-333.641);-o-transform:matrix(0.46622,-0,-0,-0.46622,496.942,-333.641);}.t4f{transform:matrix(0.46622,-0,-0,-0.46622,367.332,-478.834);-ms-transform:matrix(0.46622,-0,-0,-0.46622,367.332,-478.834);-moz-transform:matrix(0.46622,-0,-0,-0.46622,367.332px,-478.834px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,367.332,-478.834);-o-transform:matrix(0.46622,-0,-0,-0.46622,367.332,-478.834);}.t50{transform:matrix(0.46622,-0,-0,-0.46622,367.332,-439.671);-ms-transform:matrix(0.46622,-0,-0,-0.46622,367.332,-439.671);-moz-transform:matrix(0.46622,-0,-0,-0.46622,367.332px,-439.671px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,367.332,-439.671);-o-transform:matrix(0.46622,-0,-0,-0.46622,367.332,-439.671);}.t51{transform:matrix(0.46622,-0,-0,-0.46622,413.022,-439.671);-ms-transform:matrix(0.46622,-0,-0,-0.46622,413.022,-439.671);-moz-transform:matrix(0.46622,-0,-0,-0.46622,413.022px,-439.671px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,413.022,-439.671);-o-transform:matrix(0.46622,-0,-0,-0.46622,413.022,-439.671);}.t52{transform:matrix(0.46622,-0,-0,-0.46622,413.022,-478.834);-ms-transform:matrix(0.46622,-0,-0,-0.46622,413.022,-478.834);-moz-transform:matrix(0.46622,-0,-0,-0.46622,413.022px,-478.834px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,413.022,-478.834);-o-transform:matrix(0.46622,-0,-0,-0.46622,413.022,-478.834);}.t53{transform:matrix(0.46622,-0,-0,-0.46622,456.847,-478.834);-ms-transform:matrix(0.46622,-0,-0,-0.46622,456.847,-478.834);-moz-transform:matrix(0.46622,-0,-0,-0.46622,456.847px,-478.834px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,456.847,-478.834);-o-transform:matrix(0.46622,-0,-0,-0.46622,456.847,-478.834);}.t54{transform:matrix(0.46622,-0,-0,-0.46622,456.847,-439.671);-ms-transform:matrix(0.46622,-0,-0,-0.46622,456.847,-439.671);-moz-transform:matrix(0.46622,-0,-0,-0.46622,456.847px,-439.671px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,456.847,-439.671);-o-transform:matrix(0.46622,-0,-0,-0.46622,456.847,-439.671);}.t55{transform:matrix(0.46622,-0,-0,-0.46622,502.536,-439.671);-ms-transform:matrix(0.46622,-0,-0,-0.46622,502.536,-439.671);-moz-transform:matrix(0.46622,-0,-0,-0.46622,502.536px,-439.671px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,502.536,-439.671);-o-transform:matrix(0.46622,-0,-0,-0.46622,502.536,-439.671);}.t56{transform:matrix(0.46622,-0,-0,-0.46622,502.536,-478.834);-ms-transform:matrix(0.46622,-0,-0,-0.46622,502.536,-478.834);-moz-transform:matrix(0.46622,-0,-0,-0.46622,502.536px,-478.834px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,502.536,-478.834);-o-transform:matrix(0.46622,-0,-0,-0.46622,502.536,-478.834);}.t57{transform:matrix(0.46622,-0,-0,-0.46622,390.643,-420.556);-ms-transform:matrix(0.46622,-0,-0,-0.46622,390.643,-420.556);-moz-transform:matrix(0.46622,-0,-0,-0.46622,390.643px,-420.556px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,390.643,-420.556);-o-transform:matrix(0.46622,-0,-0,-0.46622,390.643,-420.556);}.t58{transform:matrix(14,-0,-0,-14,0,0);-ms-transform:matrix(14,-0,-0,-14,0,0);-moz-transform:matrix(14,-0,-0,-14,0px,0px);-webkit-transform:matrix(14,-0,-0,-14,0,0);-o-transform:matrix(14,-0,-0,-14,0,0);}.t59{transform:matrix(0.46622,-0,-0,-0.46622,479.758,-421.171);-ms-transform:matrix(0.46622,-0,-0,-0.46622,479.758,-421.171);-moz-transform:matrix(0.46622,-0,-0,-0.46622,479.758px,-421.171px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,479.758,-421.171);-o-transform:matrix(0.46622,-0,-0,-0.46622,479.758,-421.171);}.t5a{transform:matrix(0.46622,-0,-0,-0.46622,439.363,-323.989);-ms-transform:matrix(0.46622,-0,-0,-0.46622,439.363,-323.989);-moz-transform:matrix(0.46622,-0,-0,-0.46622,439.363px,-323.989px);-webkit-transform:matrix(0.46622,-0,-0,-0.46622,439.363,-323.989);-o-transform:matrix(0.46622,-0,-0,-0.46622,439.363,-323.989);}.t5b{transform:matrix(1,-0,-0,1,317.014,-303.903);-ms-transform:matrix(1,-0,-0,1,317.014,-303.903);-moz-transform:matrix(1,-0,-0,1,317.014px,-303.903px);-webkit-transform:matrix(1,-0,-0,1,317.014,-303.903);-o-transform:matrix(1,-0,-0,1,317.014,-303.903);}.t5c{transform:matrix(1,-0,-0,1,93.9255,-581.398);-ms-transform:matrix(1,-0,-0,1,93.9255,-581.398);-moz-transform:matrix(1,-0,-0,1,93.9255px,-581.398px);-webkit-transform:matrix(1,-0,-0,1,93.9255,-581.398);-o-transform:matrix(1,-0,-0,1,93.9255,-581.398);}.t5d{transform:matrix(0.35,-0,-0,0.35,93.9255,-581.398);-ms-transform:matrix(0.35,-0,-0,0.35,93.9255,-581.398);-moz-transform:matrix(0.35,-0,-0,0.35,93.9255px,-581.398px);-webkit-transform:matrix(0.35,-0,-0,0.35,93.9255,-581.398);-o-transform:matrix(0.35,-0,-0,0.35,93.9255,-581.398);}.t5e{transform:matrix(0.35,-0,-0,-0.35,79.0505,-963.773);-ms-transform:matrix(0.35,-0,-0,-0.35,79.0505,-963.773);-moz-transform:matrix(0.35,-0,-0,-0.35,79.0505px,-963.773px);-webkit-transform:matrix(0.35,-0,-0,-0.35,79.0505,-963.773);-o-transform:matrix(0.35,-0,-0,-0.35,79.0505,-963.773);}.t5f{transform:matrix(0.35,-0,-0,-0.35,135.137,-686.999);-ms-transform:matrix(0.35,-0,-0,-0.35,135.137,-686.999);-moz-transform:matrix(0.35,-0,-0,-0.35,135.137px,-686.999px);-webkit-transform:matrix(0.35,-0,-0,-0.35,135.137,-686.999);-o-transform:matrix(0.35,-0,-0,-0.35,135.137,-686.999);}@font-face{font-family:f13;src:url(f13.ttf);}.f13{font-family:f13;}.t60{transform:matrix(0.35,-0,-0,-0.35,122.426,-660.662);-ms-transform:matrix(0.35,-0,-0,-0.35,122.426,-660.662);-moz-transform:matrix(0.35,-0,-0,-0.35,122.426px,-660.662px);-webkit-transform:matrix(0.35,-0,-0,-0.35,122.426,-660.662);-o-transform:matrix(0.35,-0,-0,-0.35,122.426,-660.662);}.t61{transform:matrix(0.35,-0,-0,-0.35,147.627,-660.662);-ms-transform:matrix(0.35,-0,-0,-0.35,147.627,-660.662);-moz-transform:matrix(0.35,-0,-0,-0.35,147.627px,-660.662px);-webkit-transform:matrix(0.35,-0,-0,-0.35,147.627,-660.662);-o-transform:matrix(0.35,-0,-0,-0.35,147.627,-660.662);}.t62{transform:matrix(0.35,-0,-0,-0.35,135.312,-638.851);-ms-transform:matrix(0.35,-0,-0,-0.35,135.312,-638.851);-moz-transform:matrix(0.35,-0,-0,-0.35,135.312px,-638.851px);-webkit-transform:matrix(0.35,-0,-0,-0.35,135.312,-638.851);-o-transform:matrix(0.35,-0,-0,-0.35,135.312,-638.851);}.t63{transform:matrix(0.35,-0,-0,-0.35,134.851,-708.787);-ms-transform:matrix(0.35,-0,-0,-0.35,134.851,-708.787);-moz-transform:matrix(0.35,-0,-0,-0.35,134.851px,-708.787px);-webkit-transform:matrix(0.35,-0,-0,-0.35,134.851,-708.787);-o-transform:matrix(0.35,-0,-0,-0.35,134.851,-708.787);}.t64{transform:matrix(0.35,-0,-0,-0.35,104.011,-661.548);-ms-transform:matrix(0.35,-0,-0,-0.35,104.011,-661.548);-moz-transform:matrix(0.35,-0,-0,-0.35,104.011px,-661.548px);-webkit-transform:matrix(0.35,-0,-0,-0.35,104.011,-661.548);-o-transform:matrix(0.35,-0,-0,-0.35,104.011,-661.548);}.t65{transform:matrix(0.35,-0,-0,-0.35,134.851,-617.105);-ms-transform:matrix(0.35,-0,-0,-0.35,134.851,-617.105);-moz-transform:matrix(0.35,-0,-0,-0.35,134.851px,-617.105px);-webkit-transform:matrix(0.35,-0,-0,-0.35,134.851,-617.105);-o-transform:matrix(0.35,-0,-0,-0.35,134.851,-617.105);}.t66{transform:matrix(0.35,-0,-0,-0.35,179.858,-707.677);-ms-transform:matrix(0.35,-0,-0,-0.35,179.858,-707.677);-moz-transform:matrix(0.35,-0,-0,-0.35,179.858px,-707.677px);-webkit-transform:matrix(0.35,-0,-0,-0.35,179.858,-707.677);-o-transform:matrix(0.35,-0,-0,-0.35,179.858,-707.677);}.t67{transform:matrix(0.35,-0,-0,-0.35,211.293,-663.862);-ms-transform:matrix(0.35,-0,-0,-0.35,211.293,-663.862);-moz-transform:matrix(0.35,-0,-0,-0.35,211.293px,-663.862px);-webkit-transform:matrix(0.35,-0,-0,-0.35,211.293,-663.862);-o-transform:matrix(0.35,-0,-0,-0.35,211.293,-663.862);}.t68{transform:matrix(0.35,-0,-0,-0.35,230.193,-698.367);-ms-transform:matrix(0.35,-0,-0,-0.35,230.193,-698.367);-moz-transform:matrix(0.35,-0,-0,-0.35,230.193px,-698.367px);-webkit-transform:matrix(0.35,-0,-0,-0.35,230.193,-698.367);-o-transform:matrix(0.35,-0,-0,-0.35,230.193,-698.367);}.t69{transform:matrix(0.35,-0,-0,-0.35,220.743,-710.956);-ms-transform:matrix(0.35,-0,-0,-0.35,220.743,-710.956);-moz-transform:matrix(0.35,-0,-0,-0.35,220.743px,-710.956px);-webkit-transform:matrix(0.35,-0,-0,-0.35,220.743,-710.956);-o-transform:matrix(0.35,-0,-0,-0.35,220.743,-710.956);}.t6a{transform:matrix(0.35,-0,-0,-0.35,233.343,-679.485);-ms-transform:matrix(0.35,-0,-0,-0.35,233.343,-679.485);-moz-transform:matrix(0.35,-0,-0,-0.35,233.343px,-679.485px);-webkit-transform:matrix(0.35,-0,-0,-0.35,233.343,-679.485);-o-transform:matrix(0.35,-0,-0,-0.35,233.343,-679.485);}.t6b{transform:matrix(0.35,-0,-0,-0.35,233.343,-619.21);-ms-transform:matrix(0.35,-0,-0,-0.35,233.343,-619.21);-moz-transform:matrix(0.35,-0,-0,-0.35,233.343px,-619.21px);-webkit-transform:matrix(0.35,-0,-0,-0.35,233.343,-619.21);-o-transform:matrix(0.35,-0,-0,-0.35,233.343,-619.21);}.t6c{transform:matrix(0.35,-0,-0,-0.35,135.05,-588.923);-ms-transform:matrix(0.35,-0,-0,-0.35,135.05,-588.923);-moz-transform:matrix(0.35,-0,-0,-0.35,135.05px,-588.923px);-webkit-transform:matrix(0.35,-0,-0,-0.35,135.05,-588.923);-o-transform:matrix(0.35,-0,-0,-0.35,135.05,-588.923);}.t6d{transform:matrix(18,-0,-0,-18,0,0);-ms-transform:matrix(18,-0,-0,-18,0,0);-moz-transform:matrix(18,-0,-0,-18,0px,0px);-webkit-transform:matrix(18,-0,-0,-18,0,0);-o-transform:matrix(18,-0,-0,-18,0,0);}.t6e{transform:matrix(0.35,-0,-0,-0.35,207.151,-590.323);-ms-transform:matrix(0.35,-0,-0,-0.35,207.151,-590.323);-moz-transform:matrix(0.35,-0,-0,-0.35,207.151px,-590.323px);-webkit-transform:matrix(0.35,-0,-0,-0.35,207.151,-590.323);-o-transform:matrix(0.35,-0,-0,-0.35,207.151,-590.323);}.t6f{transform:matrix(1,-0,-0,1,54,-570.11);-ms-transform:matrix(1,-0,-0,1,54,-570.11);-moz-transform:matrix(1,-0,-0,1,54px,-570.11px);-webkit-transform:matrix(1,-0,-0,1,54,-570.11);-o-transform:matrix(1,-0,-0,1,54,-570.11);}@font-face{font-family:f14;src:url(f14.otf);}.f14{font-family:f14;}.t70{transform:matrix(1,-0,-0,1,54,-104.309);-ms-transform:matrix(1,-0,-0,1,54,-104.309);-moz-transform:matrix(1,-0,-0,1,54px,-104.309px);-webkit-transform:matrix(1,-0,-0,1,54,-104.309);-o-transform:matrix(1,-0,-0,1,54,-104.309);}.t71{transform:matrix(1,-0,-0,1,382.767,-600.193);-ms-transform:matrix(1,-0,-0,1,382.767,-600.193);-moz-transform:matrix(1,-0,-0,1,382.767px,-600.193px);-webkit-transform:matrix(1,-0,-0,1,382.767,-600.193);-o-transform:matrix(1,-0,-0,1,382.767,-600.193);}.t72{transform:matrix(0.33005,-0,-0,0.33005,382.767,-600.193);-ms-transform:matrix(0.33005,-0,-0,0.33005,382.767,-600.193);-moz-transform:matrix(0.33005,-0,-0,0.33005,382.767px,-600.193px);-webkit-transform:matrix(0.33005,-0,-0,0.33005,382.767,-600.193);-o-transform:matrix(0.33005,-0,-0,0.33005,382.767,-600.193);}.t73{transform:matrix(0.33005,-0,-0,-0.33005,376.662,-1233.39);-ms-transform:matrix(0.33005,-0,-0,-0.33005,376.662,-1233.39);-moz-transform:matrix(0.33005,-0,-0,-0.33005,376.662px,-1233.39px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,376.662,-1233.39);-o-transform:matrix(0.33005,-0,-0,-0.33005,376.662,-1233.39);}.t74{transform:matrix(0.33005,-0,-0,-0.33005,400.26,-688.316);-ms-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-688.316);-moz-transform:matrix(0.33005,-0,-0,-0.33005,400.26px,-688.316px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-688.316);-o-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-688.316);}@font-face{font-family:f15;src:url(f15.ttf);}.f15{font-family:f15;}.t75{transform:matrix(0.33005,-0,-0,-0.33005,400.26,-668.513);-ms-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-668.513);-moz-transform:matrix(0.33005,-0,-0,-0.33005,400.26px,-668.513px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-668.513);-o-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-668.513);}.t76{transform:matrix(0.33005,-0,-0,-0.33005,400.26,-709.44);-ms-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-709.44);-moz-transform:matrix(0.33005,-0,-0,-0.33005,400.26px,-709.44px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-709.44);-o-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-709.44);}.t77{transform:matrix(0.33005,-0,-0,-0.33005,400.26,-609.104);-ms-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-609.104);-moz-transform:matrix(0.33005,-0,-0,-0.33005,400.26px,-609.104px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-609.104);-o-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-609.104);}.t78{transform:matrix(0.33005,-0,-0,-0.33005,400.26,-647.39);-ms-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-647.39);-moz-transform:matrix(0.33005,-0,-0,-0.33005,400.26px,-647.39px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-647.39);-o-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-647.39);}.t79{transform:matrix(0.33005,-0,-0,-0.33005,400.26,-627.587);-ms-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-627.587);-moz-transform:matrix(0.33005,-0,-0,-0.33005,400.26px,-627.587px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-627.587);-o-transform:matrix(0.33005,-0,-0,-0.33005,400.26,-627.587);}.t7a{transform:matrix(0.33005,-0,-0,-0.33005,449.047,-688.464);-ms-transform:matrix(0.33005,-0,-0,-0.33005,449.047,-688.464);-moz-transform:matrix(0.33005,-0,-0,-0.33005,449.047px,-688.464px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,449.047,-688.464);-o-transform:matrix(0.33005,-0,-0,-0.33005,449.047,-688.464);}.t7b{transform:matrix(0.33005,-0,-0,-0.33005,431.945,-710.76);-ms-transform:matrix(0.33005,-0,-0,-0.33005,431.945,-710.76);-moz-transform:matrix(0.33005,-0,-0,-0.33005,431.945px,-710.76px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,431.945,-710.76);-o-transform:matrix(0.33005,-0,-0,-0.33005,431.945,-710.76);}.t7c{transform:matrix(0.33005,-0,-0,-0.33005,449.047,-645.41);-ms-transform:matrix(0.33005,-0,-0,-0.33005,449.047,-645.41);-moz-transform:matrix(0.33005,-0,-0,-0.33005,449.047px,-645.41px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,449.047,-645.41);-o-transform:matrix(0.33005,-0,-0,-0.33005,449.047,-645.41);}.t7d{transform:matrix(0.33005,-0,-0,-0.33005,471.881,-653.661);-ms-transform:matrix(0.33005,-0,-0,-0.33005,471.881,-653.661);-moz-transform:matrix(0.33005,-0,-0,-0.33005,471.881px,-653.661px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,471.881,-653.661);-o-transform:matrix(0.33005,-0,-0,-0.33005,471.881,-653.661);}.t7e{transform:matrix(0.33005,-0,-0,-0.33005,469.241,-703.829);-ms-transform:matrix(0.33005,-0,-0,-0.33005,469.241,-703.829);-moz-transform:matrix(0.33005,-0,-0,-0.33005,469.241px,-703.829px);-webkit-transform:matrix(0.33005,-0,-0,-0.33005,469.241,-703.829);-o-transform:matrix(0.33005,-0,-0,-0.33005,469.241,-703.829);}.t7f{transform:matrix(1,-0,-0,1,317.014,-588.905);-ms-transform:matrix(1,-0,-0,1,317.014,-588.905);-moz-transform:matrix(1,-0,-0,1,317.014px,-588.905px);-webkit-transform:matrix(1,-0,-0,1,317.014,-588.905);-o-transform:matrix(1,-0,-0,1,317.014,-588.905);}.s8{font-size:7.1731px;}.t80{transform:matrix(1,-0,-0,1,342.779,-710.037);-ms-transform:matrix(1,-0,-0,1,342.779,-710.037);-moz-transform:matrix(1,-0,-0,1,342.779px,-710.037px);-webkit-transform:matrix(1,-0,-0,1,342.779,-710.037);-o-transform:matrix(1,-0,-0,1,342.779,-710.037);}.t81{transform:matrix(1,-0,-0,1,390.097,-710.037);-ms-transform:matrix(1,-0,-0,1,390.097,-710.037);-moz-transform:matrix(1,-0,-0,1,390.097px,-710.037px);-webkit-transform:matrix(1,-0,-0,1,390.097,-710.037);-o-transform:matrix(1,-0,-0,1,390.097,-710.037);}.t82{transform:matrix(1,-0,-0,1,317.573,-709.639);-ms-transform:matrix(1,-0,-0,1,317.573,-709.639);-moz-transform:matrix(1,-0,-0,1,317.573px,-709.639px);-webkit-transform:matrix(1,-0,-0,1,317.573,-709.639);-o-transform:matrix(1,-0,-0,1,317.573,-709.639);}.t83{transform:matrix(1,-0,-0,1,342.779,-699.676);-ms-transform:matrix(1,-0,-0,1,342.779,-699.676);-moz-transform:matrix(1,-0,-0,1,342.779px,-699.676px);-webkit-transform:matrix(1,-0,-0,1,342.779,-699.676);-o-transform:matrix(1,-0,-0,1,342.779,-699.676);}.t84{transform:matrix(1,-0,-0,1,390.097,-699.676);-ms-transform:matrix(1,-0,-0,1,390.097,-699.676);-moz-transform:matrix(1,-0,-0,1,390.097px,-699.676px);-webkit-transform:matrix(1,-0,-0,1,390.097,-699.676);-o-transform:matrix(1,-0,-0,1,390.097,-699.676);}.t85{transform:matrix(1,-0,-0,1,342.779,-689.714);-ms-transform:matrix(1,-0,-0,1,342.779,-689.714);-moz-transform:matrix(1,-0,-0,1,342.779px,-689.714px);-webkit-transform:matrix(1,-0,-0,1,342.779,-689.714);-o-transform:matrix(1,-0,-0,1,342.779,-689.714);}.t86{transform:matrix(1,-0,-0,1,390.097,-689.714);-ms-transform:matrix(1,-0,-0,1,390.097,-689.714);-moz-transform:matrix(1,-0,-0,1,390.097px,-689.714px);-webkit-transform:matrix(1,-0,-0,1,390.097,-689.714);-o-transform:matrix(1,-0,-0,1,390.097,-689.714);}.t87{transform:matrix(1,-0,-0,1,342.779,-679.751);-ms-transform:matrix(1,-0,-0,1,342.779,-679.751);-moz-transform:matrix(1,-0,-0,1,342.779px,-679.751px);-webkit-transform:matrix(1,-0,-0,1,342.779,-679.751);-o-transform:matrix(1,-0,-0,1,342.779,-679.751);}.t88{transform:matrix(1,-0,-0,1,390.097,-679.751);-ms-transform:matrix(1,-0,-0,1,390.097,-679.751);-moz-transform:matrix(1,-0,-0,1,390.097px,-679.751px);-webkit-transform:matrix(1,-0,-0,1,390.097,-679.751);-o-transform:matrix(1,-0,-0,1,390.097,-679.751);}.t89{transform:matrix(1,-0,-0,1,342.779,-669.788);-ms-transform:matrix(1,-0,-0,1,342.779,-669.788);-moz-transform:matrix(1,-0,-0,1,342.779px,-669.788px);-webkit-transform:matrix(1,-0,-0,1,342.779,-669.788);-o-transform:matrix(1,-0,-0,1,342.779,-669.788);}.t8a{transform:matrix(1,-0,-0,1,390.097,-669.788);-ms-transform:matrix(1,-0,-0,1,390.097,-669.788);-moz-transform:matrix(1,-0,-0,1,390.097px,-669.788px);-webkit-transform:matrix(1,-0,-0,1,390.097,-669.788);-o-transform:matrix(1,-0,-0,1,390.097,-669.788);}.t8b{transform:matrix(1,-0,-0,1,342.779,-659.826);-ms-transform:matrix(1,-0,-0,1,342.779,-659.826);-moz-transform:matrix(1,-0,-0,1,342.779px,-659.826px);-webkit-transform:matrix(1,-0,-0,1,342.779,-659.826);-o-transform:matrix(1,-0,-0,1,342.779,-659.826);}.t8c{transform:matrix(1,-0,-0,1,390.097,-659.826);-ms-transform:matrix(1,-0,-0,1,390.097,-659.826);-moz-transform:matrix(1,-0,-0,1,390.097px,-659.826px);-webkit-transform:matrix(1,-0,-0,1,390.097,-659.826);-o-transform:matrix(1,-0,-0,1,390.097,-659.826);}.t8d{transform:matrix(1,-0,-0,1,342.779,-649.863);-ms-transform:matrix(1,-0,-0,1,342.779,-649.863);-moz-transform:matrix(1,-0,-0,1,342.779px,-649.863px);-webkit-transform:matrix(1,-0,-0,1,342.779,-649.863);-o-transform:matrix(1,-0,-0,1,342.779,-649.863);}.t8e{transform:matrix(1,-0,-0,1,390.097,-649.863);-ms-transform:matrix(1,-0,-0,1,390.097,-649.863);-moz-transform:matrix(1,-0,-0,1,390.097px,-649.863px);-webkit-transform:matrix(1,-0,-0,1,390.097,-649.863);-o-transform:matrix(1,-0,-0,1,390.097,-649.863);}.t8f{transform:matrix(1,-0,-0,1,342.779,-639.9);-ms-transform:matrix(1,-0,-0,1,342.779,-639.9);-moz-transform:matrix(1,-0,-0,1,342.779px,-639.9px);-webkit-transform:matrix(1,-0,-0,1,342.779,-639.9);-o-transform:matrix(1,-0,-0,1,342.779,-639.9);}.t90{transform:matrix(1,-0,-0,1,390.097,-639.9);-ms-transform:matrix(1,-0,-0,1,390.097,-639.9);-moz-transform:matrix(1,-0,-0,1,390.097px,-639.9px);-webkit-transform:matrix(1,-0,-0,1,390.097,-639.9);-o-transform:matrix(1,-0,-0,1,390.097,-639.9);}.t91{transform:matrix(1,-0,-0,1,317.014,-635.587);-ms-transform:matrix(1,-0,-0,1,317.014,-635.587);-moz-transform:matrix(1,-0,-0,1,317.014px,-635.587px);-webkit-transform:matrix(1,-0,-0,1,317.014,-635.587);-o-transform:matrix(1,-0,-0,1,317.014,-635.587);}.t92{transform:matrix(1,-0,-0,1,317.014,-506.181);-ms-transform:matrix(1,-0,-0,1,317.014,-506.181);-moz-transform:matrix(1,-0,-0,1,317.014px,-506.181px);-webkit-transform:matrix(1,-0,-0,1,317.014,-506.181);-o-transform:matrix(1,-0,-0,1,317.014,-506.181);}.t93{transform:matrix(0.55,-0,-0,0.55,317.014,-506.181);-ms-transform:matrix(0.55,-0,-0,0.55,317.014,-506.181);-moz-transform:matrix(0.55,-0,-0,0.55,317.014px,-506.181px);-webkit-transform:matrix(0.55,-0,-0,0.55,317.014,-506.181);-o-transform:matrix(0.55,-0,-0,0.55,317.014,-506.181);}.t94{transform:matrix(0.55,-0,-0,0.55,286.699,-323.518);-ms-transform:matrix(0.55,-0,-0,0.55,286.699,-323.518);-moz-transform:matrix(0.55,-0,-0,0.55,286.699px,-323.518px);-webkit-transform:matrix(0.55,-0,-0,0.55,286.699,-323.518);-o-transform:matrix(0.55,-0,-0,0.55,286.699,-323.518);}.t95{transform:matrix(4.33071e-05,-0,-0,-4.33071e-05,316.927,-718.99);-ms-transform:matrix(4.33071e-05,-0,-0,-4.33071e-05,316.927,-718.99);-moz-transform:matrix(4.33071e-05,-0,-0,-4.33071e-05,316.927px,-718.99px);-webkit-transform:matrix(4.33071e-05,-0,-0,-4.33071e-05,316.927,-718.99);-o-transform:matrix(4.33071e-05,-0,-0,-4.33071e-05,316.927,-718.99);}.t96{transform:matrix(0.55,-0,-0,0.55,377.215,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,377.215,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,377.215px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,377.215,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,377.215,-537.802);}@font-face{font-family:f16;src:url(f16.ttf);}.f16{font-family:f16;}.t97{transform:matrix(10,-0,-0,10,0,0);-ms-transform:matrix(10,-0,-0,10,0,0);-moz-transform:matrix(10,-0,-0,10,0px,0px);-webkit-transform:matrix(10,-0,-0,10,0,0);-o-transform:matrix(10,-0,-0,10,0,0);}.t98{transform:matrix(0.55,-0,-0,0.55,393.004,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,393.004,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,393.004px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,393.004,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,393.004,-537.802);}.t99{transform:matrix(0.55,-0,-0,0.55,410.187,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,410.187,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,410.187px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,410.187,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,410.187,-537.802);}.t9a{transform:matrix(0.55,-0,-0,0.55,427.37,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,427.37,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,427.37px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,427.37,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,427.37,-537.802);}.t9b{transform:matrix(0.55,-0,-0,0.55,444.554,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,444.554,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,444.554px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,444.554,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,444.554,-537.802);}.t9c{transform:matrix(0.55,-0,-0,0.55,461.737,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,461.737,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,461.737px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,461.737,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,461.737,-537.802);}.t9d{transform:matrix(0.55,-0,-0,0.55,478.92,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,478.92,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,478.92px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,478.92,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,478.92,-537.802);}.t9e{transform:matrix(0.55,-0,-0,0.55,496.103,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,496.103,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,496.103px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,496.103,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,496.103,-537.802);}.t9f{transform:matrix(0.55,-0,-0,0.55,513.286,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,513.286,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,513.286px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,513.286,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,513.286,-537.802);}.ta0{transform:matrix(0.55,-0,-0,0.55,530.469,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,530.469,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,530.469px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,530.469,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,530.469,-537.802);}.ta1{transform:matrix(0.55,-0,-0,0.55,546.258,-537.802);-ms-transform:matrix(0.55,-0,-0,0.55,546.258,-537.802);-moz-transform:matrix(0.55,-0,-0,0.55,546.258px,-537.802px);-webkit-transform:matrix(0.55,-0,-0,0.55,546.258,-537.802);-o-transform:matrix(0.55,-0,-0,0.55,546.258,-537.802);}.ta2{transform:matrix(0.55,-0,-0,0.55,305.876,-548.841);-ms-transform:matrix(0.55,-0,-0,0.55,305.876,-548.841);-moz-transform:matrix(0.55,-0,-0,0.55,305.876px,-548.841px);-webkit-transform:matrix(0.55,-0,-0,0.55,305.876,-548.841);-o-transform:matrix(0.55,-0,-0,0.55,305.876,-548.841);}.ta3{transform:matrix(8,-0,-0,8,0,0);-ms-transform:matrix(8,-0,-0,8,0,0);-moz-transform:matrix(8,-0,-0,8,0px,0px);-webkit-transform:matrix(8,-0,-0,8,0,0);-o-transform:matrix(8,-0,-0,8,0,0);}.ta4{transform:matrix(0.55,-0,-0,0.55,304.217,-555.435);-ms-transform:matrix(0.55,-0,-0,0.55,304.217,-555.435);-moz-transform:matrix(0.55,-0,-0,0.55,304.217px,-555.435px);-webkit-transform:matrix(0.55,-0,-0,0.55,304.217,-555.435);-o-transform:matrix(0.55,-0,-0,0.55,304.217,-555.435);}.ta5{transform:matrix(0.55,-0,-0,0.55,302.934,-562.028);-ms-transform:matrix(0.55,-0,-0,0.55,302.934,-562.028);-moz-transform:matrix(0.55,-0,-0,0.55,302.934px,-562.028px);-webkit-transform:matrix(0.55,-0,-0,0.55,302.934,-562.028);-o-transform:matrix(0.55,-0,-0,0.55,302.934,-562.028);}.ta6{transform:matrix(0.55,-0,-0,0.55,295.96,-568.622);-ms-transform:matrix(0.55,-0,-0,0.55,295.96,-568.622);-moz-transform:matrix(0.55,-0,-0,0.55,295.96px,-568.622px);-webkit-transform:matrix(0.55,-0,-0,0.55,295.96,-568.622);-o-transform:matrix(0.55,-0,-0,0.55,295.96,-568.622);}.ta7{transform:matrix(0.55,-0,-0,0.55,298.565,-575.216);-ms-transform:matrix(0.55,-0,-0,0.55,298.565,-575.216);-moz-transform:matrix(0.55,-0,-0,0.55,298.565px,-575.216px);-webkit-transform:matrix(0.55,-0,-0,0.55,298.565,-575.216);-o-transform:matrix(0.55,-0,-0,0.55,298.565,-575.216);}.ta8{transform:matrix(0.55,-0,-0,0.55,301.13,-581.809);-ms-transform:matrix(0.55,-0,-0,0.55,301.13,-581.809);-moz-transform:matrix(0.55,-0,-0,0.55,301.13px,-581.809px);-webkit-transform:matrix(0.55,-0,-0,0.55,301.13,-581.809);-o-transform:matrix(0.55,-0,-0,0.55,301.13,-581.809);}.ta9{transform:matrix(0.55,-0,-0,0.55,301.078,-588.403);-ms-transform:matrix(0.55,-0,-0,0.55,301.078,-588.403);-moz-transform:matrix(0.55,-0,-0,0.55,301.078px,-588.403px);-webkit-transform:matrix(0.55,-0,-0,0.55,301.078,-588.403);-o-transform:matrix(0.55,-0,-0,0.55,301.078,-588.403);}.taa{transform:matrix(0.55,-0,-0,0.55,291.483,-594.997);-ms-transform:matrix(0.55,-0,-0,0.55,291.483,-594.997);-moz-transform:matrix(0.55,-0,-0,0.55,291.483px,-594.997px);-webkit-transform:matrix(0.55,-0,-0,0.55,291.483,-594.997);-o-transform:matrix(0.55,-0,-0,0.55,291.483,-594.997);}.tab{transform:matrix(0.55,-0,-0,0.55,296.678,-601.59);-ms-transform:matrix(0.55,-0,-0,0.55,296.678,-601.59);-moz-transform:matrix(0.55,-0,-0,0.55,296.678px,-601.59px);-webkit-transform:matrix(0.55,-0,-0,0.55,296.678,-601.59);-o-transform:matrix(0.55,-0,-0,0.55,296.678,-601.59);}.tac{transform:matrix(0.55,-0,-0,0.55,295.358,-608.184);-ms-transform:matrix(0.55,-0,-0,0.55,295.358,-608.184);-moz-transform:matrix(0.55,-0,-0,0.55,295.358px,-608.184px);-webkit-transform:matrix(0.55,-0,-0,0.55,295.358,-608.184);-o-transform:matrix(0.55,-0,-0,0.55,295.358,-608.184);}.tad{transform:matrix(0.55,-0,-0,0.55,297.338,-614.778);-ms-transform:matrix(0.55,-0,-0,0.55,297.338,-614.778);-moz-transform:matrix(0.55,-0,-0,0.55,297.338px,-614.778px);-webkit-transform:matrix(0.55,-0,-0,0.55,297.338,-614.778);-o-transform:matrix(0.55,-0,-0,0.55,297.338,-614.778);}.tae{transform:matrix(0.55,-0,-0,0.55,294.22,-621.371);-ms-transform:matrix(0.55,-0,-0,0.55,294.22,-621.371);-moz-transform:matrix(0.55,-0,-0,0.55,294.22px,-621.371px);-webkit-transform:matrix(0.55,-0,-0,0.55,294.22,-621.371);-o-transform:matrix(0.55,-0,-0,0.55,294.22,-621.371);}.taf{transform:matrix(0.55,-0,-0,0.55,303.749,-627.965);-ms-transform:matrix(0.55,-0,-0,0.55,303.749,-627.965);-moz-transform:matrix(0.55,-0,-0,0.55,303.749px,-627.965px);-webkit-transform:matrix(0.55,-0,-0,0.55,303.749,-627.965);-o-transform:matrix(0.55,-0,-0,0.55,303.749,-627.965);}.tb0{transform:matrix(0.55,-0,-0,0.55,302.728,-634.559);-ms-transform:matrix(0.55,-0,-0,0.55,302.728,-634.559);-moz-transform:matrix(0.55,-0,-0,0.55,302.728px,-634.559px);-webkit-transform:matrix(0.55,-0,-0,0.55,302.728,-634.559);-o-transform:matrix(0.55,-0,-0,0.55,302.728,-634.559);}.tb1{transform:matrix(0.55,-0,-0,0.55,302.573,-641.152);-ms-transform:matrix(0.55,-0,-0,0.55,302.573,-641.152);-moz-transform:matrix(0.55,-0,-0,0.55,302.573px,-641.152px);-webkit-transform:matrix(0.55,-0,-0,0.55,302.573,-641.152);-o-transform:matrix(0.55,-0,-0,0.55,302.573,-641.152);}.tb2{transform:matrix(0.55,-0,-0,0.55,297.495,-647.746);-ms-transform:matrix(0.55,-0,-0,0.55,297.495,-647.746);-moz-transform:matrix(0.55,-0,-0,0.55,297.495px,-647.746px);-webkit-transform:matrix(0.55,-0,-0,0.55,297.495,-647.746);-o-transform:matrix(0.55,-0,-0,0.55,297.495,-647.746);}.tb3{transform:matrix(0.55,-0,-0,0.55,296.776,-654.34);-ms-transform:matrix(0.55,-0,-0,0.55,296.776,-654.34);-moz-transform:matrix(0.55,-0,-0,0.55,296.776px,-654.34px);-webkit-transform:matrix(0.55,-0,-0,0.55,296.776,-654.34);-o-transform:matrix(0.55,-0,-0,0.55,296.776,-654.34);}.tb4{transform:matrix(0.55,-0,-0,0.55,302.4,-660.933);-ms-transform:matrix(0.55,-0,-0,0.55,302.4,-660.933);-moz-transform:matrix(0.55,-0,-0,0.55,302.4px,-660.933px);-webkit-transform:matrix(0.55,-0,-0,0.55,302.4,-660.933);-o-transform:matrix(0.55,-0,-0,0.55,302.4,-660.933);}.tb5{transform:matrix(0.55,-0,-0,0.55,296.732,-667.527);-ms-transform:matrix(0.55,-0,-0,0.55,296.732,-667.527);-moz-transform:matrix(0.55,-0,-0,0.55,296.732px,-667.527px);-webkit-transform:matrix(0.55,-0,-0,0.55,296.732,-667.527);-o-transform:matrix(0.55,-0,-0,0.55,296.732,-667.527);}.tb6{transform:matrix(0.55,-0,-0,0.55,295.228,-674.121);-ms-transform:matrix(0.55,-0,-0,0.55,295.228,-674.121);-moz-transform:matrix(0.55,-0,-0,0.55,295.228px,-674.121px);-webkit-transform:matrix(0.55,-0,-0,0.55,295.228,-674.121);-o-transform:matrix(0.55,-0,-0,0.55,295.228,-674.121);}.tb7{transform:matrix(0.55,-0,-0,0.55,303.098,-680.714);-ms-transform:matrix(0.55,-0,-0,0.55,303.098,-680.714);-moz-transform:matrix(0.55,-0,-0,0.55,303.098px,-680.714px);-webkit-transform:matrix(0.55,-0,-0,0.55,303.098,-680.714);-o-transform:matrix(0.55,-0,-0,0.55,303.098,-680.714);}.tb8{transform:matrix(0.55,-0,-0,0.55,301.053,-687.308);-ms-transform:matrix(0.55,-0,-0,0.55,301.053,-687.308);-moz-transform:matrix(0.55,-0,-0,0.55,301.053px,-687.308px);-webkit-transform:matrix(0.55,-0,-0,0.55,301.053,-687.308);-o-transform:matrix(0.55,-0,-0,0.55,301.053,-687.308);}.tb9{transform:matrix(0.55,-0,-0,0.55,303.185,-693.902);-ms-transform:matrix(0.55,-0,-0,0.55,303.185,-693.902);-moz-transform:matrix(0.55,-0,-0,0.55,303.185px,-693.902px);-webkit-transform:matrix(0.55,-0,-0,0.55,303.185,-693.902);-o-transform:matrix(0.55,-0,-0,0.55,303.185,-693.902);}.tba{transform:matrix(0.55,-0,-0,0.55,299.754,-700.495);-ms-transform:matrix(0.55,-0,-0,0.55,299.754,-700.495);-moz-transform:matrix(0.55,-0,-0,0.55,299.754px,-700.495px);-webkit-transform:matrix(0.55,-0,-0,0.55,299.754,-700.495);-o-transform:matrix(0.55,-0,-0,0.55,299.754,-700.495);}.tbb{transform:matrix(0.55,-0,-0,0.55,296.083,-707.089);-ms-transform:matrix(0.55,-0,-0,0.55,296.083,-707.089);-moz-transform:matrix(0.55,-0,-0,0.55,296.083px,-707.089px);-webkit-transform:matrix(0.55,-0,-0,0.55,296.083,-707.089);-o-transform:matrix(0.55,-0,-0,0.55,296.083,-707.089);}.tbc{transform:matrix(0.55,-0,-0,0.55,295.028,-713.682);-ms-transform:matrix(0.55,-0,-0,0.55,295.028,-713.682);-moz-transform:matrix(0.55,-0,-0,0.55,295.028px,-713.682px);-webkit-transform:matrix(0.55,-0,-0,0.55,295.028,-713.682);-o-transform:matrix(0.55,-0,-0,0.55,295.028,-713.682);}.tbd{transform:matrix(0.55,-0,-0,0.55,411.5,-520.826);-ms-transform:matrix(0.55,-0,-0,0.55,411.5,-520.826);-moz-transform:matrix(0.55,-0,-0,0.55,411.5px,-520.826px);-webkit-transform:matrix(0.55,-0,-0,0.55,411.5,-520.826);-o-transform:matrix(0.55,-0,-0,0.55,411.5,-520.826);}.tbe{transform:matrix(0.55,-0,-0,0.55,459.26,-520.826);-ms-transform:matrix(0.55,-0,-0,0.55,459.26,-520.826);-moz-transform:matrix(0.55,-0,-0,0.55,459.26px,-520.826px);-webkit-transform:matrix(0.55,-0,-0,0.55,459.26,-520.826);-o-transform:matrix(0.55,-0,-0,0.55,459.26,-520.826);}.tbf{transform:matrix(1,-0,-0,1,317.014,-494.894);-ms-transform:matrix(1,-0,-0,1,317.014,-494.894);-moz-transform:matrix(1,-0,-0,1,317.014px,-494.894px);-webkit-transform:matrix(1,-0,-0,1,317.014,-494.894);-o-transform:matrix(1,-0,-0,1,317.014,-494.894);}.tc0{transform:matrix(1,-0,-0,1,138.092,-452.768);-ms-transform:matrix(1,-0,-0,1,138.092,-452.768);-moz-transform:matrix(1,-0,-0,1,138.092px,-452.768px);-webkit-transform:matrix(1,-0,-0,1,138.092,-452.768);-o-transform:matrix(1,-0,-0,1,138.092,-452.768);}.tc1{transform:matrix(0.97,-0,-0,0.97,138.092,-452.768);-ms-transform:matrix(0.97,-0,-0,0.97,138.092,-452.768);-moz-transform:matrix(0.97,-0,-0,0.97,138.092px,-452.768px);-webkit-transform:matrix(0.97,-0,-0,0.97,138.092,-452.768);-o-transform:matrix(0.97,-0,-0,0.97,138.092,-452.768);}.tc2{transform:matrix(0.97,-0,-0,0.97,36.4909,30.3022);-ms-transform:matrix(0.97,-0,-0,0.97,36.4909,30.3022);-moz-transform:matrix(0.97,-0,-0,0.97,36.4909px,30.3022px);-webkit-transform:matrix(0.97,-0,-0,0.97,36.4909,30.3022);-o-transform:matrix(0.97,-0,-0,0.97,36.4909,30.3022);}.tc3{transform:matrix(7.6378e-05,-0,-0,-7.6378e-05,55.8133,-719.547);-ms-transform:matrix(7.6378e-05,-0,-0,-7.6378e-05,55.8133,-719.547);-moz-transform:matrix(7.6378e-05,-0,-0,-7.6378e-05,55.8133px,-719.547px);-webkit-transform:matrix(7.6378e-05,-0,-0,-7.6378e-05,55.8133,-719.547);-o-transform:matrix(7.6378e-05,-0,-0,-7.6378e-05,55.8133,-719.547);}.tc4{transform:matrix(10.9416,-0,-0,21.4176,80.0245,-545.18);-ms-transform:matrix(10.9416,-0,-0,21.4176,80.0245,-545.18);-moz-transform:matrix(10.9416,-0,-0,21.4176,80.0245px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,21.4176,80.0245,-545.18);-o-transform:matrix(10.9416,-0,-0,21.4176,80.0245,-545.18);}.tc5{transform:matrix(10.9416,-0,-0,25.608,97.7173,-545.18);-ms-transform:matrix(10.9416,-0,-0,25.608,97.7173,-545.18);-moz-transform:matrix(10.9416,-0,-0,25.608,97.7173px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,25.608,97.7173,-545.18);-o-transform:matrix(10.9416,-0,-0,25.608,97.7173,-545.18);}.tc6{transform:matrix(10.9416,-0,-0,14.6664,115.643,-545.179);-ms-transform:matrix(10.9416,-0,-0,14.6664,115.643,-545.179);-moz-transform:matrix(10.9416,-0,-0,14.6664,115.643px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,14.6664,115.643,-545.179);-o-transform:matrix(10.9416,-0,-0,14.6664,115.643,-545.179);}.tc7{transform:matrix(10.9416,-0,-0,13.0368,133.336,-545.179);-ms-transform:matrix(10.9416,-0,-0,13.0368,133.336,-545.179);-moz-transform:matrix(10.9416,-0,-0,13.0368,133.336px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,13.0368,133.336,-545.179);-o-transform:matrix(10.9416,-0,-0,13.0368,133.336,-545.179);}.tc8{transform:matrix(10.9416,-0,-0,21.4176,151.261,-545.18);-ms-transform:matrix(10.9416,-0,-0,21.4176,151.261,-545.18);-moz-transform:matrix(10.9416,-0,-0,21.4176,151.261px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,21.4176,151.261,-545.18);-o-transform:matrix(10.9416,-0,-0,21.4176,151.261,-545.18);}.tc9{transform:matrix(10.9416,-0,-0,34.4544,168.954,-545.18);-ms-transform:matrix(10.9416,-0,-0,34.4544,168.954,-545.18);-moz-transform:matrix(10.9416,-0,-0,34.4544,168.954px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,34.4544,168.954,-545.18);-o-transform:matrix(10.9416,-0,-0,34.4544,168.954,-545.18);}.tca{transform:matrix(10.9416,-0,-0,26.772,186.88,-545.18);-ms-transform:matrix(10.9416,-0,-0,26.772,186.88,-545.18);-moz-transform:matrix(10.9416,-0,-0,26.772,186.88px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,26.772,186.88,-545.18);-o-transform:matrix(10.9416,-0,-0,26.772,186.88,-545.18);}.tcb{transform:matrix(10.9416,-0,-0,173.436,204.572,-545.179);-ms-transform:matrix(10.9416,-0,-0,173.436,204.572,-545.179);-moz-transform:matrix(10.9416,-0,-0,173.436,204.572px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,173.436,204.572,-545.179);-o-transform:matrix(10.9416,-0,-0,173.436,204.572,-545.179);}.tcc{transform:matrix(10.9416,-0,-0,63.5544,222.498,-545.18);-ms-transform:matrix(10.9416,-0,-0,63.5544,222.498,-545.18);-moz-transform:matrix(10.9416,-0,-0,63.5544,222.498px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,63.5544,222.498,-545.18);-o-transform:matrix(10.9416,-0,-0,63.5544,222.498,-545.18);}.tcd{transform:matrix(10.9416,-0,-0,171.574,240.191,-545.18);-ms-transform:matrix(10.9416,-0,-0,171.574,240.191,-545.18);-moz-transform:matrix(10.9416,-0,-0,171.574,240.191px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,171.574,240.191,-545.18);-o-transform:matrix(10.9416,-0,-0,171.574,240.191,-545.18);}.tce{transform:matrix(10.9416,-0,-0,24.9096,258.116,-545.18);-ms-transform:matrix(10.9416,-0,-0,24.9096,258.116,-545.18);-moz-transform:matrix(10.9416,-0,-0,24.9096,258.116px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,24.9096,258.116,-545.18);-o-transform:matrix(10.9416,-0,-0,24.9096,258.116,-545.18);}.tcf{transform:matrix(10.9416,-0,-0,13.2696,275.809,-545.18);-ms-transform:matrix(10.9416,-0,-0,13.2696,275.809,-545.18);-moz-transform:matrix(10.9416,-0,-0,13.2696,275.809px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,13.2696,275.809,-545.18);-o-transform:matrix(10.9416,-0,-0,13.2696,275.809,-545.18);}.td0{transform:matrix(10.9416,-0,-0,17.6928,293.735,-545.18);-ms-transform:matrix(10.9416,-0,-0,17.6928,293.735,-545.18);-moz-transform:matrix(10.9416,-0,-0,17.6928,293.735px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,17.6928,293.735,-545.18);-o-transform:matrix(10.9416,-0,-0,17.6928,293.735,-545.18);}.td1{transform:matrix(10.9416,-0,-0,22.116,311.428,-545.18);-ms-transform:matrix(10.9416,-0,-0,22.116,311.428,-545.18);-moz-transform:matrix(10.9416,-0,-0,22.116,311.428px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,22.116,311.428,-545.18);-o-transform:matrix(10.9416,-0,-0,22.116,311.428,-545.18);}.td2{transform:matrix(10.9416,-0,-0,45.8616,329.353,-545.179);-ms-transform:matrix(10.9416,-0,-0,45.8616,329.353,-545.179);-moz-transform:matrix(10.9416,-0,-0,45.8616,329.353px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,45.8616,329.353,-545.179);-o-transform:matrix(10.9416,-0,-0,45.8616,329.353,-545.179);}.td3{transform:matrix(10.9416,-0,-0,13.968,347.046,-545.18);-ms-transform:matrix(10.9416,-0,-0,13.968,347.046,-545.18);-moz-transform:matrix(10.9416,-0,-0,13.968,347.046px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,13.968,347.046,-545.18);-o-transform:matrix(10.9416,-0,-0,13.968,347.046,-545.18);}.td4{transform:matrix(10.9416,-0,-0,13.2696,364.972,-545.18);-ms-transform:matrix(10.9416,-0,-0,13.2696,364.972,-545.18);-moz-transform:matrix(10.9416,-0,-0,13.2696,364.972px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,13.2696,364.972,-545.18);-o-transform:matrix(10.9416,-0,-0,13.2696,364.972,-545.18);}.td5{transform:matrix(10.9416,-0,-0,39.1104,382.664,-545.18);-ms-transform:matrix(10.9416,-0,-0,39.1104,382.664,-545.18);-moz-transform:matrix(10.9416,-0,-0,39.1104,382.664px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,39.1104,382.664,-545.18);-o-transform:matrix(10.9416,-0,-0,39.1104,382.664,-545.18);}.td6{transform:matrix(10.9416,-0,-0,45.6288,400.59,-545.18);-ms-transform:matrix(10.9416,-0,-0,45.6288,400.59,-545.18);-moz-transform:matrix(10.9416,-0,-0,45.6288,400.59px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,45.6288,400.59,-545.18);-o-transform:matrix(10.9416,-0,-0,45.6288,400.59,-545.18);}.td7{transform:matrix(10.9416,-0,-0,53.544,418.283,-545.18);-ms-transform:matrix(10.9416,-0,-0,53.544,418.283,-545.18);-moz-transform:matrix(10.9416,-0,-0,53.544,418.283px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,53.544,418.283,-545.18);-o-transform:matrix(10.9416,-0,-0,53.544,418.283,-545.18);}.td8{transform:matrix(10.9416,-0,-0,34.4544,436.208,-545.18);-ms-transform:matrix(10.9416,-0,-0,34.4544,436.208,-545.18);-moz-transform:matrix(10.9416,-0,-0,34.4544,436.208px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,34.4544,436.208,-545.18);-o-transform:matrix(10.9416,-0,-0,34.4544,436.208,-545.18);}.td9{transform:matrix(10.9416,-0,-0,23.5128,453.901,-545.18);-ms-transform:matrix(10.9416,-0,-0,23.5128,453.901,-545.18);-moz-transform:matrix(10.9416,-0,-0,23.5128,453.901px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,23.5128,453.901,-545.18);-o-transform:matrix(10.9416,-0,-0,23.5128,453.901,-545.18);}.tda{transform:matrix(10.9416,-0,-0,16.7616,471.827,-545.179);-ms-transform:matrix(10.9416,-0,-0,16.7616,471.827,-545.179);-moz-transform:matrix(10.9416,-0,-0,16.7616,471.827px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,16.7616,471.827,-545.179);-o-transform:matrix(10.9416,-0,-0,16.7616,471.827,-545.179);}.tdb{transform:matrix(10.9416,-0,-0,14.2008,489.752,-545.18);-ms-transform:matrix(10.9416,-0,-0,14.2008,489.752,-545.18);-moz-transform:matrix(10.9416,-0,-0,14.2008,489.752px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,14.2008,489.752,-545.18);-o-transform:matrix(10.9416,-0,-0,14.2008,489.752,-545.18);}.tdc{transform:matrix(10.9416,-0,-0,14.8992,507.445,-545.18);-ms-transform:matrix(10.9416,-0,-0,14.8992,507.445,-545.18);-moz-transform:matrix(10.9416,-0,-0,14.8992,507.445px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,14.8992,507.445,-545.18);-o-transform:matrix(10.9416,-0,-0,14.8992,507.445,-545.18);}.tdd{transform:matrix(10.9416,-0,-0,19.0896,525.371,-545.18);-ms-transform:matrix(10.9416,-0,-0,19.0896,525.371,-545.18);-moz-transform:matrix(10.9416,-0,-0,19.0896,525.371px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,19.0896,525.371,-545.18);-o-transform:matrix(10.9416,-0,-0,19.0896,525.371,-545.18);}.tde{transform:matrix(10.9416,-0,-0,19.0896,83.9821,-545.18);-ms-transform:matrix(10.9416,-0,-0,19.0896,83.9821,-545.18);-moz-transform:matrix(10.9416,-0,-0,19.0896,83.9821px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,19.0896,83.9821,-545.18);-o-transform:matrix(10.9416,-0,-0,19.0896,83.9821,-545.18);}.tdf{transform:matrix(10.9416,-0,-0,18.8568,101.675,-545.179);-ms-transform:matrix(10.9416,-0,-0,18.8568,101.675,-545.179);-moz-transform:matrix(10.9416,-0,-0,18.8568,101.675px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,18.8568,101.675,-545.179);-o-transform:matrix(10.9416,-0,-0,18.8568,101.675,-545.179);}.te0{transform:matrix(10.9416,-0,-0,24.9096,119.6,-545.18);-ms-transform:matrix(10.9416,-0,-0,24.9096,119.6,-545.18);-moz-transform:matrix(10.9416,-0,-0,24.9096,119.6px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,24.9096,119.6,-545.18);-o-transform:matrix(10.9416,-0,-0,24.9096,119.6,-545.18);}.te1{transform:matrix(10.9416,-0,-0,35.6184,137.293,-545.179);-ms-transform:matrix(10.9416,-0,-0,35.6184,137.293,-545.179);-moz-transform:matrix(10.9416,-0,-0,35.6184,137.293px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,35.6184,137.293,-545.179);-o-transform:matrix(10.9416,-0,-0,35.6184,137.293,-545.179);}.te2{transform:matrix(10.9416,-0,-0,64.02,155.219,-545.179);-ms-transform:matrix(10.9416,-0,-0,64.02,155.219,-545.179);-moz-transform:matrix(10.9416,-0,-0,64.02,155.219px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,64.02,155.219,-545.179);-o-transform:matrix(10.9416,-0,-0,64.02,155.219,-545.179);}.te3{transform:matrix(10.9416,-0,-0,28.6344,172.912,-545.18);-ms-transform:matrix(10.9416,-0,-0,28.6344,172.912,-545.18);-moz-transform:matrix(10.9416,-0,-0,28.6344,172.912px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,28.6344,172.912,-545.18);-o-transform:matrix(10.9416,-0,-0,28.6344,172.912,-545.18);}.te4{transform:matrix(10.9416,-0,-0,41.904,190.837,-545.18);-ms-transform:matrix(10.9416,-0,-0,41.904,190.837,-545.18);-moz-transform:matrix(10.9416,-0,-0,41.904,190.837px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,41.904,190.837,-545.18);-o-transform:matrix(10.9416,-0,-0,41.904,190.837,-545.18);}.te5{transform:matrix(10.9416,-0,-0,92.4216,208.53,-545.179);-ms-transform:matrix(10.9416,-0,-0,92.4216,208.53,-545.179);-moz-transform:matrix(10.9416,-0,-0,92.4216,208.53px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,92.4216,208.53,-545.179);-o-transform:matrix(10.9416,-0,-0,92.4216,208.53,-545.179);}.te6{transform:matrix(10.9416,-0,-0,69.1416,226.456,-545.179);-ms-transform:matrix(10.9416,-0,-0,69.1416,226.456,-545.179);-moz-transform:matrix(10.9416,-0,-0,69.1416,226.456px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,69.1416,226.456,-545.179);-o-transform:matrix(10.9416,-0,-0,69.1416,226.456,-545.179);}.te7{transform:matrix(10.9416,-0,-0,51.216,244.148,-545.18);-ms-transform:matrix(10.9416,-0,-0,51.216,244.148,-545.18);-moz-transform:matrix(10.9416,-0,-0,51.216,244.148px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,51.216,244.148,-545.18);-o-transform:matrix(10.9416,-0,-0,51.216,244.148,-545.18);}.te8{transform:matrix(10.9416,-0,-0,35.6184,262.074,-545.179);-ms-transform:matrix(10.9416,-0,-0,35.6184,262.074,-545.179);-moz-transform:matrix(10.9416,-0,-0,35.6184,262.074px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,35.6184,262.074,-545.179);-o-transform:matrix(10.9416,-0,-0,35.6184,262.074,-545.179);}.te9{transform:matrix(10.9416,-0,-0,55.872,279.767,-545.18);-ms-transform:matrix(10.9416,-0,-0,55.872,279.767,-545.18);-moz-transform:matrix(10.9416,-0,-0,55.872,279.767px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,55.872,279.767,-545.18);-o-transform:matrix(10.9416,-0,-0,55.872,279.767,-545.18);}.tea{transform:matrix(10.9416,-0,-0,30.7296,297.692,-545.18);-ms-transform:matrix(10.9416,-0,-0,30.7296,297.692,-545.18);-moz-transform:matrix(10.9416,-0,-0,30.7296,297.692px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,30.7296,297.692,-545.18);-o-transform:matrix(10.9416,-0,-0,30.7296,297.692,-545.18);}.teb{transform:matrix(10.9416,-0,-0,22.5816,315.385,-545.179);-ms-transform:matrix(10.9416,-0,-0,22.5816,315.385,-545.179);-moz-transform:matrix(10.9416,-0,-0,22.5816,315.385px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,22.5816,315.385,-545.179);-o-transform:matrix(10.9416,-0,-0,22.5816,315.385,-545.179);}.tec{transform:matrix(10.9416,-0,-0,24.9096,333.311,-545.18);-ms-transform:matrix(10.9416,-0,-0,24.9096,333.311,-545.18);-moz-transform:matrix(10.9416,-0,-0,24.9096,333.311px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,24.9096,333.311,-545.18);-o-transform:matrix(10.9416,-0,-0,24.9096,333.311,-545.18);}.ted{transform:matrix(10.9416,-0,-0,22.3488,351.004,-545.18);-ms-transform:matrix(10.9416,-0,-0,22.3488,351.004,-545.18);-moz-transform:matrix(10.9416,-0,-0,22.3488,351.004px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,22.3488,351.004,-545.18);-o-transform:matrix(10.9416,-0,-0,22.3488,351.004,-545.18);}.tee{transform:matrix(10.9416,-0,-0,23.5128,368.929,-545.18);-ms-transform:matrix(10.9416,-0,-0,23.5128,368.929,-545.18);-moz-transform:matrix(10.9416,-0,-0,23.5128,368.929px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,23.5128,368.929,-545.18);-o-transform:matrix(10.9416,-0,-0,23.5128,368.929,-545.18);}.tef{transform:matrix(10.9416,-0,-0,26.3064,386.622,-545.179);-ms-transform:matrix(10.9416,-0,-0,26.3064,386.622,-545.179);-moz-transform:matrix(10.9416,-0,-0,26.3064,386.622px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,26.3064,386.622,-545.179);-o-transform:matrix(10.9416,-0,-0,26.3064,386.622,-545.179);}.tf0{transform:matrix(10.9416,-0,-0,20.2536,404.548,-545.18);-ms-transform:matrix(10.9416,-0,-0,20.2536,404.548,-545.18);-moz-transform:matrix(10.9416,-0,-0,20.2536,404.548px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,20.2536,404.548,-545.18);-o-transform:matrix(10.9416,-0,-0,20.2536,404.548,-545.18);}.tf1{transform:matrix(10.9416,-0,-0,28.6344,422.24,-545.18);-ms-transform:matrix(10.9416,-0,-0,28.6344,422.24,-545.18);-moz-transform:matrix(10.9416,-0,-0,28.6344,422.24px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,28.6344,422.24,-545.18);-o-transform:matrix(10.9416,-0,-0,28.6344,422.24,-545.18);}.tf2{transform:matrix(10.9416,-0,-0,43.7664,440.166,-545.179);-ms-transform:matrix(10.9416,-0,-0,43.7664,440.166,-545.179);-moz-transform:matrix(10.9416,-0,-0,43.7664,440.166px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,43.7664,440.166,-545.179);-o-transform:matrix(10.9416,-0,-0,43.7664,440.166,-545.179);}.tf3{transform:matrix(10.9416,-0,-0,20.2536,457.859,-545.18);-ms-transform:matrix(10.9416,-0,-0,20.2536,457.859,-545.18);-moz-transform:matrix(10.9416,-0,-0,20.2536,457.859px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,20.2536,457.859,-545.18);-o-transform:matrix(10.9416,-0,-0,20.2536,457.859,-545.18);}.tf4{transform:matrix(10.9416,-0,-0,28.8672,475.784,-545.18);-ms-transform:matrix(10.9416,-0,-0,28.8672,475.784,-545.18);-moz-transform:matrix(10.9416,-0,-0,28.8672,475.784px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,28.8672,475.784,-545.18);-o-transform:matrix(10.9416,-0,-0,28.8672,475.784,-545.18);}.tf5{transform:matrix(10.9416,-0,-0,14.6664,493.71,-545.179);-ms-transform:matrix(10.9416,-0,-0,14.6664,493.71,-545.179);-moz-transform:matrix(10.9416,-0,-0,14.6664,493.71px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,14.6664,493.71,-545.179);-o-transform:matrix(10.9416,-0,-0,14.6664,493.71,-545.179);}.tf6{transform:matrix(10.9416,-0,-0,23.9784,511.403,-545.179);-ms-transform:matrix(10.9416,-0,-0,23.9784,511.403,-545.179);-moz-transform:matrix(10.9416,-0,-0,23.9784,511.403px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,23.9784,511.403,-545.179);-o-transform:matrix(10.9416,-0,-0,23.9784,511.403,-545.179);}.tf7{transform:matrix(10.9416,-0,-0,15.8304,529.328,-545.18);-ms-transform:matrix(10.9416,-0,-0,15.8304,529.328,-545.18);-moz-transform:matrix(10.9416,-0,-0,15.8304,529.328px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,15.8304,529.328,-545.18);-o-transform:matrix(10.9416,-0,-0,15.8304,529.328,-545.18);}.tf8{transform:matrix(10.9416,-0,-0,26.0736,87.9397,-545.18);-ms-transform:matrix(10.9416,-0,-0,26.0736,87.9397,-545.18);-moz-transform:matrix(10.9416,-0,-0,26.0736,87.9397px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,26.0736,87.9397,-545.18);-o-transform:matrix(10.9416,-0,-0,26.0736,87.9397,-545.18);}.tf9{transform:matrix(10.9416,-0,-0,21.4176,105.632,-545.18);-ms-transform:matrix(10.9416,-0,-0,21.4176,105.632,-545.18);-moz-transform:matrix(10.9416,-0,-0,21.4176,105.632px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,21.4176,105.632,-545.18);-o-transform:matrix(10.9416,-0,-0,21.4176,105.632,-545.18);}.tfa{transform:matrix(10.9416,-0,-0,24.2112,123.558,-545.18);-ms-transform:matrix(10.9416,-0,-0,24.2112,123.558,-545.18);-moz-transform:matrix(10.9416,-0,-0,24.2112,123.558px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,24.2112,123.558,-545.18);-o-transform:matrix(10.9416,-0,-0,24.2112,123.558,-545.18);}.tfb{transform:matrix(10.9416,-0,-0,65.184,141.251,-545.18);-ms-transform:matrix(10.9416,-0,-0,65.184,141.251,-545.18);-moz-transform:matrix(10.9416,-0,-0,65.184,141.251px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,65.184,141.251,-545.18);-o-transform:matrix(10.9416,-0,-0,65.184,141.251,-545.18);}.tfc{transform:matrix(10.9416,-0,-0,46.7928,159.176,-545.18);-ms-transform:matrix(10.9416,-0,-0,46.7928,159.176,-545.18);-moz-transform:matrix(10.9416,-0,-0,46.7928,159.176px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,46.7928,159.176,-545.18);-o-transform:matrix(10.9416,-0,-0,46.7928,159.176,-545.18);}.tfd{transform:matrix(10.9416,-0,-0,40.2744,176.869,-545.18);-ms-transform:matrix(10.9416,-0,-0,40.2744,176.869,-545.18);-moz-transform:matrix(10.9416,-0,-0,40.2744,176.869px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,40.2744,176.869,-545.18);-o-transform:matrix(10.9416,-0,-0,40.2744,176.869,-545.18);}.tfe{transform:matrix(10.9416,-0,-0,38.1792,194.795,-545.18);-ms-transform:matrix(10.9416,-0,-0,38.1792,194.795,-545.18);-moz-transform:matrix(10.9416,-0,-0,38.1792,194.795px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,38.1792,194.795,-545.18);-o-transform:matrix(10.9416,-0,-0,38.1792,194.795,-545.18);}.tff{transform:matrix(10.9416,-0,-0,75.66,212.488,-545.179);-ms-transform:matrix(10.9416,-0,-0,75.66,212.488,-545.179);-moz-transform:matrix(10.9416,-0,-0,75.66,212.488px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,75.66,212.488,-545.179);-o-transform:matrix(10.9416,-0,-0,75.66,212.488,-545.179);}.t100{transform:matrix(10.9416,-0,-0,62.3904,230.413,-545.18);-ms-transform:matrix(10.9416,-0,-0,62.3904,230.413,-545.18);-moz-transform:matrix(10.9416,-0,-0,62.3904,230.413px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,62.3904,230.413,-545.18);-o-transform:matrix(10.9416,-0,-0,62.3904,230.413,-545.18);}.t101{transform:matrix(10.9416,-0,-0,39.3432,248.106,-545.179);-ms-transform:matrix(10.9416,-0,-0,39.3432,248.106,-545.179);-moz-transform:matrix(10.9416,-0,-0,39.3432,248.106px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,39.3432,248.106,-545.179);-o-transform:matrix(10.9416,-0,-0,39.3432,248.106,-545.179);}.t102{transform:matrix(10.9416,-0,-0,33.9888,266.032,-545.18);-ms-transform:matrix(10.9416,-0,-0,33.9888,266.032,-545.18);-moz-transform:matrix(10.9416,-0,-0,33.9888,266.032px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,33.9888,266.032,-545.18);-o-transform:matrix(10.9416,-0,-0,33.9888,266.032,-545.18);}.t103{transform:matrix(10.9416,-0,-0,71.7024,283.724,-545.18);-ms-transform:matrix(10.9416,-0,-0,71.7024,283.724,-545.18);-moz-transform:matrix(10.9416,-0,-0,71.7024,283.724px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,71.7024,283.724,-545.18);-o-transform:matrix(10.9416,-0,-0,71.7024,283.724,-545.18);}.t104{transform:matrix(10.9416,-0,-0,21.4176,301.65,-545.18);-ms-transform:matrix(10.9416,-0,-0,21.4176,301.65,-545.18);-moz-transform:matrix(10.9416,-0,-0,21.4176,301.65px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,21.4176,301.65,-545.18);-o-transform:matrix(10.9416,-0,-0,21.4176,301.65,-545.18);}.t105{transform:matrix(10.9416,-0,-0,21.4176,319.343,-545.18);-ms-transform:matrix(10.9416,-0,-0,21.4176,319.343,-545.18);-moz-transform:matrix(10.9416,-0,-0,21.4176,319.343px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,21.4176,319.343,-545.18);-o-transform:matrix(10.9416,-0,-0,21.4176,319.343,-545.18);}.t106{transform:matrix(10.9416,-0,-0,25.8408,337.268,-545.18);-ms-transform:matrix(10.9416,-0,-0,25.8408,337.268,-545.18);-moz-transform:matrix(10.9416,-0,-0,25.8408,337.268px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,25.8408,337.268,-545.18);-o-transform:matrix(10.9416,-0,-0,25.8408,337.268,-545.18);}.t107{transform:matrix(10.9416,-0,-0,15.8304,354.961,-545.18);-ms-transform:matrix(10.9416,-0,-0,15.8304,354.961,-545.18);-moz-transform:matrix(10.9416,-0,-0,15.8304,354.961px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,15.8304,354.961,-545.18);-o-transform:matrix(10.9416,-0,-0,15.8304,354.961,-545.18);}.t108{transform:matrix(10.9416,-0,-0,24.444,372.887,-545.18);-ms-transform:matrix(10.9416,-0,-0,24.444,372.887,-545.18);-moz-transform:matrix(10.9416,-0,-0,24.444,372.887px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,24.444,372.887,-545.18);-o-transform:matrix(10.9416,-0,-0,24.444,372.887,-545.18);}.t109{transform:matrix(10.9416,-0,-0,39.3432,390.58,-545.179);-ms-transform:matrix(10.9416,-0,-0,39.3432,390.58,-545.179);-moz-transform:matrix(10.9416,-0,-0,39.3432,390.58px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,39.3432,390.58,-545.179);-o-transform:matrix(10.9416,-0,-0,39.3432,390.58,-545.179);}.t10a{transform:matrix(10.9416,-0,-0,27.7032,408.505,-545.179);-ms-transform:matrix(10.9416,-0,-0,27.7032,408.505,-545.179);-moz-transform:matrix(10.9416,-0,-0,27.7032,408.505px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,27.7032,408.505,-545.179);-o-transform:matrix(10.9416,-0,-0,27.7032,408.505,-545.179);}.t10b{transform:matrix(10.9416,-0,-0,39.3432,426.198,-545.179);-ms-transform:matrix(10.9416,-0,-0,39.3432,426.198,-545.179);-moz-transform:matrix(10.9416,-0,-0,39.3432,426.198px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,39.3432,426.198,-545.179);-o-transform:matrix(10.9416,-0,-0,39.3432,426.198,-545.179);}.t10c{transform:matrix(10.9416,-0,-0,51.6816,444.124,-545.179);-ms-transform:matrix(10.9416,-0,-0,51.6816,444.124,-545.179);-moz-transform:matrix(10.9416,-0,-0,51.6816,444.124px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,51.6816,444.124,-545.179);-o-transform:matrix(10.9416,-0,-0,51.6816,444.124,-545.179);}.t10d{transform:matrix(10.9416,-0,-0,18.624,461.816,-545.18);-ms-transform:matrix(10.9416,-0,-0,18.624,461.816,-545.18);-moz-transform:matrix(10.9416,-0,-0,18.624,461.816px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,18.624,461.816,-545.18);-o-transform:matrix(10.9416,-0,-0,18.624,461.816,-545.18);}.t10e{transform:matrix(10.9416,-0,-0,28.8672,479.742,-545.18);-ms-transform:matrix(10.9416,-0,-0,28.8672,479.742,-545.18);-moz-transform:matrix(10.9416,-0,-0,28.8672,479.742px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,28.8672,479.742,-545.18);-o-transform:matrix(10.9416,-0,-0,28.8672,479.742,-545.18);}.t10f{transform:matrix(10.9416,-0,-0,15.3648,497.668,-545.179);-ms-transform:matrix(10.9416,-0,-0,15.3648,497.668,-545.179);-moz-transform:matrix(10.9416,-0,-0,15.3648,497.668px,-545.179px);-webkit-transform:matrix(10.9416,-0,-0,15.3648,497.668,-545.179);-o-transform:matrix(10.9416,-0,-0,15.3648,497.668,-545.179);}.t110{transform:matrix(10.9416,-0,-0,17.9256,515.36,-545.18);-ms-transform:matrix(10.9416,-0,-0,17.9256,515.36,-545.18);-moz-transform:matrix(10.9416,-0,-0,17.9256,515.36px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,17.9256,515.36,-545.18);-o-transform:matrix(10.9416,-0,-0,17.9256,515.36,-545.18);}.t111{transform:matrix(10.9416,-0,-0,18.3912,533.286,-545.18);-ms-transform:matrix(10.9416,-0,-0,18.3912,533.286,-545.18);-moz-transform:matrix(10.9416,-0,-0,18.3912,533.286px,-545.18px);-webkit-transform:matrix(10.9416,-0,-0,18.3912,533.286,-545.18);-o-transform:matrix(10.9416,-0,-0,18.3912,533.286,-545.18);}.t112{transform:matrix(0.97,-0,-0,0.97,66.5497,-556.239);-ms-transform:matrix(0.97,-0,-0,0.97,66.5497,-556.239);-moz-transform:matrix(0.97,-0,-0,0.97,66.5497px,-556.239px);-webkit-transform:matrix(0.97,-0,-0,0.97,66.5497,-556.239);-o-transform:matrix(0.97,-0,-0,0.97,66.5497,-556.239);}@font-face{font-family:f17;src:url(f17.ttf);}.f17{font-family:f17;}.t113{transform:matrix(0.97,-0,-0,0.97,66.5497,-588.901);-ms-transform:matrix(0.97,-0,-0,0.97,66.5497,-588.901);-moz-transform:matrix(0.97,-0,-0,0.97,66.5497px,-588.901px);-webkit-transform:matrix(0.97,-0,-0,0.97,66.5497,-588.901);-o-transform:matrix(0.97,-0,-0,0.97,66.5497,-588.901);}.t114{transform:matrix(0.97,-0,-0,0.97,61.6334,-621.562);-ms-transform:matrix(0.97,-0,-0,0.97,61.6334,-621.562);-moz-transform:matrix(0.97,-0,-0,0.97,61.6334px,-621.562px);-webkit-transform:matrix(0.97,-0,-0,0.97,61.6334,-621.562);-o-transform:matrix(0.97,-0,-0,0.97,61.6334,-621.562);}.t115{transform:matrix(0.97,-0,-0,0.97,61.6334,-654.224);-ms-transform:matrix(0.97,-0,-0,0.97,61.6334,-654.224);-moz-transform:matrix(0.97,-0,-0,0.97,61.6334px,-654.224px);-webkit-transform:matrix(0.97,-0,-0,0.97,61.6334,-654.224);-o-transform:matrix(0.97,-0,-0,0.97,61.6334,-654.224);}.t116{transform:matrix(0.97,-0,-0,0.97,61.6334,-686.885);-ms-transform:matrix(0.97,-0,-0,0.97,61.6334,-686.885);-moz-transform:matrix(0.97,-0,-0,0.97,61.6334px,-686.885px);-webkit-transform:matrix(0.97,-0,-0,0.97,61.6334,-686.885);-o-transform:matrix(0.97,-0,-0,0.97,61.6334,-686.885);}.t117{transform:matrix(0.97,-0,-0,0.97,61.6334,-719.547);-ms-transform:matrix(0.97,-0,-0,0.97,61.6334,-719.547);-moz-transform:matrix(0.97,-0,-0,0.97,61.6334px,-719.547px);-webkit-transform:matrix(0.97,-0,-0,0.97,61.6334,-719.547);-o-transform:matrix(0.97,-0,-0,0.97,61.6334,-719.547);}.t118{transform:matrix(0.97,-0,-0,0.97,488.109,-701.853);-ms-transform:matrix(0.97,-0,-0,0.97,488.109,-701.853);-moz-transform:matrix(0.97,-0,-0,0.97,488.109px,-701.853px);-webkit-transform:matrix(0.97,-0,-0,0.97,488.109,-701.853);-o-transform:matrix(0.97,-0,-0,0.97,488.109,-701.853);}.t119{transform:matrix(0.97,-0,-0,0.97,488.109,-684.366);-ms-transform:matrix(0.97,-0,-0,0.97,488.109,-684.366);-moz-transform:matrix(0.97,-0,-0,0.97,488.109px,-684.366px);-webkit-transform:matrix(0.97,-0,-0,0.97,488.109,-684.366);-o-transform:matrix(0.97,-0,-0,0.97,488.109,-684.366);}.t11a{transform:matrix(0.97,-0,-0,0.97,488.109,-666.878);-ms-transform:matrix(0.97,-0,-0,0.97,488.109,-666.878);-moz-transform:matrix(0.97,-0,-0,0.97,488.109px,-666.878px);-webkit-transform:matrix(0.97,-0,-0,0.97,488.109,-666.878);-o-transform:matrix(0.97,-0,-0,0.97,488.109,-666.878);}.t11b{transform:matrix(1,-0,-0,1,54,-441.481);-ms-transform:matrix(1,-0,-0,1,54,-441.481);-moz-transform:matrix(1,-0,-0,1,54px,-441.481px);-webkit-transform:matrix(1,-0,-0,1,54,-441.481);-o-transform:matrix(1,-0,-0,1,54,-441.481);}.w11{width:12.6407px;}.t11c{transform:matrix(1,-0,-0,1,65.4416,-709.639);-ms-transform:matrix(1,-0,-0,1,65.4416,-709.639);-moz-transform:matrix(1,-0,-0,1,65.4416px,-709.639px);-webkit-transform:matrix(1,-0,-0,1,65.4416,-709.639);-o-transform:matrix(1,-0,-0,1,65.4416,-709.639);}.w12{width:79.7113px;}.w13{width:25.626px;}.w14{width:31.8756px;}.w15{width:34.8703px;}.w16{width:41.7745px;}.w17{width:45.8631px;}.w18{width:77.7118px;}.w19{width:27.0696px;}.w1a{width:67.7681px;}.w1b{width:21.1428px;}.w1c{width:44.3657px;}.w1d{width:50.6512px;}.w1e{width:54.4709px;}.w1f{width:49.3421px;}.w20{width:64.7733px;}.w21{width:29.885px;}.w22{width:18.8384px;}.w23{width:35.8835px;}.w24{width:69.7496px;}.w25{width:72.7444px;}.w26{width:58.7837px;}.w27{width:39.8556px;}.t11d{transform:matrix(1,-0,-0,1,54,-439.322);-ms-transform:matrix(1,-0,-0,1,54,-439.322);-moz-transform:matrix(1,-0,-0,1,54px,-439.322px);-webkit-transform:matrix(1,-0,-0,1,54,-439.322);-o-transform:matrix(1,-0,-0,1,54,-439.322);}.t11e{transform:matrix(1,-0,-0,1,54,-505.759);-ms-transform:matrix(1,-0,-0,1,54,-505.759);-moz-transform:matrix(1,-0,-0,1,54px,-505.759px);-webkit-transform:matrix(1,-0,-0,1,54,-505.759);-o-transform:matrix(1,-0,-0,1,54,-505.759);}.t11f{transform:matrix(0.55,-0,-0,0.55,54,-505.759);-ms-transform:matrix(0.55,-0,-0,0.55,54,-505.759);-moz-transform:matrix(0.55,-0,-0,0.55,54px,-505.759px);-webkit-transform:matrix(0.55,-0,-0,0.55,54,-505.759);-o-transform:matrix(0.55,-0,-0,0.55,54,-505.759);}.t120{transform:matrix(0.55,-0,-0,0.55,23.6856,-323.518);-ms-transform:matrix(0.55,-0,-0,0.55,23.6856,-323.518);-moz-transform:matrix(0.55,-0,-0,0.55,23.6856px,-323.518px);-webkit-transform:matrix(0.55,-0,-0,0.55,23.6856,-323.518);-o-transform:matrix(0.55,-0,-0,0.55,23.6856,-323.518);}.t121{transform:matrix(4.33071e-05,-0,-0,-4.33071e-05,53.9136,-718.99);-ms-transform:matrix(4.33071e-05,-0,-0,-4.33071e-05,53.9136,-718.99);-moz-transform:matrix(4.33071e-05,-0,-0,-4.33071e-05,53.9136px,-718.99px);-webkit-transform:matrix(4.33071e-05,-0,-0,-4.33071e-05,53.9136,-718.99);-o-transform:matrix(4.33071e-05,-0,-0,-4.33071e-05,53.9136,-718.99);}.t122{transform:matrix(0.55,-0,-0,0.55,115.399,-537.839);-ms-transform:matrix(0.55,-0,-0,0.55,115.399,-537.839);-moz-transform:matrix(0.55,-0,-0,0.55,115.399px,-537.839px);-webkit-transform:matrix(0.55,-0,-0,0.55,115.399,-537.839);-o-transform:matrix(0.55,-0,-0,0.55,115.399,-537.839);}@font-face{font-family:f18;src:url(f18.ttf);}.f18{font-family:f18;}.t123{transform:matrix(0.55,-0,-0,0.55,148.039,-537.839);-ms-transform:matrix(0.55,-0,-0,0.55,148.039,-537.839);-moz-transform:matrix(0.55,-0,-0,0.55,148.039px,-537.839px);-webkit-transform:matrix(0.55,-0,-0,0.55,148.039,-537.839);-o-transform:matrix(0.55,-0,-0,0.55,148.039,-537.839);}.t124{transform:matrix(0.55,-0,-0,0.55,182.073,-537.839);-ms-transform:matrix(0.55,-0,-0,0.55,182.073,-537.839);-moz-transform:matrix(0.55,-0,-0,0.55,182.073px,-537.839px);-webkit-transform:matrix(0.55,-0,-0,0.55,182.073,-537.839);-o-transform:matrix(0.55,-0,-0,0.55,182.073,-537.839);}.t125{transform:matrix(0.55,-0,-0,0.55,216.107,-537.839);-ms-transform:matrix(0.55,-0,-0,0.55,216.107,-537.839);-moz-transform:matrix(0.55,-0,-0,0.55,216.107px,-537.839px);-webkit-transform:matrix(0.55,-0,-0,0.55,216.107,-537.839);-o-transform:matrix(0.55,-0,-0,0.55,216.107,-537.839);}.t126{transform:matrix(0.55,-0,-0,0.55,250.141,-537.839);-ms-transform:matrix(0.55,-0,-0,0.55,250.141,-537.839);-moz-transform:matrix(0.55,-0,-0,0.55,250.141px,-537.839px);-webkit-transform:matrix(0.55,-0,-0,0.55,250.141,-537.839);-o-transform:matrix(0.55,-0,-0,0.55,250.141,-537.839);}.t127{transform:matrix(0.55,-0,-0,0.55,282.781,-537.839);-ms-transform:matrix(0.55,-0,-0,0.55,282.781,-537.839);-moz-transform:matrix(0.55,-0,-0,0.55,282.781px,-537.839px);-webkit-transform:matrix(0.55,-0,-0,0.55,282.781,-537.839);-o-transform:matrix(0.55,-0,-0,0.55,282.781,-537.839);}.t128{transform:matrix(0.55,-0,-0,0.55,72.65,-548.853);-ms-transform:matrix(0.55,-0,-0,0.55,72.65,-548.853);-moz-transform:matrix(0.55,-0,-0,0.55,72.65px,-548.853px);-webkit-transform:matrix(0.55,-0,-0,0.55,72.65,-548.853);-o-transform:matrix(0.55,-0,-0,0.55,72.65,-548.853);}.t129{transform:matrix(0.55,-0,-0,0.55,70.9903,-555.4);-ms-transform:matrix(0.55,-0,-0,0.55,70.9903,-555.4);-moz-transform:matrix(0.55,-0,-0,0.55,70.9903px,-555.4px);-webkit-transform:matrix(0.55,-0,-0,0.55,70.9903,-555.4);-o-transform:matrix(0.55,-0,-0,0.55,70.9903,-555.4);}.t12a{transform:matrix(0.55,-0,-0,0.55,69.7077,-561.946);-ms-transform:matrix(0.55,-0,-0,0.55,69.7077,-561.946);-moz-transform:matrix(0.55,-0,-0,0.55,69.7077px,-561.946px);-webkit-transform:matrix(0.55,-0,-0,0.55,69.7077,-561.946);-o-transform:matrix(0.55,-0,-0,0.55,69.7077,-561.946);}.t12b{transform:matrix(0.55,-0,-0,0.55,62.7338,-568.493);-ms-transform:matrix(0.55,-0,-0,0.55,62.7338,-568.493);-moz-transform:matrix(0.55,-0,-0,0.55,62.7338px,-568.493px);-webkit-transform:matrix(0.55,-0,-0,0.55,62.7338,-568.493);-o-transform:matrix(0.55,-0,-0,0.55,62.7338,-568.493);}.t12c{transform:matrix(0.55,-0,-0,0.55,65.3388,-575.039);-ms-transform:matrix(0.55,-0,-0,0.55,65.3388,-575.039);-moz-transform:matrix(0.55,-0,-0,0.55,65.3388px,-575.039px);-webkit-transform:matrix(0.55,-0,-0,0.55,65.3388,-575.039);-o-transform:matrix(0.55,-0,-0,0.55,65.3388,-575.039);}.t12d{transform:matrix(0.55,-0,-0,0.55,67.904,-581.585);-ms-transform:matrix(0.55,-0,-0,0.55,67.904,-581.585);-moz-transform:matrix(0.55,-0,-0,0.55,67.904px,-581.585px);-webkit-transform:matrix(0.55,-0,-0,0.55,67.904,-581.585);-o-transform:matrix(0.55,-0,-0,0.55,67.904,-581.585);}.t12e{transform:matrix(0.55,-0,-0,0.55,67.8557,-588.132);-ms-transform:matrix(0.55,-0,-0,0.55,67.8557,-588.132);-moz-transform:matrix(0.55,-0,-0,0.55,67.8557px,-588.132px);-webkit-transform:matrix(0.55,-0,-0,0.55,67.8557,-588.132);-o-transform:matrix(0.55,-0,-0,0.55,67.8557,-588.132);}.t12f{transform:matrix(0.55,-0,-0,0.55,58.2565,-594.678);-ms-transform:matrix(0.55,-0,-0,0.55,58.2565,-594.678);-moz-transform:matrix(0.55,-0,-0,0.55,58.2565px,-594.678px);-webkit-transform:matrix(0.55,-0,-0,0.55,58.2565,-594.678);-o-transform:matrix(0.55,-0,-0,0.55,58.2565,-594.678);}.t130{transform:matrix(0.55,-0,-0,0.55,63.463,-601.224);-ms-transform:matrix(0.55,-0,-0,0.55,63.463,-601.224);-moz-transform:matrix(0.55,-0,-0,0.55,63.463px,-601.224px);-webkit-transform:matrix(0.55,-0,-0,0.55,63.463,-601.224);-o-transform:matrix(0.55,-0,-0,0.55,63.463,-601.224);}.t131{transform:matrix(0.55,-0,-0,0.55,62.1312,-607.771);-ms-transform:matrix(0.55,-0,-0,0.55,62.1312,-607.771);-moz-transform:matrix(0.55,-0,-0,0.55,62.1312px,-607.771px);-webkit-transform:matrix(0.55,-0,-0,0.55,62.1312,-607.771);-o-transform:matrix(0.55,-0,-0,0.55,62.1312,-607.771);}.t132{transform:matrix(0.55,-0,-0,0.55,64.112,-614.317);-ms-transform:matrix(0.55,-0,-0,0.55,64.112,-614.317);-moz-transform:matrix(0.55,-0,-0,0.55,64.112px,-614.317px);-webkit-transform:matrix(0.55,-0,-0,0.55,64.112,-614.317);-o-transform:matrix(0.55,-0,-0,0.55,64.112,-614.317);}.t133{transform:matrix(0.55,-0,-0,0.55,60.9936,-620.863);-ms-transform:matrix(0.55,-0,-0,0.55,60.9936,-620.863);-moz-transform:matrix(0.55,-0,-0,0.55,60.9936px,-620.863px);-webkit-transform:matrix(0.55,-0,-0,0.55,60.9936,-620.863);-o-transform:matrix(0.55,-0,-0,0.55,60.9936,-620.863);}.t134{transform:matrix(0.55,-0,-0,0.55,70.523,-627.41);-ms-transform:matrix(0.55,-0,-0,0.55,70.523,-627.41);-moz-transform:matrix(0.55,-0,-0,0.55,70.523px,-627.41px);-webkit-transform:matrix(0.55,-0,-0,0.55,70.523,-627.41);-o-transform:matrix(0.55,-0,-0,0.55,70.523,-627.41);}.t135{transform:matrix(0.55,-0,-0,0.55,69.5036,-633.956);-ms-transform:matrix(0.55,-0,-0,0.55,69.5036,-633.956);-moz-transform:matrix(0.55,-0,-0,0.55,69.5036px,-633.956px);-webkit-transform:matrix(0.55,-0,-0,0.55,69.5036,-633.956);-o-transform:matrix(0.55,-0,-0,0.55,69.5036,-633.956);}.t136{transform:matrix(0.55,-0,-0,0.55,69.3467,-640.502);-ms-transform:matrix(0.55,-0,-0,0.55,69.3467,-640.502);-moz-transform:matrix(0.55,-0,-0,0.55,69.3467px,-640.502px);-webkit-transform:matrix(0.55,-0,-0,0.55,69.3467,-640.502);-o-transform:matrix(0.55,-0,-0,0.55,69.3467,-640.502);}.t137{transform:matrix(0.55,-0,-0,0.55,64.2689,-647.049);-ms-transform:matrix(0.55,-0,-0,0.55,64.2689,-647.049);-moz-transform:matrix(0.55,-0,-0,0.55,64.2689px,-647.049px);-webkit-transform:matrix(0.55,-0,-0,0.55,64.2689,-647.049);-o-transform:matrix(0.55,-0,-0,0.55,64.2689,-647.049);}.t138{transform:matrix(0.55,-0,-0,0.55,63.5492,-653.595);-ms-transform:matrix(0.55,-0,-0,0.55,63.5492,-653.595);-moz-transform:matrix(0.55,-0,-0,0.55,63.5492px,-653.595px);-webkit-transform:matrix(0.55,-0,-0,0.55,63.5492,-653.595);-o-transform:matrix(0.55,-0,-0,0.55,63.5492,-653.595);}.t139{transform:matrix(0.55,-0,-0,0.55,69.1738,-660.141);-ms-transform:matrix(0.55,-0,-0,0.55,69.1738,-660.141);-moz-transform:matrix(0.55,-0,-0,0.55,69.1738px,-660.141px);-webkit-transform:matrix(0.55,-0,-0,0.55,69.1738,-660.141);-o-transform:matrix(0.55,-0,-0,0.55,69.1738,-660.141);}.t13a{transform:matrix(0.55,-0,-0,0.55,63.5051,-666.688);-ms-transform:matrix(0.55,-0,-0,0.55,63.5051,-666.688);-moz-transform:matrix(0.55,-0,-0,0.55,63.5051px,-666.688px);-webkit-transform:matrix(0.55,-0,-0,0.55,63.5051,-666.688);-o-transform:matrix(0.55,-0,-0,0.55,63.5051,-666.688);}.t13b{transform:matrix(0.55,-0,-0,0.55,62.0012,-673.234);-ms-transform:matrix(0.55,-0,-0,0.55,62.0012,-673.234);-moz-transform:matrix(0.55,-0,-0,0.55,62.0012px,-673.234px);-webkit-transform:matrix(0.55,-0,-0,0.55,62.0012,-673.234);-o-transform:matrix(0.55,-0,-0,0.55,62.0012,-673.234);}.t13c{transform:matrix(0.55,-0,-0,0.55,69.872,-679.781);-ms-transform:matrix(0.55,-0,-0,0.55,69.872,-679.781);-moz-transform:matrix(0.55,-0,-0,0.55,69.872px,-679.781px);-webkit-transform:matrix(0.55,-0,-0,0.55,69.872,-679.781);-o-transform:matrix(0.55,-0,-0,0.55,69.872,-679.781);}.t13d{transform:matrix(0.55,-0,-0,0.55,67.8267,-686.327);-ms-transform:matrix(0.55,-0,-0,0.55,67.8267,-686.327);-moz-transform:matrix(0.55,-0,-0,0.55,67.8267px,-686.327px);-webkit-transform:matrix(0.55,-0,-0,0.55,67.8267,-686.327);-o-transform:matrix(0.55,-0,-0,0.55,67.8267,-686.327);}.t13e{transform:matrix(0.55,-0,-0,0.55,69.959,-692.873);-ms-transform:matrix(0.55,-0,-0,0.55,69.959,-692.873);-moz-transform:matrix(0.55,-0,-0,0.55,69.959px,-692.873px);-webkit-transform:matrix(0.55,-0,-0,0.55,69.959,-692.873);-o-transform:matrix(0.55,-0,-0,0.55,69.959,-692.873);}.t13f{transform:matrix(0.55,-0,-0,0.55,66.528,-699.42);-ms-transform:matrix(0.55,-0,-0,0.55,66.528,-699.42);-moz-transform:matrix(0.55,-0,-0,0.55,66.528px,-699.42px);-webkit-transform:matrix(0.55,-0,-0,0.55,66.528,-699.42);-o-transform:matrix(0.55,-0,-0,0.55,66.528,-699.42);}.t140{transform:matrix(0.55,-0,-0,0.55,62.8563,-705.966);-ms-transform:matrix(0.55,-0,-0,0.55,62.8563,-705.966);-moz-transform:matrix(0.55,-0,-0,0.55,62.8563px,-705.966px);-webkit-transform:matrix(0.55,-0,-0,0.55,62.8563,-705.966);-o-transform:matrix(0.55,-0,-0,0.55,62.8563,-705.966);}.t141{transform:matrix(0.55,-0,-0,0.55,61.813,-712.512);-ms-transform:matrix(0.55,-0,-0,0.55,61.813,-712.512);-moz-transform:matrix(0.55,-0,-0,0.55,61.813px,-712.512px);-webkit-transform:matrix(0.55,-0,-0,0.55,61.813,-712.512);-o-transform:matrix(0.55,-0,-0,0.55,61.813,-712.512);}.t142{transform:matrix(0.55,-0,-0,0.55,88.6002,-522.026);-ms-transform:matrix(0.55,-0,-0,0.55,88.6002,-522.026);-moz-transform:matrix(0.55,-0,-0,0.55,88.6002px,-522.026px);-webkit-transform:matrix(0.55,-0,-0,0.55,88.6002,-522.026);-o-transform:matrix(0.55,-0,-0,0.55,88.6002,-522.026);}.t143{transform:matrix(3.02076,-0,-0,3.02076,117.919,-517.159);-ms-transform:matrix(3.02076,-0,-0,3.02076,117.919,-517.159);-moz-transform:matrix(3.02076,-0,-0,3.02076,117.919px,-517.159px);-webkit-transform:matrix(3.02076,-0,-0,3.02076,117.919,-517.159);-o-transform:matrix(3.02076,-0,-0,3.02076,117.919,-517.159);}.t144{transform:matrix(0.55,-0,-0,0.55,122.244,-522.026);-ms-transform:matrix(0.55,-0,-0,0.55,122.244,-522.026);-moz-transform:matrix(0.55,-0,-0,0.55,122.244px,-522.026px);-webkit-transform:matrix(0.55,-0,-0,0.55,122.244,-522.026);-o-transform:matrix(0.55,-0,-0,0.55,122.244,-522.026);}.t145{transform:matrix(0.55,-0,-0,0.55,154.642,-522.026);-ms-transform:matrix(0.55,-0,-0,0.55,154.642,-522.026);-moz-transform:matrix(0.55,-0,-0,0.55,154.642px,-522.026px);-webkit-transform:matrix(0.55,-0,-0,0.55,154.642,-522.026);-o-transform:matrix(0.55,-0,-0,0.55,154.642,-522.026);}.t146{transform:matrix(3.02076,-0,-0,3.02076,179.554,-517.159);-ms-transform:matrix(3.02076,-0,-0,3.02076,179.554,-517.159);-moz-transform:matrix(3.02076,-0,-0,3.02076,179.554px,-517.159px);-webkit-transform:matrix(3.02076,-0,-0,3.02076,179.554,-517.159);-o-transform:matrix(3.02076,-0,-0,3.02076,179.554,-517.159);}.t147{transform:matrix(0.55,-0,-0,0.55,183.879,-522.026);-ms-transform:matrix(0.55,-0,-0,0.55,183.879,-522.026);-moz-transform:matrix(0.55,-0,-0,0.55,183.879px,-522.026px);-webkit-transform:matrix(0.55,-0,-0,0.55,183.879,-522.026);-o-transform:matrix(0.55,-0,-0,0.55,183.879,-522.026);}.t148{transform:matrix(0.55,-0,-0,0.55,215.955,-522.026);-ms-transform:matrix(0.55,-0,-0,0.55,215.955,-522.026);-moz-transform:matrix(0.55,-0,-0,0.55,215.955px,-522.026px);-webkit-transform:matrix(0.55,-0,-0,0.55,215.955,-522.026);-o-transform:matrix(0.55,-0,-0,0.55,215.955,-522.026);}.t149{transform:matrix(0.55,-0,-0,0.55,250.829,-522.026);-ms-transform:matrix(0.55,-0,-0,0.55,250.829,-522.026);-moz-transform:matrix(0.55,-0,-0,0.55,250.829px,-522.026px);-webkit-transform:matrix(0.55,-0,-0,0.55,250.829,-522.026);-o-transform:matrix(0.55,-0,-0,0.55,250.829,-522.026);}.t14a{transform:matrix(1,-0,-0,1,54,-494.472);-ms-transform:matrix(1,-0,-0,1,54,-494.472);-moz-transform:matrix(1,-0,-0,1,54px,-494.472px);-webkit-transform:matrix(1,-0,-0,1,54,-494.472);-o-transform:matrix(1,-0,-0,1,54,-494.472);}.w28{width:7.28463px;} \ No newline at end of file diff --git a/demo/demo.html b/demo/demo.html new file mode 100644 index 0000000..47ef14c --- /dev/null +++ b/demo/demo.html @@ -0,0 +1,2 @@ + +
T
race-based Just-in-Time T
ype Specialization for Dynamic
Languages
Andreas Gal
+
, Brendan Eich
, Mike Shaver
, David Anderson
, David Mandelin
,
Mohammad R. Haghighat
$
, Blake Kaplan
, Graydon Hoare
, Boris Zbarsky
, Jason Orendorff
,
Jesse Ruderman
, Edwin Smith
#
, Rick Reitmaier
#
, Michael Bebenita
+
, Mason Chang
+#
, Michael Franz
+
Mozilla Corporation
{
gal,brendan,shaver,danderson,dmandelin,mrbkap,graydon,bz,jorendorff,jruderman
}
@mozilla.com
Adobe Corporation
#
{
edwsmith,rreitmai
}
@adobe.com
Intel Corporation
$
{
mohammad.r.haghighat
}
@intel.com
University of California, Irvine
+
{
mbebenit,changm,franz
}
@uci.edu
Abstract
Dynamic languages such as JavaScript are more difficult to com-
pile than statically typed ones. Since no concrete type information
is available, traditional compilers need to emit generic code that can
handle all possible type combinations at runtime. We present an al-
ternative compilation technique for dynamically-typed languages
that identifies frequently executed loop traces at run-time and then
generates machine code on the fly that is specialized for the ac-
tual dynamic types occurring on each path through the loop. Our
method provides cheap inter-procedural type specialization, and an
elegant and efficient way of incrementally compiling lazily discov-
ered alternative paths through nested loops. We have implemented
a dynamic compiler for JavaScript based on our technique and we
have measured speedups of 10x and more for certain benchmark
programs.
Categories and Subject Descriptors
D.3.4 [
Programming Lan-
guages
]: Processors
Incremental compilers, code generation
.
General Terms
Design, Experimentation, Measurement, Perfor-
mance.
Keywords
JavaScript, just-in-time compilation, trace trees.
1. Introduction
Dynamic languages
such as JavaScript, Python, and Ruby, are pop-
ular since they are expressive, accessible to non-experts, and make
deployment as easy as distributing a source file. They are used for
small scripts as well as for complex applications. JavaScript, for
example, is the de facto standard for client-side web programming
Permission to make digital or hard copies of all or part of this work for personal or
classroom use is granted without fee provided that copies are not made or distributed
for profit or commercial advantage and that copies bear this notice and the full citation
on the first page. To copy otherwise, to republish, to post on servers or to redistribute
to lists, requires prior specific permission and/or a fee.
PLDI’09,
June 15–20, 2009, Dublin, Ireland.
Copyright c
2009 ACM 978-1-60558-392-1/09/06. . .$5.00
and is used for the application logic of browser-based productivity
applications such as Google Mail, Google Docs and Zimbra Col-
laboration Suite. In this domain, in order to provide a fluid user
experience and enable a new generation of applications, virtual ma-
chines must provide a low startup time and high performance.
Compilers for statically typed languages rely on type informa-
tion to generate efficient machine code. In a dynamically typed pro-
gramming language such as JavaScript, the types of expressions
may vary at runtime. This means that the compiler can no longer
easily transform operations into machine instructions that operate
on one specific type. Without exact type information, the compiler
must emit slower generalized machine code that can deal with all
potential type combinations. While compile-time static type infer-
ence might be able to gather type information to generate opti-
mized machine code, traditional static analysis is very expensive
and hence not well suited for the highly interactive environment of
a web browser.
We present a trace-based compilation technique for dynamic
languages that reconciles speed of compilation with excellent per-
formance of the generated machine code. Our system uses a mixed-
mode execution approach: the system starts running JavaScript in a
fast-starting bytecode interpreter. As the program runs, the system
identifies
hot
(frequently executed) bytecode sequences, records
them, and compiles them to fast native code. We call such a se-
quence of instructions a
trace
.
Unlike method-based dynamic compilers, our dynamic com-
piler operates at the granularity of individual loops. This design
choice is based on the expectation that programs spend most of
their time in hot loops. Even in dynamically typed languages, we
expect hot loops to be mostly
type-stable
, meaning that the types of
values are invariant. (12) For example, we would expect loop coun-
ters that start as integers to remain integers for all iterations. When
both of these expectations hold, a trace-based compiler can cover
the program execution with a small number of type-specialized, ef-
ficiently compiled traces.
Each compiled trace covers one path through the program with
one mapping of values to types. When the VM executes a compiled
trace, it cannot guarantee that the same path will be followed
or that the same types will occur in subsequent loop iterations.
Hence, recording and compiling a trace
speculates
that the path and
typing will be exactly as they were during recording for subsequent
iterations of the loop.
Every compiled trace contains all the
guards
(checks) required
to validate the speculation. If one of the guards fails (if control
flow is different, or a value of a different type is generated), the
trace exits. If an exit becomes hot, the VM can record a
branch
trace
starting at the exit to cover the new path. In this way, the VM
records a
trace tree
covering all the hot paths through the loop.
Nested loops can be difficult to optimize for tracing VMs. In
a na¨
ıve implementation, inner loops would become hot first, and
the VM would start tracing there. When the inner loop exits, the
VM would detect that a different branch was taken. The VM would
try to record a branch trace, and find that the trace reaches not the
inner loop header, but the outer loop header. At this point, the VM
could continue tracing until it reaches the inner loop header again,
thus tracing the outer loop inside a trace tree for the inner loop.
But this requires tracing a copy of the outer loop for every side exit
and type combination in the inner loop. In essence, this is a form
of unintended tail duplication, which can easily overflow the code
cache. Alternatively, the VM could simply stop tracing, and give up
on ever tracing outer loops.
We solve the nested loop problem by recording
nested trace
trees
. Our system traces the inner loop exactly as the na¨
ıve version.
The system stops extending the inner tree when it reaches an outer
loop, but then it starts a new trace at the outer loop header. When
the outer loop reaches the inner loop header, the system tries to call
the trace tree for the inner loop. If the call succeeds, the VM records
the call to the inner tree as part of the outer trace and finishes
the outer trace as normal. In this way
, our system can trace any
number of loops nested to any depth without causing excessive tail
duplication.
These techniques allow a VM to dynamically translate a pro-
gram to nested, type-specialized trace trees. Because traces can
cross function call boundaries, our techniques also achieve the ef-
fects of inlining. Because traces have no internal control-flow joins,
they can be optimized in linear time by a simple compiler (10).
Thus, our tracing VM efficiently performs the same kind of op-
timizations that would require interprocedural analysis in a static
optimization setting. This makes tracing an attractive and effective
tool to type specialize even complex function call-rich code.
We implemented these techniques for an existing JavaScript in-
terpreter, SpiderMonkey
. We call the resulting tracing VM
Trace-
Monkey
. TraceMonkey supports all the JavaScript features of Spi-
derMonkey, with a 2x-20x speedup for traceable programs.
This paper makes the following contributions:
We explain an algorithm for dynamically forming trace trees to
cover a program, representing nested loops as nested trace trees.
Weexplain how to speculatively generate efficient type-specialized
code for traces from dynamic language programs.
We validate our tracing techniques in an implementation based
on the SpiderMonkey JavaScript interpreter, achieving 2x-20x
speedups on many programs.
The remainder of this paper is organized as follows. Section 3 is
a general overview of trace tree based compilation we use to cap-
ture and compile frequently executed code regions. In Section 4
we describe our approach of covering nested loops using a num-
ber of individual trace trees. In Section 5 we describe our trace-
compilation based speculative type specialization approach we use
to generate efficient machine code from recorded bytecode traces.
Our implementation of a dynamic type-specializing compiler for
JavaScript is described in Section 6. Related work is discussed in
Section 8. In Section 7 we evaluate our dynamic compiler based on
1 for (var i = 2; i < 100; ++i) {
2 if (!primes[i])
3 continue;
4 for (var k = i + i; i < 100; k += i)
5 primes[k] = false;
6 }
Figure 1. Sample program: sieve of Eratosthenes.
primes
is
initialized to an array of 100
false
values on entry to this code
snippet.
Interpret
Bytecodes
Monitor
Record
LIR
T
race
Execute
Compiled
T
race
Enter
Compiled
T
race
Compile
LIR
T
race
Leave
Compiled
T
race
loop
edge
hot
loop/exit
abort
recording
fi
nish at
loop header
cold/blacklisted
loop/exit
compiled trace
ready
loop edge with
same types
side exit to
existing trace
side exit,
no existing trace
Overhead
Interpreting
Native
Symbol Key
Figure 2.
State machine describing the major activities of Trace-
Monkey and the conditions that cause transitions to a new activ-
ity. In the dark box, TM executes JS as compiled traces. In the
light gray boxes, TM executes JS in the standard interpreter. White
boxes are overhead. Thus, to maximize performance, we need to
maximize time spent in the darkest box and minimize time spent in
the white boxes. The best case is a loop where the types at the loop
edge are the same as the types on entry–then TM can stay in native
code until the loop is done.
a set of industry benchmarks. The paper ends with conclusions in
Section 9 and an outlook on future work is presented in Section 10.
2. Overview: Example T
racing Run
This section provides an overview of our system by describing
how T
raceMonkey executes an example program. The example
program, shown in Figure 1, computes the first 100 prime numbers
with nested loops. The narrative should be read along with Figure 2,
which describes the activities TraceMonkey performs and when it
transitions between the loops.
TraceMonkey always begins executing a program in the byte-
code interpreter. Every loop back edge is a potential trace point.
When the interpreter crosses a loop edge, TraceMonkey invokes
the
trace monitor
, which may decide to record or execute a native
trace. At the start of execution, there are no compiled traces yet, so
the trace monitor counts the number of times each loop back edge is
executed until a loop becomes
hot
, currently after 2 crossings. Note
that the way our loops are compiled, the loop edge is crossed before
entering the loop, so the second crossing occurs immediately after
the first iteration.
Here is the sequence of events broken down by outer loop
iteration:
v0 := ld state[748] // load primes from the trace activation record
st sp[0], v0 // store primes to interpreter stack
v1 := ld state[764] // load k from the trace activation record
v2 := i2f(v1) // convert k from int to double
st sp[8], v1 // store k to interpreter stack
st sp[16], 0 // store false to interpreter stack
v3 := ld v0[4] // load class word for primes
v4 := and v3, -4// mask out object class tag for primes
v5 := eq v4, Array // test whether primes is an array
xf v5 // side exit if v5 is false
v6 := js_Array_set(v0, v2, false) // call function to set array element
v7 := eq v6, 0 // test return value from call
xt v7 // side exit if js_Array_set returns false.
Figure 3. LIR snippet for sample program.
This is the LIR recorded for line 5 of the sample program in Figure 1. The LIR encodes
the semantics in SSA form using temporary variables. The LIR also encodes all the stores that the interpreter would do to its data stack.
Sometimes these stores can be optimized away as the stack locations are live only on exits to the interpreter. Finally, the LIR records guards
and side exits to verify the assumptions made in this recording: that
primes
is an array and that the call to set its element succeeds.
mov edx, ebx(748) // load primes from the trace activation record
mov edi(0), edx// (*) store primes to interpreter stack
mov esi, ebx(764) // load k from the trace activation record
mov edi(8), esi// (*) store k to interpreter stack
mov edi(16), 0 // (*) store false to interpreter stack
mov eax, edx(4)// (*) load object class word for primes
and eax, -4 // (*) mask out object class tag for primes
cmp eax, Array // (*) test whether primes is an array
jne side_exit_1// (*) side exit if primes is not an array
sub esp, 8 // bump stack for call alignment convention
push false // push last argument for call
push esi // push first argument for call
call js_Array_set // call function to set array element
add esp, 8 // clean up extra stack space
mov ecx, ebx // (*) created by register allocator
test eax, eax // (*) test return value of js_Array_set
je side_exit_2 // (*) side exit if call failed
...
side_exit_1:
mov ecx, ebp(-4) // restore ecx
mov esp, ebp // restore esp
jmp epilog // jump to ret statement
Figure 4. x86 snippet for sample program.
This is the x86 code compiled from the LIR snippet in Figure 3. Most LIR instructions compile
to a single x86 instruction. Instructions marked with
(*)
would be omitted by an idealized compiler that knew that none of the side exits
would ever be taken. The 17 instructions generated by the compiler compare favorably with the 100+ instructions that the interpreter would
execute for the same code snippet, including 4 indirect jumps.
i=2.
This is the first iteration of the outer loop. The loop on
lines 4-5 becomes hot on its second iteration, so TraceMonkey en-
ters recording mode on line 4. In recording mode, TraceMonkey
records the code along the trace in a low-level compiler intermedi-
ate representation we call
LIR
. The LIR trace encodes all the oper-
ations performed and the types of all operands. The LIR trace also
encodes
guards
, which are checks that verify that the control flow
and types are identical to those observed during trace recording.
Thus, on later executions, if and only if all guards are passed, the
trace has the required program semantics.
TraceMonkey stops recording when execution returns to the
loop header or exits the loop. In this case, execution returns to the
loop header on line 4.
After recording is finished, TraceMonkey compiles the trace to
native code using the recorded type information for optimization.
The result is a native code fragment that can be entered if the
interpreter PC and the types of values match those observed when
trace recording was started. The first trace in our example,
T
45
,
covers lines 4 and 5. This trace can be entered if the PC is at line 4,
i
and
k
are integers, and
primes
is an object. After compiling
T
45
,
TraceMonkey returns to the interpreter and loops back to line 1.
i=3.
Now the loop header at line 1 has become hot, so Trace-
Monkey starts recording. When recording reaches line 4, Trace-
Monkey observes that it has reached an inner loop header that al-
ready has a compiled trace, so TraceMonkey attempts to nest the
inner loop inside the current trace. The first step is to call the inner
trace as a subroutine. This executes the loop on line 4 to completion
and then returns to the recorder. TraceMonkey verifies that the call
was successful and then records the call to the inner trace as part of
the current trace. Recording continues until execution reaches line
1, and at which point TraceMonkey finishes and compiles a trace
for the outer loop,
T
16
.
i=4.
On this iteration, TraceMonkey calls
T
16
. Because
i=4
, the
if
statement on line 2 is taken. This branch was not taken in the
original trace, so this causes
T
16
to fail a guard and take a side exit.
The exit is not yet hot, so TraceMonkey returns to the interpreter,
which executes the continue statement.
i=5.
TraceMonkey calls
T
16
, which in turn calls the nested trace
T
45
.
T
16
loops back to its own header, starting the next iteration
without ever returning to the monitor.
i=6.
On this iteration, the side exit on line 2 is taken again. This
time, the side exit becomes hot, so a trace
T
23
,
1
is recorded that
covers line 3 and returns to the loop header. Thus, the end of
T
23
,
1
jumps directly to the start of
T
16
. The side exit is patched so that
on future iterations, it jumps directly to
T
23
,
1
.
At this point, TraceMonkeyhas compiled enough traces to cover
the entire nested loop structure, so the rest of the program runs
entirely as native code.
3. Trace Trees
In this section, we describe traces, trace trees, and how they are
formed at run time. Although our techniques apply to any dynamic
language interpreter, we will describe them assuming a bytecode
interpreter to keep the exposition simple.
3.1 Traces
A
trace
is simply a program path, which may cross function call
boundaries. TraceMonkey focuses on
loop traces
, that originate at
a loop edge and represent a single iteration through the associated
loop.
Similar to an extended basic block, a trace is only entered at
the top, but may have many exits. In contrast to an extended basic
block, a trace can contain join nodes. Since a trace always only
follows one single path through the original program, however
, join
nodes are not recognizable as such in a trace and have a single
predecessor node like regular nodes.
A
typed trace
is a trace annotated with a type for every variable
(including temporaries) on the trace. A typed trace also has an entry
type map
giving the required types for variables used on the trace
before they are defined. For example, a trace could have a type map
(x: int, b: boolean)
, meaning that the trace may be entered
only if the value of the variable
x
is of type
int
and the value of
b
is of type
boolean
. The entry type map is much like the signature
of a function.
In this paper, we only discuss typed loop traces, and we will
refer to them simply as “traces”. The key property of typed loop
traces is that they can be compiled to efficient machine code using
the same techniques used for typed languages.
In TraceMonkey, traces are recorded in trace-flavored SSA
LIR
(low-level intermediate representation). In trace-flavored SSA (or
TSSA), phi nodes appear only at the entry point, which is reached
both on entry and via loop edges. The important LIR primitives
are constant values, memory loads and stores (by address and
offset), integer operators, floating-point operators, function calls,
and conditional exits. Type conversions, such as integer to double,
are represented by function calls. This makes the LIR used by
TraceMonkey independent of the concrete type system and type
conversion rules of the source language. The LIR operations are
generic enough that the backend compiler is language independent.
Figure 3 shows an example LIR trace.
Bytecode interpreters typically represent values in a various
complex data structures (e.g., hash tables) in a boxed format (i.e.,
with attached type tag bits). Since a trace is intended to represent
efficient code that eliminates all that complexity
, our traces oper-
ate on unboxed values in simple variables and arrays as much as
possible.
A trace records all its intermediate values in a small activation
record area. To make variable accesses fast on trace, the trace also
imports local and global variables by unboxing them and copying
them to its activation record. Thus, the trace can read and write
these variables with simple loads and stores from a native activation
recording, independently of the boxing mechanism used by the
interpreter. When the trace exits, the VM boxes the values from
this native storage location and copies them back to the interpreter
structures.
For every control-flow branch in the source program, the
recorder generates conditional exit LIR instructions. These instruc-
tions exit from the trace if required control flow is different from
what it was at trace recording, ensuring that the trace instructions
are run only if they are supposed to. We call these instructions
guard
instructions.
Most of our traces represent loops and end with the special
loop
LIR instruction. This is just an unconditional branch to the top of
the trace. Such traces return only via guards.
Now, we describe the key optimizations that are performed as
part of recording LIR. All of these optimizations reduce complex
dynamic language constructs to simple typed constructs by spe-
cializing for the current trace. Each optimization requires guard in-
structions to verify their assumptions about the state and exit the
trace if necessary.
Type specialization.
All LIR primitives apply to operands of specific types. Thus,
LIR traces are necessarily type-specialized, and a compiler can
easily produce a translation that requires no type dispatches. A
typical bytecode interpreter carries tag bits along with each value,
and to perform any operation, must check the tag bits, dynamically
dispatch, mask out the tag bits to recover the untagged value,
perform the operation, and then reapply tags. LIR omits everything
except the operation itself.
A potential problem is that some operations can produce values
of unpredictable types. For example, reading a property from an
object could yield a value of any type, not necessarily the type
observed during recording. The recorder emits guard instructions
that conditionally exit if the operation yields a value of a different
type from that seen during recording. These guard instructions
guarantee that as long as execution is on trace, the types of values
match those of the typed trace. When the VM observes a side exit
along such a type guard, a new typed trace is recorded originating
at the side exit location, capturing the new type of the operation in
question.
Representation specialization: objects.
In Jav
aScript, name
lookup semantics are complex and potentially expensive because
they include features like object inheritance and
eval
. To evaluate
an object property read expression like
o.x
, the interpreter must
search the property map of
o
and all of its prototypes and parents.
Property maps can be implemented with different data structures
(e.g., per-object hash tables or shared hash tables), so the search
process also must dispatch on the representation of each object
found during search. TraceMonkey can simply observe the result of
the search process and record the simplest possible LIR to access
the property value. For example, the search might finds the value of
o.x
in the prototype of
o
, which uses a shared hash-table represen-
tation that places
x
in slot 2 of a property vector. Then the recorded
can generate LIR that reads
o.x
with just two or three loads: one to
get the prototype, possibly one to get the property value vector, and
one more to get slot 2 from the vector. This is a vast simplification
and speedup compared to the original interpreter code. Inheritance
relationships and object representations can change during execu-
tion, so the simplified code requires guard instructions that ensure
the object representation is the same. In TraceMonkey,objects’ rep-
resentations are assigned an integer key called the
object shape
.
Thus, the guard is a simple equality check on the object shape.
Representation specialization: numbers.
JavaScript has no
integer type, only a Number type that is the set of 64-bit IEEE-
754 floating-pointer numbers (“doubles”). But many JavaScript
operators, in particular array accesses and bitwise operators, really
operate on integers, so they first convert the number to an integer,
and then conv
ert any integer result back to a double.
1
Clearly, a
JavaScript VM that wants to be fast must find a way to operate on
integers directly and avoid these conversions.
In TraceMonkey
, we support two representations for numbers:
integers and doubles. The interpreter uses integer representations
as much as it can, switching for results that can only be represented
as doubles. When a trace is started, some values may be imported
and represented as integers. Some operations on integers require
guards. For example, adding two integers can produce a value too
large for the integer representation.
Function inlining.
LIR traces can cross function boundaries
in either direction, achieving function inlining. Move instructions
need to be recorded for function entry and exit to copy arguments
in and return values out. These move statements are then optimized
away by the compiler using copy propagation. In order to be able
to return to the interpreter, the trace must also generate LIR to
record that a call frame has been entered and exited. The frame
entry and exit LIR saves just enough information to allow the
intepreter call stack to be restored later and is much simpler than
the interpreter’s standard call code. If the function being entered
is not constant (which in JavaScript includes any call by function
name), the recorder must also emit LIR to guard that the function
is the same.
Guards and side exits.
Each optimization described above
requires one or more guards to verify the assumptions made in
doing the optimization. A guard is just a group of LIR instructions
that performs a test and conditional exit. The exit branches to a
side exit
, a small off-trace piece of LIR that returns a pointer to
a structure that describes the reason for the exit along with the
interpreter PC at the exit point and any other data needed to restore
the interpreter’s state structures.
Aborts.
Some constructs are difficult to record in LIR traces.
For example,
eval
or calls to external functions can change the
program state in unpredictable ways, making it difficult for the
tracer to know the current type map in order to continue tracing.
A tracing implementation can also have any number of other limi-
tations, e.g.,a small-memory device may limit the length of traces.
When any situation occurs that prevents the implementation from
continuing trace recording, the implementation
aborts
trace record-
ing and returns to the trace monitor.
3.2 Trace Trees
Especially simple loops, namely those where control flow, value
types, value representations, and inlined functions are all invariant,
can be represented by a single trace. But most loops have at least
some variation, and so the program will take side exits from the
main trace. When a side exit becomes hot, TraceMonkey starts a
new
branch trace
from that point and patches the side exit to jump
directly to that trace. In this way, a single trace expands on demand
to a single-entry, multiple-exit
trace tree
.
This section explains how trace trees are formed during execu-
tion. The goal is to form trace trees during execution that cover all
the hot paths of the program.
1
Arrays are actually worse than this: if the index value is a number, it must
be converted from a double to a string for the property access operator, and
then to an integer internally to the array implementation.
Starting a tree.
Tree trees always start at loop headers, because
they are a natural place to look for hot paths. In TraceMonkey
, loop
headers are easy to detect–the bytecode compiler ensures that a
bytecode is a loop header iff it is the target of a backward branch.
TraceMonkey starts a tree when a given loop header has been exe-
cuted a certain number of times (2 in the current implementation).
Starting a tree just means starting recording a trace for the current
point and type map and marking the trace as the root of a tree. Each
tree is associated with a loop header and type map, so there may be
several trees for a given loop header.
Closing the loop.
Trace recording can end in several ways.
Ideally, the trace reaches the loop header where it started with
the same type map as on entry. This is called a
type-stable
loop
iteration. In this case, the end of the trace can jump right to the
beginning, as all the value representations are exactly as needed to
enter the trace. The jump can even skip the usual code that would
copy out the state at the end of the trace and copy it back in to the
trace activation record to enter a trace.
In certain cases the trace might reach the loop header with a
different type map. This scenario is sometime observed for the first
iteration of a loop. Some variables inside the loop might initially be
undefined
, before they are set to a concrete type during the first loop
iteration. When recording such an iteration, the recorder cannot
link the trace back to its own loop header since it is
type-unstable
.
Instead, the iteration is terminated with a side exit that will always
fail and return to the interpreter. At the same time a new trace is
recorded with the new type map. Every time an additional type-
unstable trace is added to a region, its exit type map is compared to
the entry map of all existing traces in case they complement each
other. With this approach we are able to cover type-unstable loop
iterations as long they eventually form a stable equilibrium.
Finally, the trace might exit the loop before reaching the loop
header, for example because execution reaches a
break
or
return
statement. In this case, the VM simply ends the trace with an exit
to the trace monitor.
As mentioned previously, we may speculatively chose to rep-
resent certain Number-typed values as integers on trace. We do so
when we observe that Number-typed variables contain an integer
value at trace entry. If during trace recording the variable is unex-
pectedly assigned a non-integer value, we have to widen the type
of the variable to a double. As a result, the recorded trace becomes
inherently type-unstable since it starts with an integer value but
ends with a double value. This represents a mis-speculation, since
at trace entry we specialized the Number-typed value to an integer,
assuming that at the loop edge we would again find an integer value
in the variable, allowing us to close the loop. To avoid future spec-
ulative failures involving this variable, and to obtain a type-stable
trace we note the fact that the variable in question as been observed
to sometimes hold non-integer values in an advisory data structure
which we call the “oracle”.
When compiling loops, we consult the oracle before specializ-
ing values to integers. Speculation towards integers is performed
only if no adverse information is known to the oracle about that
particular variable. Whenever we accidentally compile a loop that
is type-unstable due to mis-speculation of a Number-typed vari-
able, we immediately trigger the recording of a new trace, which
based on the now updated oracle information will start with a dou-
ble value and thus become type stable.
Extending a tree.
Side exits lead to different paths through
the loop, or paths with different types or representations. Thus, to
completely cover the loop, the VM must record traces starting at all
side exits. These traces are recorded much like root traces: there is
a counter for each side exit, and when the counter reaches a hotness
threshold, recording starts. Recording stops exactly as for the root
trace, using the loop header of the root trace as the target to reach.
Our implementation does not extend at all side exits. It extends
only if the side exit is for a control-flow branch, and only if the side
exit does not leave the loop. In particular we do not want to extend
a trace tree along a path that leads to an outer loop, because we
want to cover such paths in an outer tree through tree
nesting
.
3.3 Blacklisting
Sometimes, a program follows a path that cannot be compiled
into a trace, usually because of limitations in the implementation.
TraceMonkey does not currently support recording throwing and
catching of arbitrary exceptions. This design trade off was chosen,
because exceptions are usually rare in JavaScript. However
, if a
program opts to use exceptions intensively, we would suddenly
incur a punishing runtime overhead if we repeatedly try to record
a trace for this path and repeatedly fail to do so, since we abort
tracing every time we observe an exception being thrown.
As a result, if a hot loop contains traces that always fail, the VM
could potentially run much more slowly than the base interpreter:
the VM repeatedly spends time trying to record traces, but is never
able to run any. To avoid this problem, whenever the VM is about
to start tracing, it must try to predict whether it will finish the trace.
Our prediction algorithm is based on
blacklisting
traces that
have been tried and failed. When the VM fails to finish a trace start-
ing at a given point, the VM records that a failure has occurred. The
VM also sets a counter so that it will not try to record a trace starting
at that point until it is passed a few more times (32 in our imple-
mentation). This
backoff
counter gives temporary conditions that
prevent tracing a chance to end. For example, a loop may behave
differently during startup than during its steady-state execution. Af-
ter a given number of failures (2 in our implementation), the VM
marks the fragment as blacklisted, which means the VM will never
again start recording at that point.
After implementing this basic strategy, we observed that for
small loops that get blacklisted, the system can spend a noticeable
amount of time just finding the loop fragment and determining that
it has been blacklisted. We now avoid that problem by patching the
bytecode. We define an extra no-op bytecode that indicates a loop
header. The VM calls into the trace monitor ev
ery time the inter-
preter executes a loop header no-op. To blacklist a fragment, we
simply replace the loop header no-op with a regular no-op. Thus,
the interpreter will never again even call into the trace monitor.
There is a related problem we have not yet solved, which occurs
when a loop meets all of these conditions:
The VM can form at least one root trace for the loop.
There is at least one hot side exit for which the VM cannot
complete a trace.
The loop body is short.
In this case, the VM will repeatedly pass the loop header, search
for a trace, find it, execute it, and fall back to the interpreter.
With a short loop body
, the overhead of finding and calling the
trace is high, and causes performance to be even slower than the
basic interpreter. So far, in this situation we have improved the
implementation so that the VM can complete the branch trace.
But it is hard to guarantee that this situation will never happen.
As future work, this situation could be avoided by detecting and
blacklisting loops for which the av
erage trace call executes few
bytecodes before returning to the interpreter.
4. Nested Trace Tree Formation
Figure 7 shows basic trace tree compilation (11) applied to a nested
loop where the inner loop contains two paths. Usually, the inner
loop (with header at
i
2
) becomes hot first, and a trace tree is rooted
at that point. For example, the first recorded trace may be a cycle
T
T
runk
T
r
ace
T
r
ee
Anchor
T
r
ace
Anchor
Br
anch
T
r
ace
Guar
d
Side
Exit
Figure 5.
A tree with two traces, a trunk trace and one branch
trace. The trunk trace contains a guard to which a branch trace was
attached. The branch trace contain a guard that may fail and trigger
a side exit. Both the trunk and the branch trace loop back to the tree
anchor, which is the beginning of the trace tree.
T
r
ace
2
T
r
ace
1
T
r
ace
2
T
r
ace
1
Closed
Link
ed
Link
ed
Link
ed
Number
Number
String
String
String
String
Boolean
T
r
ace
2
T
r
ace
1
T
r
ace
3
Link
ed
Link
ed
Link
ed
Closed
Number
Number
Number
Boolean
Number
Boolean
Number
Boolean
(a)
(b)
(c)
Figure 6.
We handle type-unstable loops by allowing traces to
compile that cannot loop back to themselves due to a type mis-
match. As such traces accumulate, we attempt to connect their loop
edges to form groups of trace trees that can execute without having
to side-exit to the interpreter to cover odd type cases. This is par-
ticularly important for nested trace trees where an outer tree tries to
call an inner tree (or in this case a forest of inner trees), since inner
loops frequently have initially undefined values which change type
to a concrete value after the first iteration.
through the inner loop,
{
i
2
, i
3
, i
5
, α
}
. The
α
symbol is used to
indicate that the trace loops back the tree anchor.
When execution leaves the inner loop, the basic design has two
choices. First, the system can stop tracing and give up on compiling
the outer loop, clearly an undesirable solution. The other choice is
to continue tracing, compiling traces for the outer loop inside the
inner loop’s trace tree.
For example, the program might exit at
i
5
and record a branch
trace that incorporates the outer loop:
{
i
5
, i
7
, i
1
, i
6
, i
7
, i
1
, α
}
.
Later, the program might take the other branch at
i
2
and then
exit, recording another branch trace incorporating the outer loop:
{
i
2
, i
4
, i
5
, i
7
, i
1
, i
6
, i
7
, i
1
, α
}
. Thus, the outer loop is recorded and
compiled twice, and both copies must be retained in the trace cache.
i
2
i
3
i
4
i
5
i
1
i
6
i
7
t
1
t
2
T
r
ee
Call
Out
er
T
r
ee
Nes
t
ed
T
r
ee
Exit
Guar
d
(a)
(b)
Figure 7.
Control flow graph of a nested loop with an if statement
inside the inner most loop (a). An inner tree captures the inner
loop, and is nested inside an outer tree which “calls” the inner tree.
The inner tree returns to the outer tree once it exits along its loop
condition guard (b).
In general, if loops are nested to depth
k
, and each loop has
n
paths
(on geometric average), this na¨
ıve strategy yields
O
(
n
k
)
traces,
which can easily fill the trace cache.
In order to execute programs with nested loops efficiently, a
tracing system needs a technique for covering the nested loops with
native code without exponential trace duplication.
4.1 Nesting Algorithm
The key insight is that if each loop is represented by its own trace
tree, the code for each loop can be contained only in its own tree,
and outer loop paths will not be duplicated. Another key fact is that
we are not tracing arbitrary bytecodes that might have irreduceable
control flow graphs, but rather bytecodes produced by a compiler
for a language with structured control flow. Thus, given two loop
edges, the system can easily determine whether they are nested
and which is the inner loop. Using this knowledge, the system can
compile inner and outer loops separately, and make the outer loop’s
traces
call
the inner loop’s trace tree.
The algorithm for building nested trace trees is as follows. We
start tracing at loop headers exactly as in the basic tracing system.
When we exit a loop (detected by comparing the interpreter PC
with the range given by the loop edge), we stop the trace. The
key step of the algorithm occurs when we are recording a trace
for loop
L
R
(
R
for loop being recorded) and we reach the header
of a different loop
L
O
(
O
for other loop). Note that
L
O
must be an
inner loop of
L
R
because we stop the trace when we exit a loop.
If
L
O
has a type-matching compiled trace tree, we call
L
O
as
a nested trace tree. If the call succeeds, then we record the call
in the trace for
L
R
. On future executions, the trace for
L
R
will
call the inner trace directly.
If
L
O
does not have a type-matching compiled trace tree yet,
we have to obtain it before we are able to proceed. In order
to do this, we simply abort recording the first trace. The trace
monitor will see the inner loop header, and will immediately
start recording the inner loop.
2
If all the loops in a nest are type-stable, then loop nesting creates
no duplication. Otherwise, if loops are nested to a depth
k
, and each
2
Instead of aborting the outer recording, we could principally merely sus-
pend the recording, but that would require the implementation to be able
to record several traces simultaneously, complicating the implementation,
while saving only a few iterations in the interpreter.
i
2
i
3
i
1
i
6
i
4
i
5
t
2
t
1
t
4
Exit
Guar
d
Nes
t
ed
T
r
ee
Figure 8.
Control flow graph of a loop with two nested loops (left)
and its nested trace tree configuration (right). The outer tree calls
the two inner nested trace trees and places guards at their side exit
locations.
loop is entered with
m
different type maps (on geometric average),
then we compile
O
(
m
k
)
copies of the innermost loop. As long as
m
is close to 1, the resulting trace trees will be tractable.
An important detail is that the call to the inner trace tree must act
like a function call site: it must return to the same point every time.
The goal of nesting is to make inner and outer loops independent;
thus when the inner tree is called, it must exit to the same point
in the outer tree every time with the same type map. Because we
cannot actually guarantee this property, we must guard on it after
the call, and side exit if the property does not hold. A common
reason for the inner tree not to return to the same point would
be if the inner tree took a new side exit for which it had never
compiled a trace. At this point, the interpreter PC is in the inner
tree, so we cannot continue recording or executing the outer tree.
If this happens during recording, we abort the outer trace, to give
the inner tree a chance to finish growing. A future execution of the
outer tree would then be able to properly finish and record a call to
the inner tree. If an inner tree side exit happens during execution of
a compiled trace for the outer tree, we simply exit the outer trace
and start recording a new branch in the inner tree.
4.2 Blacklisting with Nesting
The blacklisting algorithm needs modification to work well with
nesting. The problem is that outer loop traces often abort during
startup (because the inner tree is not available or takes a side exit),
which would lead to their being quickly blacklisted by the basic
algorithm.
The key observation is that when an outer trace aborts because
the inner tree is not ready, this is probably a temporary condition.
Thus, we should not count such aborts toward blacklisting as long
as we are able to build up more traces for the inner tree.
In our implementation, when an outer tree aborts on the inner
tree, we increment the outer tree’s blacklist counter as usual and
back off on compiling it. When the inner tree finishes a trace, we
decrement the blacklist counter on the outer loop, “forgiving” the
outer loop for aborting previously. We also undo the backoff so that
the outer tree can start immediately trying to compile the next time
we reach it.
5. Trace Tree Optimization
This section explains how a recorded trace is translated to an
optimized machine code trace. The trace compilation subsystem,
NAN OJI T
, is separate from the VM and can be used for other
applications.
5.1 Optimizations
Because traces are in SSA form and have no join points or
φ
-
nodes, certain optimizations are easy to implement. In order to
get good startup performance, the optimizations must run quickly,
so we chose a small set of optimizations. We implemented the
optimizations as pipelined filters so that they can be turned on and
off independently, and yet all run in just two loop passes over the
trace: one forward and one backward.
Every time the trace recorder emits a LIR instruction, the in-
struction is immediately passed to the first filter in the forward
pipeline. Thus, forward filter optimizations are performed as the
trace is recorded. Each filter may pass each instruction to the next
filter unchanged, write a different instruction to the next filter, or
write no instruction at all. For example, the constant folding filter
can replace a multiply instruction like
v
13
:=
mul
3
,
1000
with a
constant instruction
v
13
= 3000
.
We currently apply four forward filters:
On ISAs without floating-point instructions, a soft-float filter
converts floating-point LIR instructions to sequences of integer
instructions.
CSE (constant subexpression elimination),
expression simplification, including constant folding and a few
algebraic identities (e.g.,
a
a
= 0
), and
source language semantic-specific expression simplification,
primarily algebraic identities that allow
DOU BLE
to be replaced
with
INT
. For example, LIR that converts an
INT
to a
DOU BLE
and then back again would be removed by this filter.
When trace recording is completed, nanojit runs the backward
optimization filters. These are used for optimizations that require
backward program analysis. When running the backward filters,
nanojit reads one LIR instruction at a time, and the reads are passed
through the pipeline.
We currently apply three backward filters:
Dead data-stack store elimination. The LIR trace encodes many
stores to locations in the interpreter stack. But these values are
never read back before exiting the trace (by the interpreter or
another trace). Thus, stores to the stack that are overwritten
before the next exit are dead. Stores to locations that are off
the top of the interpreter stack at future exits are also dead.
Dead call-stack store elimination. This is the same optimization
as above, except applied to the interpreter’s call stack used for
function call inlining.
Dead code elimination. This eliminates any operation that
stores to a value that is never used.
After a LIR instruction is successfully read (“pulled”) from
the backward filter pipeline, nanojit’s code generator emits native
machine instruction(s) for it.
5.2 Register Allocation
We use a simple greedy register allocator that makes a single
backward pass over the trace (it is integrated with the code gen-
erator). By the time the allocator has reached an instruction like
v
3
=
add v
1
, v
2
, it has already assigned a register to
v
3
. If
v
1
and
v
2
have not yet been assigned registers, the allocator assigns a free
register to each. If there are no free registers, a value is selected for
spilling. We use a class heuristic that selects the “oldest” register-
carried value (6).
The heuristic considers the set
R
of values
v
in registers imme-
diately after the current instruction for spilling. Let
v
m
be the last
instruction before the current where each
v
is referred to. Then the
Tag
JS Type
Description
xx1
number
31-bit integer representation
000
object
pointer to JSObject handle
010
number
pointer to double handle
100
string
pointer to JSString handle
110
boolean
enumeration for null, undefined, true, false
null, or
undefined
Figure 9. Tagged values in the SpiderMonkey JS interpreter.
Testing tags, unboxing (extracting the untagged value) and boxing
(creating tagged values) are significant costs. Avoiding these costs
is a key benefit of tracing.
heuristic selects
v
with minimum
v
m
. The motivation is that this
frees up a register for as long as possible given a single spill.
If we need to spill a value
v
s
at this point, we generate the
restore code just after the code for the current instruction. The
corresponding spill code is generated just after the last point where
v
s
was used. The register that was assigned to
v
s
is marked free for
the preceding code, because that register can now be used freely
without affecting the following code
6. Implementation
To demonstrate the effectiveness of our approach, we have im-
plemented a trace-based dynamic compiler for the SpiderMonkey
JavaScript Virtual Machine (4). SpiderMonkey is the JavaScript
VM embedded in Mozilla’s Firefox open-source web browser (2),
which is used by more than 200 million users world-wide. The core
of SpiderMonkey is a bytecode interpreter implemented in C++.
In SpiderMonkey, all JavaScript values are represented by the
type
jsval
. A
jsval
is machine word in which up to the 3 of the
least significant bits are a type tag, and the remaining bits are data.
See Figure 6 for details. All pointers contained in
jsvals
point to
GC-controlled blocks aligned on 8-byte boundaries.
JavaScript
object
values are mappings of string-valued property
names to arbitrary values. They are represented in one of two ways
in SpiderMonkey. Most objects are represented by a shared struc-
tural description, called the
object shape
, that maps property names
to array indexes using a hash table. The object stores a pointer to
the shape and the array of its own property values. Objects with
large, unique sets of property names store their properties directly
in a hash table.
The garbage collector is an exact, non-generational, stop-the-
world mark-and-sweep collector.
In the rest of this section we discuss key areas of the TraceMon-
key implementation.
6.1 Calling Compiled Traces
Compiled traces are stored in a
trace cache
, indexed by intepreter
PC and type map. Traces are compiled so that they may be
called as functions using standard native calling conventions (e.g.,
FASTCALL
on x86).
The interpreter must hit a loop edge and enter the monitor in
order to call a native trace for the first time. The monitor computes
the current type map, checks the trace cache for a trace for the
current PC and type map, and if it finds one, executes the trace.
To execute a trace, the monitor must build a trace activation
record containing imported local and global variables, temporary
stack space, and space for arguments to native calls. The local and
global values are then copied from the interpreter state to the trace
activation record. Then, the trace is called like a normal C function
pointer.
When a trace call returns, the monitor restores the interpreter
state. First, the monitor checks the reason for the trace exit and
applies blacklisting if needed. Then, it pops or synthesizes inter-
preter JavaScript call stack frames as needed. Finally, it copies the
imported variables back from the trace activation record to the in-
terpreter state.
At least in the current implementation, these steps have a non-
negligible runtime cost, so minimizing the number of interpreter-
to-trace and trace-to-interpreter transitions is essential for perfor-
mance. (see also Section 3.3). Our experiments (see Figure 12)
show that for programs we can trace well such transitions hap-
pen infrequently and hence do not contribute significantly to total
runtime. In a few programs, where the system is prevented from
recording branch traces for hot side exits by aborts, this cost can
rise to up to 10% of total execution time.
6.2 Trace Stitching
Transitions from a trace to a branch trace at a side exit avoid the
costs of calling traces from the monitor, in a feature called
trace
stitching
. At a side exit, the exiting trace only needs to write live
register-carried values back to its trace activation record. In our im-
plementation, identical type maps yield identical activation record
layouts, so the trace activation record can be reused immediately
by the branch trace.
In programs with branchy trace trees with small traces, trace
stitching has a noticeable cost. Although writing to memory and
then soon reading back would be expected to have a high L1
cache hit rate, for small traces the increased instruction count has
a noticeable cost. Also, if the writes and reads are very close
in the dynamic instruction stream, we have found that current
x86 processors often incur penalties of 6 cycles or more (e.g., if
the instructions use different base registers with equal values, the
processor may not be able to detect that the addresses are the same
right away).
The alternate solution is to recompile an entire trace tree, thus
achieving inter-trace register allocation (10). The disadvantage is
that tree recompilation takes time quadratic in the number of traces.
We believe that the cost of recompiling a trace tree every time
a branch is added would be prohibitive. That problem might be
mitigated by recompiling only at certain points, or only for very
hot, stable trees.
In the future, multicore hardware is expected to be common,
making background tree recompilation attractive. In a closely re-
lated project (13) background recompilation yielded speedups of
up to 1.25x on benchmarks with many branch traces. We plan to
apply this technique to TraceMonkey as future work.
6.3 Trace Recording
The job of the trace recorder is to emit LIR with identical semantics
to the currently running interpreter bytecode trace. A good imple-
mentation should have low impact on non-tracing interpreter per-
formance and a convenient way for implementers to maintain se-
mantic equivalence.
In our implementation, the only direct modification to the inter-
preter is a call to the trace monitor at loop edges. In our benchmark
results (see Figure 12) the total time spent in the monitor (for all
activities) is usually less than 5%, so we consider the interpreter
impact requirement met. Incrementing the loop hit counter is ex-
pensive because it requires us to look up the loop in the trace cache,
but we have tuned our loops to become hot and trace very quickly
(on the second iteration). The hit counter implementation could be
improved, which might give us a small increase in overall perfor-
mance, as well as more flexibility with tuning hotness thresholds.
Once a loop is blacklisted we never call into the trace monitor for
that loop (see Section 3.3).
Recording is activated by a pointer swap that sets the inter-
preter’s dispatch table to call a single “interrupt” routine for ev-
ery bytecode. The interrupt routine first calls a bytecode-specific
recording routine. Then, it turns off recording if necessary (e.g.,
the trace ended). Finally, it jumps to the standard interpreter byte-
code implementation. Some bytecodes have effects on the type map
that cannot be predicted before executing the bytecode (e.g., call-
ing
String.charCodeAt
, which returns an integer or
NaN
if the
index argument is out of range). For these, we arrange for the inter-
preter to call into the recorder again after executing the bytecode.
Since such hooks are relatively rare, we embed them directly into
the interpreter, with an additional runtime check to see whether a
recorder is currently active.
While separating the interpreter from the recorder reduces indi-
vidual code complexity,it also requires careful implementation and
extensive testing to achieve semantic equivalence.
In some cases achieving this equivalence is difficult since Spi-
derMonkey follows a
fat-bytecode
design, which was found to be
beneficial to pure interpreter performance.
In fat-bytecode designs, individual bytecodes can implement
complex processing (e.g., the
getprop
bytecode, which imple-
ments full JavaScript property value access, including special cases
for cached and dense array access).
Fat bytecodes have two advantages: fewer bytecodes means
lower dispatch cost, and bigger bytecode implementations give the
compiler more opportunities to optimize the interpreter.
Fat bytecodes are a problem for TraceMonkey because they
require the recorder to reimplement the same special case logic
in the same way. Also, the advantages are reduced because (a)
dispatch costs are eliminated entirely in compiled traces, (b) the
traces contain only one special case, not the interpreter’s large
chunk of code, and (c) TraceMonkey spends less time running the
base interpreter.
One way we have mitigated these problems is by implementing
certain complex bytecodes in the recorder as sequences of simple
bytecodes. Expressing the original semantics this way is not too dif-
ficult, and recording simple bytecodes is much easier. This enables
us to retain the advantages of fat bytecodes while avoiding some of
their problems for trace recording. This is particularly effective for
fat bytecodes that recurse back into the interpreter, for example to
convert an object into a primitive value by invoking a well-known
method on the object, since it lets us inline this function call.
It is important to note that we split fat opcodes into thinner op-
codes only during recording. When running purely interpretatively
(i.e. code that has been blacklisted), the interpreter directly and ef-
ficiently executes the fat opcodes.
6.4 Preemption
SpiderMonkey, like many VMs, needs to preempt the user program
periodically. The main reasons are to prevent infinitely looping
scripts from locking up the host system and to schedule GC.
In the interpreter, this had been implemented by setting a “pre-
empt now” flag that was checked on ev
ery backward jump. This
strategy carried over into TraceMonkey: the VM inserts a guard on
the preemption flag at every loop edge. We measured less than a
1% increase in runtime on most benchmarks for this extra guard.
In practice, the cost is detectable only for programs with very short
loops.
We tested and rejected a solution that avoided the guards by
compiling the loop edge as an unconditional jump, and patching
the jump target to an exit routine when preemption is required.
This solution can make the normal case slightly faster
, but then
preemption becomes very slow. The implementation was also very
complex, especially trying to restart execution after the preemption.
6.5 Calling External Functions
Like most interpreters, SpiderMonkey has a foreign function inter-
face (FFI) that allows it to call C builtins and host system functions
(e.g., web browser control and DOM access). The FFI has a stan-
dard signature for JS-callable functions, the key argument of which
is an array of boxed values. External functions called through the
FFI interact with the program state through an interpreter API (e.g.,
to read a property from an argument). There are also certain inter-
preter builtins that do not use the FFI, but interact with the program
state in the same way, such as the
CallIteratorNext
function
used with iterator objects. TraceMonkey must support this FFI in
order to speed up code that interacts with the host system inside hot
loops.
Calling external functions from TraceMonkey is potentially dif-
ficult because traces do not update the interpreter state until exit-
ing. In particular, external functions may need the call stack or the
global variables, but they may be out of date.
For the out-of-date call stack problem, we refactored some of
the interpreter API implementation functions to re-materialize the
interpreter call stack on demand.
We developed a C++ static analysis and annotated some inter-
preter functions in order to verify that the call stack is refreshed
at any point it needs to be used. In order to access the call stack,
a function must be annotated as either F
ORC ES
S
TACK
or R
E
-
QUI RES
S
TACK
. These annotations are also required in order to call
R
EQU IRE S
S
TACK
functions, which are presumed to access the call
stack transitively. F
ORC ES
S
TACK
is a trusted annotation, applied
to only 5 functions, that means the function refreshes the call stack.
R
EQU IRE S
S
TACK
is an untrusted annotation that means the func-
tion may only be called if the call stack has already been refreshed.
Similarly, we detect when host functions attempt to directly
read or write global variables, and force the currently running trace
to side exit. This is necessary since we cache and unbox global
variables into the activation record during trace execution.
Since both call-stack access and global variable access are
rarely performed by host functions, performance is not significantly
affected by these safety mechanisms.
Another problem is that external functions can reenter the inter-
preter by calling scripts, which in turn again might want to access
the call stack or global variables. To address this problem, we made
the VM set a flag whenever the interpreter is reentered while a com-
piled trace is running.
Every call to an external function then checks this flag and exits
the trace immediately after returning from the external function call
if it is set. There are many external functions that seldom or never
reenter, and they can be called without problem, and will cause
trace exit only if necessary.
The FFI’
s boxed value array requirement has a performance
cost, so we defined a new FFI that allows C functions to be an-
notated with their argument types so that the tracer can call them
directly, without unnecessary argument conversions.
Currently, we do not support calling native property get and set
override functions or DOM functions directly from trace. Support
is planned future work.
6.6 Correctness
During development, we had access to existing JavaScript test
suites, but most of them were not designed with tracing VMs in
mind and contained few loops.
One tool that helped us greatly was Mozilla’s JavaScript fuzz
tester,
JSF UNF UZZ
, which generates random JavaScript programs
by nesting random language elements. We modified
JSF UNF UZZ
to generate loops, and also to test more heavily certain constructs
we suspected would reveal flaws in our implementation. For exam-
ple, we suspected bugs in TraceMonkey’shandling of type-unstable
!"#
$!"#
%!"#
&!"#
'!"#
(!"#
)!"#
*!"#
+!"#
,!"#
$!!"#
&-./012#3%4%56#
&-.789:;#3%4,56#
&-.9<=>9</2#3$4%56#
<//2??.1@A<9=.>922?#3!4,56#
<//2??.B<AAC0/;#3%4%56#
<//2??.A18-=#3'4%56#
<//2??.A?@2D2#3&4!56#
1@>8:?.&1@>.1@>?.@A.1=>2#3%(4(56#
1@>8:?.1@>?.@A.1=>2#3+4*56#
1@>8:?.1@>E@?2.<A-#3%(4%56#
1@>8:?.A?@2D2.1@>?#3%4*56#
/8A>98FG8E.92/09?@D2#3$4!56#
/9=:>8.<2?#3$4)56#
/9=:>8.7-(#3%4&56#
/9=:>8.?;<$#3(4,56#
-<>2.B897<>.>8H2#3$4$56#
-<>2.B897<>.5:<91#3$4!56#
7<>;./89-@/#3'4,56#
7<>;.:<9I<F.?07?#3(4,56#
7<>;.?:2/>9<F.A897#3*4$56#
92J25:.-A<#3'4%56#
?>9@AJ.1<?2)'#3%4(56#
?>9@AJ.B<?><#3$4(56#
?>9@AJ.><J/F80-#3$4$56#
?>9@AJ.0A:</C./8-2#3$4%56#
?>9@AJ.D<F@-<>2.@A:0>#3$4,56#
KA>29:92>#
L<ID2#
Figure 11. Fraction of dynamic bytecodes executed by inter-
preter and on native traces.
The speedup vs. interpreter is shown
in parentheses next to each test. The fraction of bytecodes exe-
cuted while recording is too small to see in this figure, except
for
crypto-md5
, where fully 3% of bytecodes are executed while
recording. In most of the tests, almost all the bytecodes are exe-
cuted by compiled traces. Three of the benchmarks are not traced
at all and run in the interpreter.
loops and heavily branching code, and a specialized fuzz tester in-
deed revealed several regressions which we subsequently corrected.
7. Evaluation
We evaluated our JavaScript tracing implementation using Sun-
Spider, the industry standard JavaScript benchmark suite. SunSpi-
der consists of 26 short-running (less than 250ms, average 26ms)
JavaScript programs. This is in stark contrast to benchmark suites
such as SpecJVM98 (3) used to evaluate desktop and server Jav
a
VMs. Many programs in those benchmarks use large data sets and
execute for minutes. The SunSpider programs carry out a variety of
tasks, primarily 3d rendering, bit-bashing, cryptographic encoding,
math kernels, and string processing.
All experiments were performed on a MacBook Pro with 2.2
GHz Core 2 processor and 2 GB RAM running MacOS 10.5.
Benchmark results.
The main question is whether programs
run faster with tracing. For this, we ran the standard SunSpider test
driver, which starts a JavaScript interpreter, loads and runs each
program once for warmup, then loads and runs each program 10
times and reports the average time taken by each. We ran 4 differ-
ent configurations for comparison: (a) SpiderMonkey, the baseline
interpreter, (b) TraceMonkey, (d) SquirrelFish Extreme (SFX), the
call-threaded JavaScript interpreter used in Apple’
s WebKit, and
(e) V8, the method-compiling JavaScript VM from Google.
Figure 10 shows the relative speedups achieved by tracing, SFX,
and V8 against the baseline (SpiderMonkey). Tracing achieves the
best speedups in integer-heavy benchmarks, up to the 25x speedup
on
bitops-bitwise-and
.
TraceMonkey is the fastest VM on 9 of the 26 benchmarks
(
3d-morph
,
bitops-3bit-bits-in-byte
,
bitops-bitwise-
and
,
crypto-sha1
,
math-cordic
,
math-partial-sums
,
math-
spectral-norm
,
string-base64
,
string-validate-input
).
!"
#"
$!"
$#"
%!"
%#"
&'()*+,"
-./"
01"
Figure 10.
Speedup vs. a baseline JavaScript interpreter (SpiderMonkey) for our trace-based JIT compiler, Apple’s SquirrelFish Extreme
inline threading interpreter and Google’s V8 JS compiler. Our system generates particularly efficient code for programs that benefit most from
type specialization, which includes SunSpider Benchmark programs that perform bit manipulation. We type-specialize the code in question
to use integer arithmetic, which substantially improves performance. For one of the benchmark programs we execute 25 times faster than
the SpiderMonkey interpreter, and almost 5 times faster than V8 and SFX. For a large number of benchmarks all three VMs produce similar
results. We perform worst on benchmark programs that we do not trace and instead fall back onto the interpreter. This includes the recursive
benchmarks
access-binary-trees
and
control-flow-recursive
, for which we currently don’t generate any native code.
In particular, the
bitops
benchmarks are short programs that per-
form many bitwise operations, so TraceMonkey can cover the en-
tire program with 1 or 2 traces that operate on integers. TraceMon-
key runs all the other programs in this set almost entirely as native
code.
regexp-dna
is dominated by regular expression matching,
which is implemented in all 3 VMs by a special regular expression
compiler. Thus, performance on this benchmark has little relation
to the trace compilation approach discussed in this paper.
TraceMonkey’
s smaller speedups on the other benchmarks can
be attributed to a few specific causes:
The implementation does not currently trace recursion, so
TraceMonkey achieves a small speedup or no speedup on
benchmarks that use recursion extensively:
3d-cube
,
3d-
raytrace
,
access-binary-trees
,
string-tagcloud
, and
controlflow-recursive
.
The implementation does not currently trace
eval
and some
other functions implemented in C. Because
date-format-
tofte
and
date-format-xparb
use such functions in their
main loops, we do not trace them.
The implementation does not currently trace through regular
expression
replace
operations. The replace function can be
passed a function object used to compute the replacement text.
Our implementation currently does not trace functions called
as replace functions. The run time of
string-unpack-code
is
dominated by such a
replace
call.
Two programs trace well, but have a long compilation time.
access-nbody
forms a large number of traces (81).
crypto-md5
forms one very long trace. We expect to improve performance
on this programs by improving the compilation speed of nano-
jit.
Some programs trace very well, and speed up compared to
the interpreter, but are not as fast as SFX and/or V8, namely
bitops-bits-in-byte
,
bitops-nsieve-bits
,
access-
fannkuch
,
access-nsieve
, and
crypto-aes
. The reason is
not clear, but all of these programs have nested loops with
small bodies, so we suspect that the implementation has a rela-
tively high cost for calling nested traces.
string-fasta
traces
well, but its run time is dominated by string processing builtins,
which are unaffected by tracing and seem to be less efficient in
SpiderMonkey than in the two other VMs.
Detailed performance metrics.
In Figure 11 we show the frac-
tion of instructions interpreted and the fraction of instructions exe-
cuted as native code. This figure shows that for many programs, we
are able to execute almost all the code natively
.
Figure 12 breaks down the total execution time into four activ-
ities: interpreting bytecodes while not recording, recording traces
(including time taken to interpret the recorded trace), compiling
traces to native code, and executing native code traces.
These detailed metrics allow us to estimate parameters for a
simple model of tracing performance. These estimates should be
considered very rough, as the values observed on the individual
benchmarks hav
e large standard deviations (on the order of the
Loops Trees Traces Aborts Flushes Trees/Loop Traces/Tree Traces/Loop Speedup
3d-cube 25 27 29 3 0 1.1 1.1 1.2 2.20x
3d-morph 5 8 8 2 0 1.6 1.0 1.6 2.86x
3d-raytrace 10 25 100 10 1 2.5 4.0 10.0 1.18x
access-binary-trees 0 0 0 5 0 - - - 0.93x
access-fannkuch 10 34 57 24 0 3.4 1.7 5.7 2.20x
access-nbody 8 16 18 5 0 2.0 1.1 2.3 4.19x
access-nsieve 3 6 8 3 0 2.0 1.3 2.7 3.05x
bitops-3bit-bits-in-byte 2 2 2 0 0 1.0 1.0 1.0 25.47x
bitops-bits-in-byte 3 3 4 1 0 1.0 1.3 1.3 8.67x
bitops-bitwise-and 1 1 1 0 0 1.0 1.0 1.0 25.20x
bitops-nsieve-bits 3 3 5 0 0 1.0 1.7 1.7 2.75x
controlflow-recursive 0 0 0 1 0 - - - 0.98x
crypto-aes 50 72 78 19 0 1.4 1.1 1.6 1.64x
crypto-md5 4 4 5 0 0 1.0 1.3 1.3 2.30x
crypto-sha1 5 5 10 0 0 1.0 2.0 2.0 5.95x
date-format-tofte 3 3 4 7 0 1.0 1.3 1.3 1.07x
date-format-xparb 3 3 11 3 0 1.0 3.7 3.7 0.98x
math-cordic 2 4 5 1 0 2.0 1.3 2.5 4.92x
math-partial-sums 2 4 4 1 0 2.0 1.0 2.0 5.90x
math-spectral-norm15 20 20 0 0 1.3 1.0 1.3 7.12x
regexp-dna 2 2 2 0 0 1.0 1.0 1.0 4.21x
string-base64 3 5 7 0 0 1.7 1.4 2.3 2.53x
string-fasta 5 11 15 6 0 2.2 1.4 3.0 1.49x
string-tagcloud 3 6 6 5 0 2.0 1.0 2.0 1.09x
string-unpack-code 4 4 37 0 0 1.0 9.3 9.3 1.20x
string-validate-input 6 10 13 1 0 1.7 1.3 2.2 1.86x
Figure 13.
Detailed trace recording statistics for the SunSpider benchmark set.
mean). We exclude
regexp-dna
from the following calculations,
because most of its time is spent in the regular expression matcher,
which has much different performance characteristics from the
other programs. (Note that this only makes a difference of about
10% in the results.) Dividing the total execution time in processor
clock cycles by the number of bytecodes executed in the base
interpreter shows that on average, a bytecode executes in about
35 cycles. Native traces take about 9 cycles per bytecode, a 3.9x
speedup over the interpreter.
Using similar computations, we find that trace recording takes
about 3800 cycles per bytecode, and compilation 3150 cycles per
bytecode. Hence, during recording and compiling the VM runs at
1/200 the speed of the interpreter. Because it costs 6950 cycles to
compile a bytecode, and we save 26 cycles each time that code is
run natively, we break even after running a trace 270 times.
The other VMs we compared with achieve an overall speedup
of 3.0x relative to our baseline interpreter
. Our estimated native
code speedup of 3.9x is significantly better. This suggests that
our compilation techniques can generate more efficient native code
than any other current JavaScript VM.
These estimates also indicate that our startup performance could
be substantially better if we improved the speed of trace recording
and compilation. The estimated 200x slowdown for recording and
compilation is very rough, and may be influenced by startup factors
in the interpreter (e.g., caches that have not warmed up yet during
recording). One observation supporting this conjecture is that in
the tracer, interpreted bytecodes take about 180 cycles to run. Still,
recording and compilation are clearly both expensive, and a better
implementation, possibly including redesign of the LIR abstract
syntax or encoding, would improve startup performance.
Our performance results confirm that type specialization using
trace trees substantially improves performance. We are able to
outperform the fastest available JavaScript compiler (V8) and the
fastest available JavaScript inline threaded interpreter (SFX) on 9
of 26 benchmarks.
8. Related Work
Trace optimization for dynamic languages.
The closest area of
related work is on applying trace optimization to type-specialize
dynamic languages. Existing work shares the idea of generating
type-specialized code speculatively with guards along interpreter
traces.
To our knowledge, Rigo’s Psyco (16) is the only published
type-specializing trace compiler for a dynamic language (Python).
Psyco does not attempt to identify hot loops or inline function calls.
Instead, Psyco transforms loops to mutual recursion before running
and traces all operations.
Pall’s LuaJIT is a Lua VM in development that uses trace com-
pilation ideas. (1). There are no publications on LuaJIT but the cre-
ator has told us that LuaJIT has a similar design to our system, but
will use a less aggressiv
e type speculation (e.g., using a floating-
point representation for all number values) and does not generate
nested traces for nested loops.
General trace optimization.
General trace optimization has
a longer history that has treated mostly native code and typed
languages like Java. Thus, these systems have focused less on type
specialization and more on other optimizations.
Dynamo (7) by Bala et al, introduced native code tracing as a
replacement for profile-guided optimization (PGO). A major goal
was to perform PGO online so that the profile was specific to
the current execution. Dynamo used loop headers as candidate hot
traces, but did not try to create loop traces specifically.
Trace trees were originally proposed by Gal et al. (11) in the
context of Java, a statically typed language. Their trace trees ac-
tually inlined parts of outer loops within the inner loops (because
!"#
$!"#
%!"#
&!"#
'!"#
(!!"#
)*+,-./#0$1$23#
)*+45678#0$1923#
)*+6:;<6:,/#0(1$23#
:,,/==+.>?:6;+<6//=#0!1923#
:,,/==+@:??A-,8#0$1$23#
:,,/==+?.5*;#0%1$23#
:,,/==+?=>/B/#0)1!23#
.><57=+).><+.><=+>?+.;</#0$C1C23#
.><57=+.><=+>?+.;</#0'1D23#
.><57=+.><E>=/+:?*#0$C1$23#
.><57=+?=>/B/+.><=#0$1D23#
,5?<65FG5E+6/,-6=>B/#0(1!23#
,6;7<5+:/=#0(1&23#
,6;7<5+4*C#0$1)23#
,6;7<5+=8:(#0C1923#
*:</+@564:<+<5H/#0(1(23#
*:</+@564:<+27:6.#0(1!23#
4:<8+,56*>,#0%1923#
4:<8+7:6I:F+=-4=#0C1923#
4:<8+=7/,<6:F+?564#0D1(23#
6/J/27+*?:#0%1$23#
=<6>?J+.:=/&%#0$1C23#
=<6>?J+@:=<:#0(1C23#
=<6>?J+<:J,F5-*#0(1(23#
=<6>?J+-?7:,A+,5*/#0(1$23#
=<6>?J+B:F>*:</+>?7-<#0(1923#
K?</676/<#
L5?><56#
M/,56*#
N547>F/#
N:FF#O6:,/#
M-?#O6:,/#
Figure 12. Fraction of time spent on major VM activities.
The
speedup vs. interpreter is shown in parentheses next to each test.
Most programs where the VM spends the majority of its time run-
ning native code have a good speedup. Recording and compilation
costs can be substantial; speeding up those parts of the implemen-
tation would improve SunSpider performance.
inner loops become hot first), leading to much greater tail duplica-
tion.
YETI, from Zaleski et al. (19) applied Dynamo-style tracing
to Java in order to achieve inlining, indirect jump elimination,
and other optimizations. Their primary focus was on designing an
interpreter that could easily be gradually re-engineered as a tracing
VM.
Suganuma et al. (18) described region-based compilation (RBC),
a relative of tracing. A region is an subprogram worth optimizing
that can include subsets of any number of methods. Thus, the com-
piler has more flexibility and can potentially generate better code,
but the profiling and compilation systems are correspondingly more
complex.
Type specialization for dynamic languages.
Dynamic lan-
guage implementors have long recognized the importance of type
specialization for performance. Most previous work has focused on
methods instead of traces.
Chambers et. al (9) pioneered the idea of compiling multiple
versions of a procedure specialized for the input types in the lan-
guage Self. In one implementation, they generated a specialized
method online each time a method was called with new input types.
In another, they used an offline whole-program static analysis to
infer input types and constant receiver types at call sites. Interest-
ingly, the two techniques produced nearly the same performance.
Salib (17) designed a type inference algorithm for Python based
on the Cartesian Product Algorithm and used the results to special-
ize on types and translate the program to C++.
McCloskey (14) has work in progress based on a language-
independent type inference that is used to generate efficient C
implementations of JavaScript and Python programs.
Native code generation by interpreters.
The traditional inter-
preter design is a virtual machine that directly executes ASTs or
machine-code-like bytecodes. Researchers have shown how to gen-
erate native code with nearly the same structure but better perfor-
mance.
Call threading, also known as context threading (8), compiles
methods by generating a native call instruction to an interpreter
method for each interpreter bytecode. A call-return pair has been
shown to be a potentially much more efficient dispatch mechanism
than the indirect jumps used in standard bytecode interpreters.
Inline threading (15) copies chunks of interpreter native code
which implement the required bytecodes into a native code cache,
thus acting as a simple per-method JIT compiler that eliminates the
dispatch overhead.
Neither call threading nor inline threading perform type special-
ization.
Apple’s SquirrelFish Extreme (5) is a JavaScript implementa-
tion based on call threading with selective inline threading. Com-
bined with efficient interpreter engineering, these threading tech-
niques have given SFX excellent performance on the standard Sun-
Spider benchmarks.
Google’s V8 is a JavaScript implementation primarily based
on inline threading, with call threading only for very complex
operations.
9. Conclusions
This paper described how to run dynamic languages efficiently by
recording hot traces and generating type-specialized native code.
Our technique focuses on aggressively inlined loops, and for each
loop, it generates a tree of native code traces representing the
paths and value types through the loop observed at run time. We
explained how to identify loop nesting relationships and generate
nested traces in order to avoid excessive code duplication due
to the many paths through a loop nest. We described our type
specialization algorithm. W
e also described our trace compiler,
which translates a trace from an intermediate representation to
optimized native code in two linear passes.
Our experimental results show that in practice loops typically
are entered with only a few different combinations of value types
of variables. Thus, a small number of traces per loop is sufficient
to run a program efficiently
. Our experiments also show that on
programs amenable to tracing, we achieve speedups of 2x to 20x.
10. Future W
ork
Work is underway in a number of areas to further improve the
performance of our trace-based JavaScript compiler. We currently
do not trace across recursive function calls, but plan to add the
support for this capability in the near term. We are also exploring
adoption of the existing work on tree recompilation in the context
of the presented dynamic compiler in order to minimize JIT pause
times and obtain the best of both worlds, fast tree stitching as well
as the improved code quality due to tree recompilation.
We also plan on adding support for tracing across regular ex-
pression substitutions using lambda functions, function applica-
tions and expression evaluation using
eval
. All these language
constructs are currently executed via interpretation, which limits
our performance for applications that use those features.
Acknowledgments
Parts of this effort have been sponsored by the National Science
Foundation under grants CNS-0615443 and CNS-0627747, as well
as by the California MICRO Program and industrial sponsor Sun
Microsystems under Project No. 07-127.
The U.S. Government is authorized to reproduce and distribute
reprints for Governmental purposes notwithstanding any copyright
annotation thereon. Any opinions, findings, and conclusions or rec-
ommendations expressed here are those of the author and should
not be interpreted as necessarily representing the official views,
policies or endorsements, either expressed or implied, of the Na-
tional Science foundation (NSF), any other agency of the U.S. Gov-
ernment, or any of the companies mentioned above.
References
[1] LuaJIT roadmap 2008 - http://lua-users.org/lists/lua-l/2008-
02/msg00051.html.
[2] Mozilla Firefox web browser and Thunderbird email client -
http://www.mozilla.com.
[3] SPECJVM98 - http://www.spec.org/jvm98/.
[4] SpiderMonkey (JavaScript-C) Engine -
http://www.mozilla.org/js/spidermonkey/.
[5] Surfin’ Safari - Blog Archive - Announcing SquirrelFish Extreme -
http://webkit.org/blog/214/introducing-squirrelfish-extreme/.
[6] A. Aho, R. Sethi, J. Ullman, and M. Lam. Compilers: Principles,
techniques, and tools, 2006.
[7] V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: A transparent
dynamic optimization system. In
Proceedings of the ACM SIGPLAN
Conference on Programming Language Design and Implementation
,
pages 1–12. ACM Press, 2000.
[8] M. Berndl, B. Vitale, M. Zaleski, and A. Brown. Context Threading:
a Flexible and Efficient Dispatch Technique for Virtual Machine In-
terpreters. In
Code Generation and Optimization, 2005. CGO 2005.
International Symposium on
, pages 15–26, 2005.
[9] C. Chambers and D. Ungar. Customization: Optimizing Compiler
Technology for SELF, a Dynamically-Typed O bject-Oriented Pro-
gramming Language. In
Proceedings of the ACM SIGPLAN 1989
Conference on Programming Language Design and Implementation
,
pages 146–160. ACM New York, NY, USA, 1989.
[10] A. Gal.
Efficient Bytecode Verification and Compilation in a Virtual
Machine Dissertation
. PhD thesis, University Of California, Irvine,
2006.
[11] A. Gal, C. W. Probst, and M. Franz. HotpathVM: An effective JIT
compiler for resource-constrained devices. In
Proceedings of the
International Conference on Virtual Execution Environments
, pages
144–153. ACM Press, 2006.
[12] C. Garrett, J. Dean, D. Grove, and C. Chambers. Measurement and
Application of Dynamic Receiver Class Distributions. 1994.
[13] J. Ha, M. R. Haghighat, S. Cong, and K. S. McKinley. A concurrent
trace-based just-in-time compiler for javascript. Dept.of Computer
Sciences, The University of Texas at Austin, TR-09-06, 2009.
[14] B. McCloskey. Personal communication.
[15] I. Piumarta and F. Riccardi. Optimizing direct threaded code by selec-
tive inlining. In
Proceedings of the ACM SIGPLAN 1998 conference
on Programming language design and implementation
, pages 291–
300. ACM New York, NY
, USA, 1998.
[16] A. Rigo. Representation-Based Just-In-time Specialization and the
Psyco Prototype for Python. In
PEPM
, 2004.
[17] M. Salib. Starkiller: A Static Type Inferencer and Compiler for
Python. In
Master’s Thesis
, 2004.
[18] T. Suganuma, T. Yasue, and T. Nakatani. A Region-Based Compila-
tion Technique for Dynamic Compilers.
ACM Transactions on Pro-
gramming Languages and Systems (TOPLAS)
, 28(1):134–174, 2006.
[19] M. Zaleski, A. D. Brown, and K. Stoodley. YETI: A graduallY
Extensible Trace Interpreter. In
Proceedings of the International
Conference on Virtual Execution Environments
, pages 83–93. ACM
Press, 2007.
\ No newline at end of file diff --git a/demo/demo.pdf b/demo/demo.pdf new file mode 100644 index 0000000..6557018 Binary files /dev/null and b/demo/demo.pdf differ diff --git a/demo/f1.otf b/demo/f1.otf new file mode 100644 index 0000000..a6271e6 Binary files /dev/null and b/demo/f1.otf differ diff --git a/demo/f10.otf b/demo/f10.otf new file mode 100644 index 0000000..5e81059 Binary files /dev/null and b/demo/f10.otf differ diff --git a/demo/f11.ttf b/demo/f11.ttf new file mode 100644 index 0000000..e3202d9 Binary files /dev/null and b/demo/f11.ttf differ diff --git a/demo/f12.ttf b/demo/f12.ttf new file mode 100644 index 0000000..6da24ef Binary files /dev/null and b/demo/f12.ttf differ diff --git a/demo/f13.ttf b/demo/f13.ttf new file mode 100644 index 0000000..2e850d6 Binary files /dev/null and b/demo/f13.ttf differ diff --git a/demo/f14.otf b/demo/f14.otf new file mode 100644 index 0000000..a36e48f Binary files /dev/null and b/demo/f14.otf differ diff --git a/demo/f15.ttf b/demo/f15.ttf new file mode 100644 index 0000000..c770b94 Binary files /dev/null and b/demo/f15.ttf differ diff --git a/demo/f16.ttf b/demo/f16.ttf new file mode 100644 index 0000000..c0ed7cd Binary files /dev/null and b/demo/f16.ttf differ diff --git a/demo/f17.ttf b/demo/f17.ttf new file mode 100644 index 0000000..a6f8500 Binary files /dev/null and b/demo/f17.ttf differ diff --git a/demo/f18.ttf b/demo/f18.ttf new file mode 100644 index 0000000..363b6f8 Binary files /dev/null and b/demo/f18.ttf differ diff --git a/demo/f2.otf b/demo/f2.otf new file mode 100644 index 0000000..52ff905 Binary files /dev/null and b/demo/f2.otf differ diff --git a/demo/f3.otf b/demo/f3.otf new file mode 100644 index 0000000..064af66 Binary files /dev/null and b/demo/f3.otf differ diff --git a/demo/f4.otf b/demo/f4.otf new file mode 100644 index 0000000..70151f1 Binary files /dev/null and b/demo/f4.otf differ diff --git a/demo/f5.otf b/demo/f5.otf new file mode 100644 index 0000000..12ea83d Binary files /dev/null and b/demo/f5.otf differ diff --git a/demo/f6.otf b/demo/f6.otf new file mode 100644 index 0000000..835ca9d Binary files /dev/null and b/demo/f6.otf differ diff --git a/demo/f7.otf b/demo/f7.otf new file mode 100644 index 0000000..12f624d Binary files /dev/null and b/demo/f7.otf differ diff --git a/demo/f8.otf b/demo/f8.otf new file mode 100644 index 0000000..41a4c89 Binary files /dev/null and b/demo/f8.otf differ diff --git a/demo/f9.otf b/demo/f9.otf new file mode 100644 index 0000000..1fb3ccb Binary files /dev/null and b/demo/f9.otf differ diff --git a/demo/fa.otf b/demo/fa.otf new file mode 100644 index 0000000..589dac1 Binary files /dev/null and b/demo/fa.otf differ diff --git a/demo/fb.otf b/demo/fb.otf new file mode 100644 index 0000000..1b9c8ac Binary files /dev/null and b/demo/fb.otf differ diff --git a/demo/fc.otf b/demo/fc.otf new file mode 100644 index 0000000..cdcd772 Binary files /dev/null and b/demo/fc.otf differ diff --git a/demo/fd.ttf b/demo/fd.ttf new file mode 100644 index 0000000..e1ecae9 Binary files /dev/null and b/demo/fd.ttf differ diff --git a/demo/fe.ttf b/demo/fe.ttf new file mode 100644 index 0000000..82eebff Binary files /dev/null and b/demo/fe.ttf differ diff --git a/demo/ff.otf b/demo/ff.otf new file mode 100644 index 0000000..f11267d Binary files /dev/null and b/demo/ff.otf differ diff --git a/src/HTMLRenderer.cc b/src/HTMLRenderer.cc new file mode 100644 index 0000000..59602e1 --- /dev/null +++ b/src/HTMLRenderer.cc @@ -0,0 +1,918 @@ +/* + * HTMLRenderer.cc + * + * Copyright (C) 2011 by Hongliang TIAN(tatetian@gmail.com) + * Copyright (C) 2012 by Lu Wang coolwanglugmail.com + */ + +/* + * TODO + * color + * transformation + * remove line break for divs in the same line + * + * updatetextmat, position etc. + * + * font base64 embedding + * custom css + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "HTMLRenderer.h" + +/* + * CSS classes + * + * p - Page + * t - Transform + * l - Line + * + * + * Reusable CSS classes + * + * f - Font (also for font names) + * s - font Size + * w - White space + * t - Transform matrix (for both CTM and Text Matrix) + */ + +const char * HTML_HEAD = "\n\ +\ +\ +\ +\ +
"; + +const char * HTML_TAIL = "
"; + +const std::map BASE_14_FONT_CSS_FONT_MAP({\ + { "Courier", "Courier,monospace" },\ + { "Helvetica", "Helvetica,Arial,\"Nimbus Sans L\",sans-serif" },\ + { "Times", "Times,\"Time New Roman\",\"Nimbus Roman No9 L\",serif" },\ + { "Symbol", "Symbol" },\ + { "ZapfDingbats", "ZapfDingbats" },\ +}); + +TextString::TextString(GfxState *state) + :unicodes() + ,x(state->getCurX()), y(state->getCurY()) + ,width(0),height(0) + ,state(state) +{ } + +TextString::~TextString() +{ + delete state; + state = nullptr; +} + +void TextString::addChar(GfxState *state, double x, double y, + double dx, double dy, Unicode u) +{ + if (0 < u && u != 9 && u < 32) // skip non-printable not-tab character + return; + + /* + if (unicodes.empty()) + { + this->x = x; + this->y = y; + } + */ + unicodes.push_back(u); + + width += dx; + height += dy; +} + + +HTMLRenderer::HTMLRenderer(const Param * param) + :cur_string(nullptr), cur_line(nullptr) + ,cur_line_x_offset(0) + ,cur_fs_id(0), cur_fn_id(0) + ,html_fout(param->output_filename.c_str(), ofstream::binary), allcss_fout("all.css") + ,param(param) +{ + // install default font & size + install_font(nullptr); + install_font_size(0); + + html_fout << HTML_HEAD; + if(param->readable) html_fout << endl; + + for(int i = 0; i < 6; ++i) + ctm[i] = text_mat[i] = 0.0; + ctm[0] = text_mat[0] = ctm[3] = text_mat[3] = 1.0; +} + +HTMLRenderer::~HTMLRenderer() +{ + html_fout << HTML_TAIL; + if(param->readable) html_fout << endl; +} + +void HTMLRenderer::process(PDFDoc *doc) +{ + xref = doc->getXRef(); + for(int i = param->first_page; i <= param->last_page ; ++i) { + doc->displayPage(this, i, param->h_dpi, param->v_dpi, + 0, true, false, false, + nullptr, nullptr, nullptr, nullptr); + } +} + +void HTMLRenderer::startPage(int pageNum, GfxState *state) +{ + this->pageNum = pageNum; + this->pageWidth=static_cast(state->getPageWidth()); + this->pageHeight=static_cast(state->getPageHeight()); + + assert(cur_line == nullptr); + + html_fout << boost::format("
"; + if(param->readable) html_fout << endl; + + // default CTM + html_fout << "
"; + if(param->readable) html_fout << endl; +} + +void HTMLRenderer::endPage() { + close_cur_line(); + // close CTM + html_fout << "
"; + if(param->readable) html_fout << endl; + // close page + html_fout << "
"; + if(param->readable) html_fout << endl; +} + +void HTMLRenderer::convert_transform_matrix(double * tm) +{ + tm[1] = -tm[1]; + tm[2] = -tm[2]; + tm[5] = -tm[5]; +} + +bool HTMLRenderer::at_same_line(const TextString * ts1, const TextString * ts2) const +{ + if(!(std::abs(ts1->getY() - ts2->getY()) < param->v_eps)) + return false; + + GfxState * s1 = ts1->getState(); + GfxState * s2 = ts2->getState(); + + if(!(_equal(s1->getCharSpace(), s2->getCharSpace()) + && _equal(s1->getWordSpace(), s2->getWordSpace()) + && _equal(s1->getHorizScaling(), s2->getHorizScaling()))) + return false; + + /* + no need for this, as we track TM now + if(!(_tm_equal(s1->getCTM(), s2->getCTM()) && _tm_equal(s1->getTextMat(), s2->getTextMat()))) + return false; + */ + + return true; +} + +void HTMLRenderer::close_cur_line() +{ + if(cur_line != nullptr) + { + html_fout << ""; + if(param->readable) html_fout << endl; + + delete cur_line; + cur_line = nullptr; + cur_line_x_offset = 0; + } +} + +void HTMLRenderer::outputTextString(TextString * str) +{ + for (auto u : str->getUnicodes()) + { + switch(u) + { + case '&': + html_fout << "&"; + break; + case '\"': + html_fout << """; + break; + case '\'': + html_fout << "'"; + break; + case '<': + html_fout << "<"; + break; + case '>': + html_fout << ">"; + break; + default: + { + char buf[4]; + auto n = mapUTF8(u, buf, 4); + if(n > 0) + html_fout.write(buf, n); + } + } + } +} + +void HTMLRenderer::updateCTM(GfxState * state, double m11, double m12, double m21, double m22, double m31, double m32) +{ + double new_ctm[6]; + memcpy(new_ctm, state->getCTM(), sizeof(new_ctm)); + convert_transform_matrix(new_ctm); + + if(!_tm_equal(ctm, new_ctm)) + { + close_cur_line(); + memcpy(ctm, new_ctm, sizeof(ctm)); + + // close old CTM div and create a new one + html_fout << ""; + if(param->readable) html_fout << endl; + html_fout << boost::format("
") % install_transform_matrix(ctm); + if(param->readable) html_fout << endl; + } +} + +void HTMLRenderer::updateFont(GfxState *state) { + long long new_fn_id = install_font(state->getFont()); + long long new_fs_id = install_font_size(state->getFontSize()); + if(!((new_fn_id == cur_fn_id) && (new_fs_id == cur_fs_id))) + { + close_cur_line(); + cur_fn_id = new_fn_id; + cur_fs_id = new_fs_id; + } +} + +void HTMLRenderer::updateTextMat(GfxState * state) +{ + double new_text_mat[6]; + memcpy(new_text_mat, state->getTextMat(), sizeof(new_text_mat)); + convert_transform_matrix(new_text_mat); + + if(!_tm_equal(text_mat, new_text_mat)) + { + close_cur_line(); + memcpy(text_mat, new_text_mat, sizeof(text_mat)); + + //debug + //TODO: why + text_mat[4] = text_mat[5] = 0.0; + } +} + +void HTMLRenderer::beginString(GfxState *state, GooString *s) { + // TODO: remove this + GfxState * new_state = state->copy(gTrue); + + cur_string = new TextString(new_state); +} + +void HTMLRenderer::endString(GfxState *state) { + if (cur_string->getSize() == 0) { + delete cur_string ; + return; + } + + // try to merge with last line + if(cur_line != nullptr) + { + if(at_same_line(cur_line, cur_string)) + { + double x1 = cur_line->getX() + cur_line->getWidth(); + double x2 = cur_string->getX(); + double target = x2-x1-cur_line_x_offset; + + if(target > -param->h_eps) + { + if(target > param->h_eps) + { + double w; + auto wid = install_whitespace(target, w); + cur_line_x_offset = w-target; + html_fout << boost::format(" ") % wid; + } + else + { + cur_line_x_offset = -target; + } + + outputTextString(cur_string); + + delete cur_line; + cur_line = cur_string; + cur_string = nullptr; + return; + } + } + } + + close_cur_line(); + + // TODO: optimize text matrix search/install + html_fout << boost::format("
getY()) << "px;" + << "left:" << cur_string->getX() << "px;" +// << "height:" << cur_string->getHeight() << "px;" + ; + + // letter & word spacing + GfxState * cur_state = cur_string -> getState(); + if(_is_positive(cur_state->getCharSpace())) + html_fout << "letter-spacing:" << cur_state->getCharSpace() << "px;"; + if(_is_positive(cur_state->getWordSpace())) + html_fout << "word-spacing:" << cur_state->getWordSpace() << "px;"; + + //debug + { + html_fout << "\""; + double x,y; + cur_state->transform(cur_state->getCurX(), cur_state->getCurY(), &x, &y); + html_fout << boost::format(" data-x=\"%1%\" data-y=\"%2%")%x%y; + } + + html_fout << "\">"; + + outputTextString(cur_string); + + cur_line = cur_string; + cur_string = nullptr; + cur_line_x_offset = 0; + + // HERE + //debug +// close_cur_line(); +} + +void HTMLRenderer::drawChar(GfxState *state, double x, double y, + double dx, double dy, + double originX, double originY, + CharCode code, int /*nBytes*/, Unicode *u, int uLen) +{ + double x1, y1, w1, h1; + + x1 = x; + y1 = y; + + // if it is hidden, then return + if ((state->getRender() & 3) == 3) + return ; + + // TODO: + // not on the same line + if (!_equal(cur_string->getY(), y1)){ + std::cerr << "TODO: line break in a string" << std::endl; + } + + w1 = dx - state->getCharSpace() * state->getHorizScaling(), + + h1 = dy; + + if (uLen != 0) { + w1 /= uLen; + h1 /= uLen; + } + + for (int i = 0; i < uLen; ++i) { + cur_string->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, u[i]); + } +} + +// TODO +void HTMLRenderer::drawString(GfxState * state, GooString * s) +{ + auto font = state->getFont(); + if(font->getWMode()) + std::cerr << "TODO: writing mode" << std::endl; + + // stolen from poppler + double dx = 0; + double dy = 0; + double dx2, dy2; + double ox, oy; + + char *p = s->getCString(); + int len = s->getLength(); + int nChars = 0; + int nSpaces = 0; + int uLen; + CharCode code; + Unicode *u = nullptr; + + while (len > 0) { + auto n = font->getNextChar(p, len, &code, &u, &uLen, &dx2, &dy2, &ox, &oy); + dx += dx2; + dy += dy2; + if (n == 1 && *p == ' ') { + ++nSpaces; + } + ++nChars; + p += n; + len -= n; + } + + dx = dx * state->getFontSize() + + nChars * state->getCharSpace() + + nSpaces * state->getWordSpace(); + dx *= state->getHorizScaling(); + dy *= state->getFontSize(); + +} + +// The font installation code is stolen from PSOutputDev.cc in poppler + +long long HTMLRenderer::install_font(GfxFont * font) +{ + assert(sizeof(long long) == 2*sizeof(int)); + + long long fn_id = (font == nullptr) ? 0 : *reinterpret_cast(font->getID()); + auto iter = font_name_map.find(fn_id); + if(iter != font_name_map.end()) + return iter->second.fn_id; + + long long new_fn_id = font_name_map.size(); + + font_name_map.insert(std::make_pair(fn_id, FontInfo({new_fn_id}))); + + if(font == nullptr) + { + export_remote_default_font(new_fn_id); + return new_fn_id; + } + + string new_fn = (boost::format("f%|1$x|") % new_fn_id).str(); + + if(font->getType() == fontType3) { + std::cerr << "TODO: Type 3 font unsupported" << std::endl; + export_remote_default_font(new_fn_id); + return new_fn_id; + } + + auto * font_loc = font->locateFont(xref, gTrue); + if(font_loc != nullptr) + { + switch(font_loc -> locType) + { + case gfxFontLocEmbedded: + switch(font_loc -> fontType) + { + case fontType1: + install_embedded_type1_font(&font_loc->embFontID, new_fn_id); + break; + case fontType1C: + install_embedded_type1c_font(font, new_fn_id); + break; + case fontType1COT: + install_embedded_opentypet1c_font(font, new_fn_id); + break; + case fontTrueType: + case fontTrueTypeOT: + install_embedded_truetype_font(font, new_fn_id); + break; + default: + std::cerr << "TODO: unsuppported embedded font type" << std::endl; + export_remote_default_font(new_fn_id); + break; + } + break; + case gfxFontLocExternal: + std::cerr << "TODO: external font" << std::endl; + export_remote_default_font(new_fn_id); + break; + case gfxFontLocResident: + install_base_font(font, font_loc, new_fn_id); + break; + default: + std::cerr << "TODO: other font loc" << std::endl; + export_remote_default_font(new_fn_id); + break; + } + + delete font_loc; + } + + + return new_fn_id; +} + +void HTMLRenderer::install_embedded_type1_font (Ref * id, long long fn_id) +{ + Object ref_obj, str_obj, ol1, ol2, ol3; + Dict * dict; + + int l1, l2, l3; + int c; + bool is_bin = false; + int buf[4]; + + ofstream tmpf((boost::format("f%|1$x|.pfa")%fn_id).str().c_str(), ofstream::binary); + auto output_char = [&tmpf](int c)->void { + char tmp = (char)(c & 0xff); + tmpf.write(&tmp, 1); + }; + + ref_obj.initRef(id->num, id->gen); + ref_obj.fetch(xref, &str_obj); + ref_obj.free(); + + if(!str_obj.isStream()) + { + std::cerr << "Embedded font is not a stream" << std::endl; + goto err; + } + + dict = str_obj.streamGetDict(); + if(dict == nullptr) + { + std::cerr << "No dict in the embedded font" << std::endl; + goto err; + } + + dict->lookup("Length1", &ol1); + dict->lookup("Length2", &ol2); + dict->lookup("Length3", &ol3); + + if(!(ol1.isInt() && ol2.isInt() && ol3.isInt())) + { + std::cerr << "Length 1&2&3 are not all integers" << std::endl; + ol1.free(); + ol2.free(); + ol3.free(); + goto err; + } + + l1 = ol1.getInt(); + l2 = ol2.getInt(); + l3 = ol3.getInt(); + ol1.free(); + ol2.free(); + ol3.free(); + + str_obj.streamReset(); + for(int i = 0; i < l1; ++i) + { + if((c = str_obj.streamGetChar()) == EOF) + break; + output_char(c); + } + + if(l2 == 0) + { + std::cerr << "Bad Length2" << std::endl; + goto err; + } + { + int i; + for(i = 0; i < 4; ++i) + { + int j = buf[i] = str_obj.streamGetChar(); + if(buf[i] == EOF) + { + std::cerr << "Embedded font stream is too short" << std::endl; + goto err; + } + + if(!((j>='0'&&j<='9') || (j>='a'&&j<='f') || (j>='A'&&j<='F'))) + { + is_bin = true; + ++i; + break; + } + } + if(is_bin) + { + static const char hex_char[] = "0123456789ABCDEF"; + for(int j = 0; j < i; ++j) + { + output_char(hex_char[(buf[j]>>4)&0xf]); + output_char(hex_char[buf[j]&0xf]); + } + for(; i < l2; ++i) + { + if(i % 32 == 0) + output_char('\n'); + int c = str_obj.streamGetChar(); + if(c == EOF) + break; + output_char(hex_char[(c>>4)&0xf]); + output_char(hex_char[c&0xf]); + } + if(i % 32 != 0) + output_char('\n'); + } + else + { + for(int j = 0; j < i; ++j) + { + output_char(buf[j]); + } + for(;i < l2; ++i) + { + int c = str_obj.streamGetChar(); + if(c == EOF) + break; + output_char(c); + } + } + } + if(l3 > 0) + { + int c; + while((c = str_obj.streamGetChar()) != EOF) + output_char(c); + } + else + { + for(int i = 0; i < 8; ++i) + { + for(int j = 0; j < 64; ++j) + output_char('0'); + output_char('\n'); + } + static const char * CTM = "cleartomark\n"; + tmpf.write(CTM, strlen(CTM)); + } + + export_remote_font(fn_id, "otf"); + +err: + str_obj.streamClose(); + str_obj.free(); +} + +void HTMLRenderer::output_to_file(void * outf, const char * data, int len) +{ + reinterpret_cast(outf)->write(data, len); +} + +void HTMLRenderer::install_embedded_type1c_font (GfxFont * font, long long fn_id) +{ + int font_len; + char * font_buf = font->readEmbFontFile(xref, &font_len); + if(font_buf != nullptr) + { + auto * FFT1C = FoFiType1C::make(font_buf, font_len); + if(FFT1C != nullptr) + { + string fn = (boost::format("f%|1$x|")%fn_id).str(); + ofstream tmpf((fn+".pfa").c_str(), ofstream::binary); + FFT1C->convertToType1((char*)fn.c_str(), nullptr, true, &output_to_file , &tmpf); + export_remote_font(fn_id, "otf"); + delete FFT1C; + } + else + { + std::cerr << "Warning: cannot process type 1c font: " << fn_id << std::endl; + export_remote_default_font(fn_id); + } + gfree(font_buf); + } +} + +void HTMLRenderer::install_embedded_opentypet1c_font (GfxFont * font, long long fn_id) +{ + install_embedded_truetype_font(font, fn_id); +} + +void HTMLRenderer::install_embedded_truetype_font (GfxFont * font, long long fn_id) +{ + int font_len; + char * font_buf = font->readEmbFontFile(xref, &font_len); + if(font_buf != nullptr) + { + auto * FFTT = FoFiTrueType::make(font_buf, font_len); + if(FFTT != nullptr) + { + string fn = (boost::format("f%|1$x|")%fn_id).str(); + ofstream tmpf((fn+".ttf").c_str(), ofstream::binary); + FFTT->writeTTF(output_to_file, &tmpf, (char*)(fn.c_str()), nullptr); + export_remote_font(fn_id, "ttf"); + delete FFTT; + } + else + { + std::cerr << "Warning: cannot process truetype (or opentype t1c) font: " << fn_id << std::endl; + export_remote_default_font(fn_id); + } + gfree(font_buf); + } +} +void HTMLRenderer::install_base_font( GfxFont * font, GfxFontLoc * font_loc, long long fn_id) +{ + std::string psname(font_loc->path->getCString()); + string basename = psname.substr(0, psname.find('-')); + string cssfont; + auto iter = BASE_14_FONT_CSS_FONT_MAP.find(basename); + if(iter == BASE_14_FONT_CSS_FONT_MAP.end()) + { + std::cerr << "PS Font: " << basename << " not found in the base 14 font map" << std::endl; + cssfont = ""; + } + else + cssfont = iter->second; + + export_local_font(fn_id, font, font_loc, psname, cssfont); +} + +long long HTMLRenderer::install_font_size(double font_size) +{ + auto iter = font_size_map.lower_bound(font_size - EPS); + if((iter != font_size_map.end()) && (_equal(iter->first, font_size))) + return iter->second; + + long long new_fs_id = font_size_map.size(); + font_size_map.insert(std::make_pair(font_size, new_fs_id)); + export_font_size(new_fs_id, font_size); + return new_fs_id; +} + +long long HTMLRenderer::install_whitespace(double ws_width, double & actual_width) +{ + auto iter = whitespace_map.lower_bound(ws_width - param->h_eps); + if((iter != whitespace_map.end()) && (std::abs(iter->first - ws_width) < param->h_eps)) + { + actual_width = iter->first; + return iter->second; + } + + actual_width = ws_width; + long long new_ws_id = whitespace_map.size(); + whitespace_map.insert(std::make_pair(ws_width, new_ws_id)); + export_whitespace(new_ws_id, ws_width); + return new_ws_id; +} + +long long HTMLRenderer::install_transform_matrix(double * tm){ + TM m(tm); + auto iter = transform_matrix_map.lower_bound(m); + if(m == (iter->first)) + { + return iter->second; + } + + long long new_tm_id = transform_matrix_map.size(); + transform_matrix_map.insert(std::make_pair(m, new_tm_id)); + export_transform_matrix(new_tm_id, tm); + return new_tm_id; +} + + +void HTMLRenderer::export_remote_font(long long fn_id, const string & suffix) +{ + allcss_fout << boost::format("@font-face{font-family:f%|1$x|;src:url(f%|1$x|.%2%);}.f%|1$x|{font-family:f%|1$x|;}") % fn_id % suffix; + if(param->readable) allcss_fout << endl; +} + +void HTMLRenderer::export_remote_default_font(long long fn_id) +{ + allcss_fout << boost::format(".f%|1$x|{font-family:sans-serif;color:red;}")%fn_id; + if(param->readable) allcss_fout << endl; +} + +void HTMLRenderer::export_local_font(long long fn_id, GfxFont * font, GfxFontLoc * font_loc, const string & original_font_name, const string & cssfont) +{ + allcss_fout << boost::format(".f%|1$x|{") % fn_id; + allcss_fout << "font-family:" << ((cssfont == "") ? (original_font_name + "," + general_font_family(font)) : cssfont) << ";"; + + if(font->isBold()) + allcss_fout << "font-weight:bold;"; + + if(boost::algorithm::ifind_first(original_font_name, "oblique")) + allcss_fout << "font-style:oblique;"; + else if(font->isItalic()) + allcss_fout << "font-style:italic;"; + + allcss_fout << "}"; + + if(param->readable) allcss_fout << endl; +} + +std::string HTMLRenderer::general_font_family(GfxFont * font) +{ + if(font -> isFixedWidth()) + return "monospace"; + else if (font -> isSerif()) + return "serif"; + else + return "sans-serif"; +} + +void HTMLRenderer::export_font_size (long long fs_id, double font_size) +{ + allcss_fout << boost::format(".s%|1$x|{font-size:%2%px;}") % fs_id % font_size; + if(param->readable) allcss_fout << endl; +} + +void HTMLRenderer::export_whitespace (long long ws_id, double ws_width) +{ + allcss_fout << boost::format(".w%|1$x|{width:%2%px;}") % ws_id % ws_width; + if(param->readable) allcss_fout << endl; +} + +void HTMLRenderer::export_transform_matrix (long long tm_id, double * tm) +{ + // TODO: recognize common matices + allcss_fout << boost::format(".t%|1$x|{") % tm_id; + + for(const std::string & prefix : {"", "-ms-", "-moz-", "-webkit-", "-o-"}) + { + allcss_fout << prefix << "transform:matrix("; + for(int i = 0; i < 4; ++i) + allcss_fout << tm[i] << ','; + if(prefix == "-moz-") + allcss_fout << boost::format("%1%px,%2%px);") % tm[4] % tm[5]; + else + allcss_fout << boost::format("%1%,%2%);") % tm[4] % tm[5]; + } + allcss_fout << "}"; + if(param->readable) allcss_fout << endl; + +} + diff --git a/src/HTMLRenderer.h b/src/HTMLRenderer.h new file mode 100644 index 0000000..18201c8 --- /dev/null +++ b/src/HTMLRenderer.h @@ -0,0 +1,232 @@ +/* + * HTMLRenderer.h + * + * Created on: Mar 15, 2011 + * Author: tian + */ + +#ifndef HTMLRENDERER_H_ +#define HTMLRENDERER_H_ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Param.h" + +using namespace std; + +static const double EPS = 1e-6; +inline bool _equal(double x, double y) { return std::abs(x-y) < EPS; } +inline bool _is_positive(double x) { return x > EPS; } +inline bool _tm_equal(const double * tm1, const double * tm2) +{ + for(int i = 0; i < 6; ++i) + if(!_equal(tm1[i], tm2[i])) + return false; + return true; +} + +class TextString +{ + public: + TextString(GfxState *state); + ~TextString(); + + // Add a character to the string. + void addChar(GfxState *state, double x, double y, + double dx, double dy, + Unicode u); + double getX() const {return x;} + double getY() const {return y;} + + double getWidth() const {return width;} + double getHeight() const {return height;} + + GfxState * getState() const { return state; } + + const std::vector & getUnicodes() const { return unicodes; } + size_t getSize() const { return unicodes.size(); } + + + private: + std::vector unicodes; + double x, y; + double width, height; + + // TODO: + // remove this, track state change in the converter + GfxState * state; +}; + +class HTMLRenderer : public OutputDev +{ + public: + HTMLRenderer(const Param * param); + virtual ~HTMLRenderer(); + + void process(PDFDoc * doc); + + //---- get info about output device + + // Does this device use upside-down coordinates? + // (Upside-down means (0,0) is the top left corner of the page.) + virtual GBool upsideDown() { return gFalse; } + + // Does this device use drawChar() or drawString()? + virtual GBool useDrawChar() { return gTrue; } + + // Does this device use beginType3Char/endType3Char? Otherwise, + // text in Type 3 fonts will be drawn with drawChar/drawString. + virtual GBool interpretType3Chars() { return gFalse; } + + // Does this device need non-text content? + virtual GBool needNonText() { return gFalse; } + + //----- initialization and control + + virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI, + int rotate, GBool useMediaBox, GBool crop, + int sliceX, int sliceY, int sliceW, int sliceH, + GBool printing, Catalog * catalogA, + GBool (* abortCheckCbk)(void *data) = NULL, + void * abortCheckCbkData = NULL) + { + docPage = page; + catalog = catalogA; + return gTrue; + } + + + // Start a page. + virtual void startPage(int pageNum, GfxState *state); + + // End a page. + virtual void endPage(); + + //----- update state + virtual void updateCTM(GfxState * state, double m11, double m12, double m21, double m22, double m31, double m32); + virtual void updateFont(GfxState * state); + virtual void updateTextMat(GfxState * state); + + //----- text drawing + virtual void beginString(GfxState *state, GooString *s); + virtual void endString(GfxState *state); + virtual void drawChar(GfxState *state, double x, double y, + double dx, double dy, + double originX, double originY, + CharCode code, int nBytes, Unicode *u, int uLen); + + virtual void drawString(GfxState * state, GooString * s); + + private: + bool at_same_line(const TextString * ts1, const TextString * ts2) const; + + // CSS use a different coordinate system from PDF + void convert_transform_matrix(double * tm); + + void close_cur_line(); + void outputTextString(TextString * str); + + // return the mapped font name + long long install_font(GfxFont * font); + + static void output_to_file(void * outf, const char * data, int len); + void install_embedded_type1_font (Ref * id, long long fn_id); + void install_embedded_type1c_font (GfxFont * font, long long fn_id); + void install_embedded_opentypet1c_font (GfxFont * font, long long fn_id); + void install_embedded_truetype_font (GfxFont * font, long long fn_id); + void install_base_font(GfxFont * font, GfxFontLoc * font_loc, long long fn_id); + + long long install_font_size(double font_size); + long long install_whitespace(double ws_width, double & actual_width); + long long install_transform_matrix(double * tm); + + /* + * remote font: to be retrieved from the web server + * local font: to be substituted with a local (client side) font + */ + void export_remote_font(long long fn_id, const string & suffix); + void export_remote_default_font(long long fn_id); + void export_local_font(long long fn_id, GfxFont * font, GfxFontLoc * font_loc, const string & original_font_name, const string & cssfont); + std::string general_font_family(GfxFont * font); + + void export_font_size(long long fs_id, double font_size); + void export_whitespace(long long ws_id, double ws_width); + void export_transform_matrix(long long tm_id, double * tm); + + Catalog *catalog; + Page *docPage; + + // page info + int pageNum ; + int pageWidth ; + int pageHeight ; + + + // state maintained when processing pdf + // the string being processed + TextString * cur_string; + // the last word of current line + // if it's not nullptr, there's an open
waiting for new strings in the same line + TextString * cur_line; + // (actual x) - (supposed x) + double cur_line_x_offset; + double ctm[6], text_mat[6]; + long long cur_fs_id, cur_fn_id; + + + ofstream html_fout, allcss_fout; + + class FontInfo{ + public: + long long fn_id; + }; + unordered_map font_name_map; + map font_size_map; + map whitespace_map; + XRef * xref; + + // transform matrix + class TM{ + public: + TM() {} + TM(double * m) {memcpy(_, m, sizeof(_));} + bool operator < (const TM & m) const { + for(int i = 0; i < 6; ++i) + { + if(_[i] < m._[i] - EPS) + return true; + if(_[i] > m._[i] + EPS) + return false; + } + return false; + } + bool operator == (const TM & m) const { + return _tm_equal(_, m._); + } + double _[6]; + }; + + map transform_matrix_map; + + const Param * param; +}; + +#endif /* HTMLRENDERER_H_ */ diff --git a/src/Param.h b/src/Param.h new file mode 100644 index 0000000..87cb24f --- /dev/null +++ b/src/Param.h @@ -0,0 +1,27 @@ +/* + * Parameters + * + * Wang Lu + * 2012.08.03 + */ + + +#ifndef PARAM_H__ +#define PARAM_H__ + +#include + +struct Param +{ + std::string owner_password, user_password; + std::string input_filename, output_filename; + int first_page, last_page; + + double h_dpi, v_dpi; + double h_eps, v_eps; + + int readable; +}; + + +#endif //PARAM_h__ diff --git a/src/pdftohtmlEX.cc b/src/pdftohtmlEX.cc new file mode 100644 index 0000000..74c7110 --- /dev/null +++ b/src/pdftohtmlEX.cc @@ -0,0 +1,257 @@ +//======================================================================== +// pdftohtmlEX.cc +// +// Copyright (C) 2011 by Hongliang TIAN(tatetian@gmail.com) +// Copyright (C) 2012 by Lu Wang coolwanglugmail.com +//======================================================================== +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "Object.h" +#include "PDFDoc.h" +#include "PDFDocFactory.h" +#include "HTMLRenderer.h" +#include "GlobalParams.h" +#include "Error.h" +#include "DateInfo.h" + +#include "Param.h" + +#define PDFTOHTMLEX_VERSION "0.1" + +namespace po = boost::program_options; +using namespace std; + +Param param; + +// variables +PDFDoc *doc = nullptr; +GooString *fileName = nullptr; +GooString *ownerPW, *userPW; + +GooString *docTitle = nullptr; +GooString *author = nullptr, *keywords = nullptr, *subject = nullptr, *date = nullptr; + +HTMLRenderer *htmlOut = nullptr; + +int finished = -1; + +po::options_description opt_visible("Options"), opt_hidden, opt_all; +po::positional_options_description opt_positional; + +//====================helper functions========================================= +/* +static GooString* getInfoString(Dict *infoDict, char *key) { + Object obj; + GooString *s1 = nullptr; + + if (infoDict->lookup(key, &obj)->isString()) { + s1 = new GooString(obj.getString()); + } + obj.free(); + return s1; +} + +static GooString* getInfoDate(Dict *infoDict, char *key) { + Object obj; + char *s; + int year, mon, day, hour, min, sec, tz_hour, tz_minute; + char tz; + struct tm tmStruct; + GooString *result = nullptr; + char buf[256]; + + if (infoDict->lookup(key, &obj)->isString()) { + s = obj.getString()->getCString(); + // TODO do something with the timezone info + if ( parseDateString( s, &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute ) ) { + tmStruct.tm_year = year - 1900; + tmStruct.tm_mon = mon - 1; + tmStruct.tm_mday = day; + tmStruct.tm_hour = hour; + tmStruct.tm_min = min; + tmStruct.tm_sec = sec; + tmStruct.tm_wday = -1; + tmStruct.tm_yday = -1; + tmStruct.tm_isdst = -1; + mktime(&tmStruct); // compute the tm_wday and tm_yday fields + if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S+00:00", &tmStruct)) { + result = new GooString(buf); + } else { + result = new GooString(s); + } + } else { + result = new GooString(s); + } + } + obj.free(); + return result; +} +*/ + +void show_usage(void) +{ + cerr << "pdftohtmlEX version " << PDFTOHTMLEX_VERSION << endl; + cerr << endl; + cerr << "Copyright 2011 Hongliang Tian (tatetian@gmail.com)" << endl; + cerr << "Copyright 2012 Lu Wang (coolwanglugmail.com)" << endl; + cerr << endl; + cerr << "Usage: pdftohtml [Options] []" << endl; + cerr << endl; + cerr << opt_visible << endl; +} + +po::variables_map parse_options (int argc, char **argv) +{ + opt_visible.add_options() + ("help", "show all options") + ("first-page,f", po::value(¶m.first_page)->default_value(1), "first page to process") + ("last-page,l", po::value(¶m.last_page)->default_value(numeric_limits::max()), "last page to process") + ("version,v", "show copyright and version info") + ("metadata,m", "show the document meta data in JSON") + ("owner-password,o", po::value(¶m.owner_password)->default_value(""), "owner password (for encrypted files)") + ("user-password,u", po::value(¶m.user_password)->default_value(""), "user password (for encrypted files)") + ("hdpi", po::value(¶m.h_dpi)->default_value(72.0), "horizontal DPI") + ("vdpi", po::value(¶m.v_dpi)->default_value(72.0), "vertical DPI") + ("heps", po::value(¶m.h_eps)->default_value(1.0), "max tolerated horizontal offset (in pixels)") + ("heps", po::value(¶m.h_eps)->default_value(1.0), "max tolerated horizontal offset (in pixels)") + ("veps", po::value(¶m.v_eps)->default_value(1.0), "max tolerated vertical offset (in pixels)") + ("readable", po::value(¶m.readable)->default_value(0), "make the ouptut human readable") + ; + + opt_hidden.add_options() + ("inputfilename", po::value(¶m.input_filename)->default_value(""), "") + ("outputfilename", po::value(¶m.output_filename)->default_value(""), "") + ; + + opt_positional.add("inputfilename", 1).add("outputfilename",1); + + opt_all.add(opt_visible).add(opt_hidden); + + try { + po::variables_map opt_vm; + po::store(po::command_line_parser(argc, argv).options(opt_all).positional(opt_positional).run() + , opt_vm); + po::notify(opt_vm); + return opt_vm; + } + catch(...) { + show_usage(); + exit(-1); + } +} + + +//====================entry point============================================== +int main(int argc, char **argv) +{ + auto opt_map = parse_options(argc, argv); + if (opt_map.count("version") || opt_map.count("help") || (param.input_filename == "")) + { + show_usage(); + return -1; + } + + // read config file + globalParams = new GlobalParams(); + + // open PDF file + ownerPW = (param.owner_password == "") ? (nullptr) : (new GooString(param.owner_password.c_str())); + userPW = (param.user_password == "") ? (nullptr) : (new GooString(param.user_password.c_str())); + fileName = new GooString(param.input_filename.c_str()); + + doc = PDFDocFactory().createPDFDoc(*fileName, ownerPW, userPW); + + delete userPW; + delete ownerPW; + + if (!doc->isOk()) { + goto error; + } + + // check for copy permission + if (!doc->okToCopy()) { + error(errNotAllowed, -1, "Copying of text from this document is not allowed."); + goto error; + } + + param.first_page = min(max(param.first_page, 1), doc->getNumPages()); + param.last_page = min(max(param.last_page, param.first_page), doc->getNumPages()); + + /* + // get meta info + doc->getDocInfo(&info); + if (info.isDict()) { + docTitle = getInfoString(info.getDict(), "Title"); + author = getInfoString(info.getDict(), "Author"); + keywords = getInfoString(info.getDict(), "Keywords"); + subject = getInfoString(info.getDict(), "Subject"); + date = getInfoDate(info.getDict(), "ModDate"); + if( !date ) + date = getInfoDate(info.getDict(), "CreationDate"); + } + info.free(); + if( !docTitle ) docTitle = fileName->copy(); + */ + + if(param.output_filename == "") + { + const auto & s = param.input_filename; + if(boost::algorithm::ends_with(s, ".pdf")) + { + param.output_filename = s.substr(0, s.size() - 4) + ".html"; + } + else + { + param.output_filename = s + ".html"; + } + } + + htmlOut = new HTMLRenderer(¶m); + htmlOut->process(doc); + + { + /* + escapeHTMLString(docTitle); + if(author) escapeHTMLString(author); + if(date) escapeHTMLString(date); + + printf("{\"doc_id\": \"\", \"title\":\"%s\", \"author\":\"%s\",\"mod_date\":\"%s\",\n", + docTitle->getCString(), + author? author->getCString():"", + date? date->getCString():""); + printf("\"pages\":[\n"); + */ + } + + delete htmlOut; + delete docTitle; + if( author ) delete author; + if( keywords ) delete keywords; + if( subject ) delete subject; + if( date ) delete date; + + finished = 0; + + // clean up +error: + if(doc) delete doc; + delete fileName; + if(globalParams) delete globalParams; + + // check for memory leaks + Object::memCheck(stderr); + gMemReport(stderr); + + return finished; +}