diff --git a/ChangeLog b/ChangeLog
index afca5be3..5e468c15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+26-SEP-2016: 5.7.0.5
+
+- Adds publish to Facebook, Twitter
+
+21-SEP-2016: 5.7.0.4
+
+- Minor logging changes
+
21-SEP-2016: 5.7.0.3
- Uses mxGraph 3.7.0.0 beta 4
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 9cecc1d4..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,674 +0,0 @@
- 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.
-
- {one line to give the program's name and a brief idea of what it does.}
- Copyright (C) {year} {name of author}
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-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:
-
- {project} Copyright (C) {year} {fullname}
- 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/VERSION b/VERSION
index 6481ee60..9d964de2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.7.0.3
\ No newline at end of file
+5.7.0.5
\ No newline at end of file
diff --git a/src/com/mxgraph/online/LogServlet.java b/src/com/mxgraph/online/LogServlet.java
index 3822b565..07fdc6f6 100644
--- a/src/com/mxgraph/online/LogServlet.java
+++ b/src/com/mxgraph/online/LogServlet.java
@@ -1,6 +1,7 @@
package com.mxgraph.online;
import java.io.OutputStream;
+import java.net.URLDecoder;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -44,7 +45,7 @@ public class LogServlet extends HttpServlet {
if (stack != null)
{
- message += stack;
+ message += "\n" + stack;
}
if (message != null)
@@ -55,6 +56,12 @@ public class LogServlet extends HttpServlet {
{
severityLevel = Level.parse(severity);
}
+
+ if (severityLevel.intValue() >= 900)
+ {
+ // Tidy up warnings and severes
+ message = message == null ? message : URLDecoder.decode(message, "UTF-8");
+ }
log.log(severityLevel, "CLIENT-LOG:" + message);
}
diff --git a/war/cache.manifest b/war/cache.manifest
index 107543b3..77bc3a99 100644
--- a/war/cache.manifest
+++ b/war/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 09/21/2016 04:20 PM
+# 09/26/2016 01:55 PM
/app.html
/index.html?offline=1
diff --git a/war/electron.js b/war/electron.js
new file mode 100644
index 00000000..0311dc45
--- /dev/null
+++ b/war/electron.js
@@ -0,0 +1,59 @@
+const electron = require('electron')
+// Module to control application life.
+const app = electron.app
+// Module to create native browser window.
+const BrowserWindow = electron.BrowserWindow
+
+// Keep a global reference of the window object, if you don't, the window will
+// be closed automatically when the JavaScript object is garbage collected.
+let mainWindow
+
+function createWindow()
+{
+ // Create the browser window.
+ mainWindow = new BrowserWindow({width: 1600, height: 1200})
+
+ // and load the index.html of the app.
+ mainWindow.loadURL(`file://${__dirname}/index.html?dev=1&test=1&db=0&gapi=0&od=0&analytics=0&picker=0&mode=device&browser=0&p=electron`)
+
+ // Open the DevTools.
+ mainWindow.webContents.openDevTools()
+
+ // Emitted when the window is closed.
+ mainWindow.on('closed', function()
+ {
+ // Dereference the window object, usually you would store windows
+ // in an array if your app supports multi windows, this is the time
+ // when you should delete the corresponding element.
+ mainWindow = null
+ })
+}
+
+// This method will be called when Electron has finished
+// initialization and is ready to create browser windows.
+// Some APIs can only be used after this event occurs.
+app.on('ready', createWindow)
+
+// Quit when all windows are closed.
+app.on('window-all-closed', function()
+{
+ // On OS X it is common for applications and their menu bar
+ // to stay active until the user quits explicitly with Cmd + Q
+ if (process.platform !== 'darwin')
+ {
+ app.quit()
+ }
+})
+
+app.on('activate', function()
+{
+ // On OS X it's common to re-create a window in the app when the
+ // dock icon is clicked and there are no other windows open.
+ if (mainWindow === null)
+ {
+ createWindow()
+ }
+})
+
+// In this file you can include the rest of your app's specific main process
+// code. You can also put them in separate files and require them here.
diff --git a/war/index.html b/war/index.html
index 8ab50833..2d547f2d 100644
--- a/war/index.html
+++ b/war/index.html
@@ -32,7 +32,7 @@
* - pages=1: For developers only
* - page=n: For developers only
* - ignoremime=1: For developers only (see DriveClient.js). Use Cmd-S to override mime.
- * - createindex=1: For depelopers only (see etc/build/README)
+ * - createindex=1: For developers only (see etc/build/README)
* - filesupport=0: For developers only (see Editor.js in core)
* - savesidebar=1: For developers only (see Sidebar.js)
* - pages=1: For developers only (see Pages.js)
@@ -64,39 +64,44 @@
(function()
{
var proto = window.location.protocol;
- var host = window.location.host;
-
- // Redirects apex and rt to www
- if (host === 'draw.io' || host === 'rt.draw.io')
- {
- host = 'www.draw.io';
- }
- // Redirects to SSL/non-SSL
- if (urlParams['demo'] != '1' && urlParams['offline'] != '1')
+ // Electron protocol is file:
+ if (!proto.startsWith('file:'))
{
- var ssl = (urlParams['https'] != null) ? urlParams['https'] == '1' :
- navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 9;
+ var host = window.location.host;
+
+ // Redirects apex and rt to www
+ if (host === 'draw.io' || host === 'rt.draw.io')
+ {
+ host = 'www.draw.io';
+ }
- if (ssl && proto != 'https:')
+ // Redirects to SSL/non-SSL
+ if (urlParams['demo'] != '1' && urlParams['offline'] != '1')
{
- proto = 'https:';
+ var ssl = (urlParams['https'] != null) ? urlParams['https'] == '1' :
+ navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 9;
+
+ if (ssl && proto != 'https:')
+ {
+ proto = 'https:';
+ }
+ else if (!ssl && proto != 'http:')
+ {
+ proto = 'http:';
+ }
}
- else if (!ssl && proto != 'http:')
+
+ var href = proto + '//' + host + window.location.href.substring(
+ window.location.protocol.length +
+ window.location.host.length + 2);
+
+ // Redirects if href changes
+ if (href != window.location.href)
{
- proto = 'http:';
+ window.location.href = href;
}
}
-
- var href = proto + '//' + host + window.location.href.substring(
- window.location.protocol.length +
- window.location.host.length + 2);
-
- // Redirects if href changes
- if (href != window.location.href)
- {
- window.location.href = href;
- }
})();
}
@@ -286,6 +291,12 @@
{
// Used to request grapheditor/mxgraph sources in dev mode
var mxDevUrl = document.location.protocol + '//devhost.jgraph.com/mxgraph2';
+
+ if (document.location.protocol == 'file:')
+ {
+ mxDevUrl = '../../mxgraph2';
+ }
+
var geBasePath = mxDevUrl + '/javascript/examples/grapheditor/www/js';
var mxBasePath = mxDevUrl + '/javascript/src';
diff --git a/war/js/app.min.js b/war/js/app.min.js
index 01dde4cf..cb5aa07d 100644
--- a/war/js/app.min.js
+++ b/war/js/app.min.js
@@ -44,8 +44,8 @@ function(){return this.h&&decodeURIComponent(this.h)};g.prototype.ca=function(b)
!(b instanceof Array)&&(b instanceof Object||"[object Array]"!==Object.prototype.toString.call(b))){var a=[],d=-1,e;for(e in b){var c=b[e];"string"===typeof c&&(a[++d]=e,a[++d]=c)}b=a}for(var a=[],d="",f=0;f]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
-"\x3c":"%3c","\x3e":"%3e"},D=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function N(d,c,f,g,n){d=E(d);var m=e[d];if(!m||"object"!==typeof m)c.length=0;else{for(var t=m.cssPropBits,q=t&80,p=t&1536,z=NaN,r=0,s=0;r=D)F=t&1?F:"";else if(B=F.charCodeAt(1),G=F.charCodeAt(2),A=48<=B&&57>=B,H=48<=G&&57>=G,43===D&&(A||46===B&&H))F=t&1?(A?"":"0")+F.substring(1):"";else if(45===D&&(A||46===B&&H))F=t&4?(A?"-":"-0")+F.substring(1):t&1?"0":"";else if(46===D&&A)F=t&1?"0"+F:"";else if('url("'===F.substring(0,5))F=
+"\x3c":"%3c","\x3e":"%3e"},D=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function N(d,c,f,g,n){d=E(d);var m=e[d];if(!m||"object"!==typeof m)c.length=0;else{for(var t=m.cssPropBits,q=t&80,p=t&1536,z=NaN,r=0,s=0;r=D)F=t&1?F:"";else if(G=F.charCodeAt(1),B=F.charCodeAt(2),A=48<=G&&57>=G,H=48<=B&&57>=B,43===D&&(A||46===G&&H))F=t&1?(A?"":"0")+F.substring(1):"";else if(45===D&&(A||46===G&&H))F=t&4?(A?"-":"-0")+F.substring(1):t&1?"0":"";else if(46===D&&A)F=t&1?"0"+F:"";else if('url("'===F.substring(0,5))F=
f&&t&16?b(u(k(g,c[r].substring(5,F.length-2)),d,f)):"";else if("("===F.charAt(F.length-1))a:{Q=c;ca=r;F=1;$=ca+1;for(D=Q.length;$g&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?a(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function a(c,f,g,k){++f;for(k.startBlock&&k.startBlock();fn)return n=~n,n===k?n+1:n;var m=b[n];if("{"!==m)return n===k?n+1:n;a=n+1;n>k&&" "===b[n-1]&&--n;for(g.startRuleset&&g.startRuleset(b.slice(k,n));am)m=~m;else{for(var t=[],u=0,q=a;q])/g;c=b+"";if(ga)c=c.split(g);else{for(var k=[],l=0,n;(n=g.exec(c))!==f;)k.push(c.substring(l,n.index)),k.push(n[0]),l=n.index+n[0].length;k.push(c.substring(l));c=k}u(a,c,0,{r:d,C:d},e)}}function t(b,a,d,e,c){return function(){u(b,a,d,e,c)}}function u(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,n,m=d.length;e/g,W=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ga=3==="a,b".split(/(,)/).length,ca=b.c.CDATA|b.c.RCDATA,$={},fa={},ia=/^(?:https?|mailto|data)$/i,ba={};ba.pa=ba.escapeAttrib=k;ba.ra=ba.makeHtmlSanitizer=r;ba.sa=ba.makeSaxParser=m;ba.ta=ba.makeTagPolicy=X;ba.wa=ba.normalizeRCData=l;ba.xa=
ba.sanitize=function(b,a,d,e){return R(b,X(a,d,e))};ba.ya=ba.sanitizeAttribs=T;ba.za=ba.sanitizeWithPolicy=R;ba.Ba=ba.unescapeEntities=g;return ba}(t);g=b.sanitize;"undefined"!==typeof window&&(window.html=b,window.html_sanitize=g)})();!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function c(f,d,b){function e(k,n){if(!d[k]){if(!f[k]){var m="function"==typeof require&&require;if(!n&&m)return m(k,!0);if(g)return g(k,!0);m=Error("Cannot find module '"+k+"'");throw m.code="MODULE_NOT_FOUND",m;}m=d[k]={exports:{}};
f[k][0].call(m.exports,function(b){var d=f[k][1][b];return e(d?d:b)},m,m.exports,c,f,d,b)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;kd.windowBits&&(d.windowBits+=16);this.err=0;this.msg=
@@ -113,8 +113,8 @@ c?(d[k++]=192|c>>>6,d[k++]=128|63&c):65536>c?(d[k++]=224|c>>>12,d[k++]=128|c>>>6
2===k?31:3===k?15:7;1g?n[f++]=g:(g-=65536,n[f++]=55296|g>>10&1023,n[f++]=56320|1023&g)}return b(n,f)};d.utf8border=function(b,d){var e;d=d||b.length;d>b.length&&(d=b.length);for(e=d-1;0<=e&&128===(192&b[e]);)e--;return 0>e?d:0===e?d:e+m[b[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(b,d,c,f){var l=65535&b|0;b=b>>>16&65535|0;for(var n=0;0!==c;){n=2E3c;c++){b=c;
for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=D[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(x.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out=
-0))}function k(b,d){E._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function n(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function m(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-Z?b.strstart-(b.w_size-Z):0,m=b.window,t=b.w_mask,u=b.prev,q=b.strstart+S,p=m[g+k-1],v=m[g+k];b.prev_length>=b.good_match&&
-(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,m[e+k]===v&&m[e+k-1]===p&&m[e]===m[g]&&m[++e]===m[g+1]){g+=2;e++;do;while(m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&gk){if(b.match_start=d,k=c,c>=l)break;p=m[g+k-1];v=m[g+k]}}while((d=u[d&t])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
+0))}function k(b,d){E._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function n(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function m(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-Z?b.strstart-(b.w_size-Z):0,m=b.window,t=b.w_mask,u=b.prev,q=b.strstart+S,v=m[g+k-1],p=m[g+k];b.prev_length>=b.good_match&&
+(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,m[e+k]===p&&m[e+k-1]===v&&m[e]===m[g]&&m[++e]===m[g+1]){g+=2;e++;do;while(m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&gk){if(b.match_start=d,k=c,c>=l)break;v=m[g+k-1];p=m[g+k]}}while((d=u[d&t])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
g+(g-Z)){x.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,x.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=A(d.adler,c,l,k):2===d.state.wrap&&(d.adler=B(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),
b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<<
b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==e&&b.strstart-e<=b.w_size-Z&&(b.match_length=m(b,e)),b.match_length>=K)if(c=E._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=K&&(b
K&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-K;c=E._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?ea:da,d.adler=2===e.wrap?0:1,e.last_flush=G,E._tr_init(e),H):b(d,J)}function v(b){var d=t(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
-0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return J;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15g||g>C||c!==R||8>f||15e||9k||k>T)return b(d,J);8===f&&(f=9);var n=new u;return d.state=n,n.strm=d,n.wrap=l,n.gzhead=null,n.w_bits=f,n.w_size=1<e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?ea:da,d.adler=2===e.wrap?0:1,e.last_flush=G,E._tr_init(e),H):b(d,I)}function v(b){var d=t(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
+0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return I;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15g||g>C||c!==R||8>f||15e||9k||k>T)return b(d,I);8===f&&(f=9);var n=new u;return d.state=n,n.strm=d,n.wrap=l,n.gzhead=null,n.w_bits=f,n.w_size=1<b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===G)return V;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-Z&&(k(b,!1),0===b.strm.avail_out))return V}return b.insert=0,d===F?(k(b,!0),0===b.strm.avail_out?aa:W):(b.strstart>b.block_start&&k(b,!1),V)}),new q(4,4,8,
-4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return z(b,d,R,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=t;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?J:(b.state.gzhead=d,H):J};d.deflate=function(d,c){var f,m,t,u;if(!d||!d.state||5c)return d?b(d,J):J;if(m=d.state,!d.output||!d.input&&0!==d.avail_in||
-666===m.status&&c!==F)return b(d,0===d.avail_out?-5:J);if(m.strm=d,f=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(d.adler=0,l(m,31),l(m,139),l(m,8),m.gzhead?(l(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),l(m,255&m.gzhead.time),l(m,m.gzhead.time>>8&255),l(m,m.gzhead.time>>16&255),l(m,m.gzhead.time>>24&255),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(l(m,255&m.gzhead.extra.length),
+4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return z(b,d,R,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=t;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,H):I};d.deflate=function(d,c){var f,m,t,u;if(!d||!d.state||5c)return d?b(d,I):I;if(m=d.state,!d.output||!d.input&&0!==d.avail_in||
+666===m.status&&c!==F)return b(d,0===d.avail_out?-5:I);if(m.strm=d,f=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(d.adler=0,l(m,31),l(m,139),l(m,8),m.gzhead?(l(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),l(m,255&m.gzhead.time),l(m,m.gzhead.time>>8&255),l(m,m.gzhead.time>>16&255),l(m,m.gzhead.time>>24&255),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(l(m,255&m.gzhead.extra.length),
l(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(d.adler=B(d.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(l(m,0),l(m,0),l(m,0),l(m,0),l(m,0),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,3),m.status=da)):(t=R+(m.w_bits-8<<4)<<8,u=-1,u=2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3,t|=u<<6,0!==m.strstart&&(t|=32),m.status=da,n(m,t+(31-t%31)),0!==m.strstart&&(n(m,d.adler>>>16),n(m,65535&d.adler)),d.adler=1);if(69===m.status)if(m.gzhead.extra){for(t=m.pending;m.gzindex<
(65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),g(d),t=m.pending,m.pending!==m.pending_buf_size));)l(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){t=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>
t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),g(d),t=m.pending,m.pending===m.pending_buf_size)){u=1;break}u=m.gzindext&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t));0===u&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){t=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),
@@ -138,48 +138,48 @@ g(d),t=m.pending,m.pending===m.pending_buf_size)){u=1;break}u=m.gzindex=K&&0m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=
K?(q=E._tr_tally(m,1,m.match_length-K),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=E._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(k(m,!1),0===m.strm.avail_out)){q=V;break a}}q=(m.insert=0,c===F?(k(m,!0),0===m.strm.avail_out?aa:W):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?V:Y)}else q=y[m.level].func(m,c);if(q!==aa&&q!==W||(m.status=666),q===V||q===aa)return 0===d.avail_out&&(m.last_flush=-1),H;if(q===Y&&(1===c?E._tr_align(m):5!==c&&(E._tr_stored_block(m,
0,0,!1),3===c&&(e(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(d),0===d.avail_out))return m.last_flush=-1,H}return c!==F?H:0>=m.wrap?1:(2===m.wrap?(l(m,255&d.adler),l(m,d.adler>>8&255),l(m,d.adler>>16&255),l(m,d.adler>>24&255),l(m,255&d.total_in),l(m,d.total_in>>8&255),l(m,d.total_in>>16&255),l(m,d.total_in>>24&255)):(n(m,d.adler>>>16),n(m,65535&d.adler)),g(d),0=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;n=b.next_in;m=b.input;b.avail_in=f;b.next_in=
+e!==ea&&69!==e&&73!==e&&91!==e&&103!==e&&e!==da&&666!==e?b(d,I):(d.state=null,e===da?b(d,-3):H)):I};d.deflateSetDictionary=function(b,d){var c,f,g,k,l,n,m;f=d.length;if(!b||!b.state||(c=b.state,k=c.wrap,2===k||1===k&&c.status!==ea||c.lookahead))return I;1===k&&(b.adler=A(b.adler,d,f,0));c.wrap=0;f>=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;n=b.next_in;m=b.input;b.avail_in=f;b.next_in=
0;b.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<z&&(v+=J[f++]<>>24,v>>>=D,z-=D,D=B>>>16&255,0===D)L[n++]=65535&B;else{if(!(16&D)){if(0===(64&D)){B=y[(65535&B)+(v&(1<>>=D,z-=D);15>z&&(v+=J[f++]<>>24,v>>>=D,z-=D,D=B>>>16&255,
-!(16&D)){if(0===(64&D)){B=x[(65535&B)+(v&(1<r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=D,z-=D,D=n-m,F>D){if(D=F-D,D>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=t,0===u){if(B+=s-D,Dz&&(v+=I[f++]<>>24,v>>>=D,z-=D,D=B>>>16&255,0===D)L[n++]=65535&B;else{if(!(16&D)){if(0===(64&D)){B=y[(65535&B)+(v&(1<>>=D,z-=D);15>z&&(v+=I[f++]<>>24,v>>>=D,z-=D,D=B>>>16&255,
+!(16&D)){if(0===(64&D)){B=x[(65535&B)+(v&(1<r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=D,z-=D,D=n-m,F>D){if(D=F-D,D>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=t,0===u){if(B+=s-D,D>3;f-=G;z-=G<<3;b.next_in=f;b.next_out=n;b.avail_in=f>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work=
new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=x,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new s.Buf32(E),d.distcode=d.distdyn=new s.Buf32(A),d.sane=1,d.back=-1,z):y}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):y}function l(b,d){var e,c;return b&&b.state?(c=b.state,
0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15=b.wsize?(s.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),s.arraySet(b.window,d,e-
-c,f,b.wnext),c-=f,c?(s.arraySet(b.window,d,e-c,c,0),b.wnext=c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whaveC;){if(0===n)break a;n--;A+=f[k++]<>>8&255;c.check=u(c.check,Q,2,0);C=A=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),
!(1&c.wrap)||(((255&A)<<8)+(A>>8))%31){d.msg="incorrect header check";c.mode=30;break}if(8!==(15&A)){d.msg="unknown compression method";c.mode=30;break}if(A>>>=4,C-=4,V=(15&A)+8,0===c.wbits)c.wbits=V;else if(V>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<C;){if(0===n)break a;n--;A+=f[k++]<>8&1);512&c.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,c.check=u(c.check,Q,2,0));C=A=0;c.mode=3;case 3:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,c.check=u(c.check,Q,4,0));C=A=0;c.mode=4;case 4:for(;16>C;){if(0===n)break a;n--;A+=f[k++]<>8);512&c.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,c.check=u(c.check,Q,2,0));C=A=0;c.mode=
5;case 5:if(1024&c.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<>>8&255,c.check=u(c.check,Q,2,0));C=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(M=c.length,M>n&&(M=n),M&&(c.head&&(V=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),s.arraySet(c.head.extra,f,k,M,V)),512&c.flags&&(c.check=u(c.check,f,M,k)),n-=M,k+=M,c.length-=M),c.length))break a;c.length=0;c.mode=
7;case 7:if(2048&c.flags){if(0===n)break a;M=0;do V=f[k+M++],c.head&&V&&65536>c.length&&(c.head.name+=String.fromCharCode(V));while(V&&Mc.length&&(c.head.comment+=String.fromCharCode(V));while(V&&MC;){if(0===n)break a;n--;A+=f[k++]<>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<>>=
-7&C;C-=7&C;c.mode=27;break}for(;3>C;){if(0===n)break a;n--;A+=f[k++]<>>=1,C-=1,3&A){case 0:c.mode=14;break;case 1:I=c;if(B){S=void 0;p=new s.Buf32(512);r=new s.Buf32(32);for(S=0;144>S;)I.lens[S++]=8;for(;256>S;)I.lens[S++]=9;for(;280>S;)I.lens[S++]=7;for(;288>S;)I.lens[S++]=8;v(1,I.lens,0,288,p,0,I.work,{bits:9});for(S=0;32>S;)I.lens[S++]=5;v(2,I.lens,0,32,r,0,I.work,{bits:5});B=!1}I.lencode=p;I.lenbits=9;I.distcode=r;I.distbits=5;if(c.mode=20,6===e){A>>>=2;C-=2;break a}break;
+7&C;C-=7&C;c.mode=27;break}for(;3>C;){if(0===n)break a;n--;A+=f[k++]<>>=1,C-=1,3&A){case 0:c.mode=14;break;case 1:J=c;if(B){S=void 0;p=new s.Buf32(512);r=new s.Buf32(32);for(S=0;144>S;)J.lens[S++]=8;for(;256>S;)J.lens[S++]=9;for(;280>S;)J.lens[S++]=7;for(;288>S;)J.lens[S++]=8;v(1,J.lens,0,288,p,0,J.work,{bits:9});for(S=0;32>S;)J.lens[S++]=5;v(2,J.lens,0,32,r,0,J.work,{bits:5});B=!1}J.lencode=p;J.lenbits=9;J.distcode=r;J.distbits=5;if(c.mode=20,6===e){A>>>=2;C-=2;break a}break;
case 2:c.mode=17;break;case 3:d.msg="invalid block type",c.mode=30}A>>>=2;C-=2;break;case 14:A>>>=7&C;for(C-=7&C;32>C;){if(0===n)break a;n--;A+=f[k++]<>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&A,A=0,C=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(M=c.length){if(M>n&&(M=n),M>E&&(M=E),0===M)break a;s.arraySet(g,f,k,M,l);n-=M;k+=M;E-=M;l+=M;c.length-=M;break}c.mode=12;break;case 17:for(;14>C;){if(0===n)break a;n--;A+=f[k++]<<
C;C+=8}if(c.nlen=(31&A)+257,A>>>=5,C-=5,c.ndist=(31&A)+1,A>>>=5,C-=5,c.ncode=(15&A)+4,A>>>=4,C-=4,286C;){if(0===n)break a;n--;A+=f[k++]<>>=3;C-=3}for(;19>c.have;)c.lens[ga[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,aa={bits:c.lenbits},Y=v(0,c.lens,0,19,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Y){d.msg="invalid code lengths set";
-c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have>>24,S=65535&W,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<S)A>>>=K,C-=K,c.lens[c.have++]=S;else{if(16===S){for(I=K+2;C>>=K,C-=K,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}V=c.lens[c.have-1];M=3+(3&A);A>>>=2;C-=2}else if(17===S){for(I=K+3;C>>=K;C-=K;V=0;M=3+(7&A);
-A>>>=3;C-=3}else{for(I=K+7;C>>=K;C-=K;V=0;M=11+(127&A);A>>>=7;C-=7}if(c.have+M>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;M--;)c.lens[c.have++]=V}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,aa={bits:c.lenbits},Y=v(1,c.lens,0,c.nlen,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Y){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=
-c.distdyn,aa={bits:c.distbits},Y=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,aa),c.distbits=aa.bits,Y){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=n&&258<=E){d.next_out=l;d.avail_out=E;d.next_in=k;d.avail_in=n;c.hold=A;c.bits=C;t(d,P);l=d.next_out;g=d.output;E=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;A=c.hold;C=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;W=c.lencode[A&(1<>>24,I=W>>>16&255,S=65535&W,!(K<=
-C);){if(0===n)break a;n--;A+=f[k++]<>Z)],K=W>>>24,I=W>>>16&255,S=65535&W,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,c.length=S,0===I){c.mode=26;break}if(32&I){c.back=-1;c.mode=12;break}if(64&I){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&I;c.mode=22;case 22:if(c.extra){for(I=c.extra;C>>=c.extra;C-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;W=c.distcode[A&(1<>>24,I=W>>>16&255,S=65535&W,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<>Z)],K=W>>>24,I=W>>>16&255,S=65535&W,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,64&I){d.msg="invalid distance code";c.mode=30;break}c.offset=S;c.extra=15&I;c.mode=24;case 24:if(c.extra){for(I=
-c.extra;C>>=c.extra;C-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===E)break a;if(M=P-E,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,U=c.wsize-M):U=c.wnext-M;M>c.length&&(M=c.length);I=c.window}else I=g,U=l-c.offset,M=c.length;M>E&&(M=E);E-=M;c.length-=M;do g[l++]=I[U++];while(--M);
+c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have>>24,S=65535&W,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<S)A>>>=K,C-=K,c.lens[c.have++]=S;else{if(16===S){for(J=K+2;C>>=K,C-=K,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}V=c.lens[c.have-1];M=3+(3&A);A>>>=2;C-=2}else if(17===S){for(J=K+3;C>>=K;C-=K;V=0;M=3+(7&A);
+A>>>=3;C-=3}else{for(J=K+7;C>>=K;C-=K;V=0;M=11+(127&A);A>>>=7;C-=7}if(c.have+M>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;M--;)c.lens[c.have++]=V}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,aa={bits:c.lenbits},Y=v(1,c.lens,0,c.nlen,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Y){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=
+c.distdyn,aa={bits:c.distbits},Y=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,aa),c.distbits=aa.bits,Y){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=n&&258<=E){d.next_out=l;d.avail_out=E;d.next_in=k;d.avail_in=n;c.hold=A;c.bits=C;t(d,P);l=d.next_out;g=d.output;E=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;A=c.hold;C=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;W=c.lencode[A&(1<>>24,J=W>>>16&255,S=65535&W,!(K<=
+C);){if(0===n)break a;n--;A+=f[k++]<>Z)],K=W>>>24,J=W>>>16&255,S=65535&W,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,c.length=S,0===J){c.mode=26;break}if(32&J){c.back=-1;c.mode=12;break}if(64&J){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&J;c.mode=22;case 22:if(c.extra){for(J=c.extra;C>>=c.extra;C-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;W=c.distcode[A&(1<>>24,J=W>>>16&255,S=65535&W,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<>Z)],K=W>>>24,J=W>>>16&255,S=65535&W,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,64&J){d.msg="invalid distance code";c.mode=30;break}c.offset=S;c.extra=15&J;c.mode=24;case 24:if(c.extra){for(J=
+c.extra;C>>=c.extra;C-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===E)break a;if(M=P-E,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,U=c.wsize-M):U=c.wnext-M;M>c.length&&(M=c.length);J=c.window}else J=g,U=l-c.offset,M=c.length;M>E&&(M=E);E-=M;c.length-=M;do g[l++]=J[U++];while(--M);
0===c.length&&(c.mode=21);break;case 26:if(0===E)break a;g[l++]=c.length;E--;c.mode=21;break;case 27:if(c.wrap){for(;32>C;){if(0===n)break a;n--;A|=f[k++]<C;){if(0===n)break a;n--;A+=f[k++]<c.mode&&(27>c.mode||4!==e))&&m(d,d.output,d.next_out,P-d.avail_out)?(c.mode=31,-4):(O-=d.avail_in,P-=d.avail_out,d.total_in+=O,d.total_out+=P,c.total+=P,c.wrap&&P&&(d.adler=c.check=c.flags?u(c.check,g,P,d.next_out-P):q(c.check,g,P,d.next_out-P)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:
0)+(20===c.mode||15===c.mode?256:0),(0===O&&0===P||4===e)&&Y===z&&(Y=-5),Y)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,z};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,z)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:m(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,z)):
y};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,
-16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,u,t){var v,z,y,x,E,A,B,D;x=t.bits;for(var G=0,F=0,H=0,J=0,L=0,N=0,T=0,X=v=0,R=0,C=null,O=0,P=new b.Buf16(16),N=new b.Buf16(16),M=null,U=0,G=0;15>=G;G++)P[G]=0;for(F=0;FJ&&(L=J),0===J)return s[q++]=20971520,s[q++]=20971520,t.bits=1,0;for(H=1;H=G;G++)if(v<<=1,v-=P[G],0>v)return-1;if(0<
-v&&(0===d||1!==J))return-1;N[1]=0;for(G=1;15>G;G++)N[G+1]=N[G]+P[G];for(F=0;FE?(B=M[U+u[F]],D=C[O+u[F]]):(B=96,D=0);v=1<>T)+z]=A<<24|B<<16|D|0;while(0!==z);for(v=1<>=1;if(0!==v?(R&=v-1,R+=v):R=0,F++,0===--P[G]){if(G===J)break;
-G=c[f+u[F]]}if(G>L&&(R&r)!==y){0===T&&(T=L);x+=H;N=G-T;for(v=1<=v));)N++,v<<=1;if(X+=1<=G;G++)P[G]=0;for(F=0;FI&&(L=I),0===I)return s[q++]=20971520,s[q++]=20971520,t.bits=1,0;for(H=1;H=G;G++)if(v<<=1,v-=P[G],0>v)return-1;if(0<
+v&&(0===d||1!==I))return-1;N[1]=0;for(G=1;15>G;G++)N[G+1]=N[G]+P[G];for(F=0;FE?(B=M[U+u[F]],D=C[O+u[F]]):(B=96,D=0);v=1<>T)+z]=A<<24|B<<16|D|0;while(0!==z);for(v=1<>=1;if(0!==v?(R&=v-1,R+=v):R=0,F++,0===--P[G]){if(G===I)break;
+G=c[f+u[F]]}if(G>L&&(R&r)!==y){0===T&&(T=L);x+=H;N=G-T;for(v=1<=v));)N++,v<<=1;if(X+=1<>>8&255}function l(b,d,e){b.bi_valid>X-e?(b.bi_buf|=d<>X-b.bi_valid,b.bi_valid+=e-X):(b.bi_buf|=d<>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(T+1),g=0;for(c=1;c<=T;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=m(f[c]++,c))}function r(b){var d;for(d=0;d>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(T+1),g=0;for(c=1;c<=T;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=m(f[c]++,c))}function r(b){var d;for(d=0;dc?ea[c]:ea[256+(c>>>7)],n(b,g,e),k=U[g],0!==k&&(c-=Y[g],l(b,c,k)));while(mb.heap_len;)f=b.heap[++b.heap_len]=2>n?++n:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=n;for(e=b.heap_len>>1;1<=e;e--)u(b,g,e);f=l;
do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,g,1),c=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,u(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,t,k=d.dyn_tree,l=d.max_code,q=d.stat_desc.static_tree,v=d.stat_desc.has_stree,z=d.stat_desc.extra_bits,x=d.stat_desc.extra_base,y=d.stat_desc.max_length,r=0;for(c=0;c<=T;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+
1]=0;for(e=b.heap_max+1;ey&&(c=y,r++),k[2*f+1]=c,f>l||(b.bl_count[c]++,m=0,f>=x&&(m=z[f-x]),t=k[2*f],b.opt_len+=t*(c+m),v&&(b.static_len+=t*(q[2*f+1]+m)));if(0!==r){do{for(c=y-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[y]--;r-=2}while(0l||(k[2*m+1]!==c&&(b.opt_len+=(c-k[2*m+1])*k[2*m],k[2*m+1]=c),f--)}p(g,n,b.bl_count)}function z(b,d,e){var c,f,g=-1,k=d[1],l=0,n=7,
m=4;0===k&&(n=138,m=3);d[2*(e+1)+1]=65535;for(c=0;c<=e;c++)f=k,k=d[2*(c+1)+1],++l=l?b.bl_tree[2*O]++:b.bl_tree[2*P]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function y(b,d,e){var c,f,g=-1,k=d[1],m=0,t=7,u=4;0===k&&(t=138,u=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++m=m?
(n(b,O,b.bl_tree),l(b,m-3,3)):(n(b,P,b.bl_tree),l(b,m-11,7));m=0;g=f;0===k?(t=138,u=3):f===k?(t=6,u=3):(t=7,u=4)}}function x(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(d=32;df;f++){V[f]=c;for(d=0;d<1<f;f++){Y[f]=c;for(d=0;d<1<>=7;f=d;)S[2*d+1]=8,d++,k[8]++;for(;255>=d;)S[2*d+1]=9,d++,k[9]++;for(;279>=d;)S[2*d+1]=7,d++,k[7]++;for(;287>=d;)S[2*d+1]=8,d++,k[8]++;p(S,H+1,k);for(d=0;df;f++){V[f]=c;for(d=0;d<1<f;f++){Y[f]=c;for(d=0;d<1<>=7;f=d;)S[2*d+1]=8,d++,k[8]++;for(;255>=d;)S[2*d+1]=9,d++,k[9]++;for(;279>=d;)S[2*d+1]=7,d++,k[7]++;for(;287>=d;)S[2*d+1]=8,d++,k[8]++;p(S,H+1,k);for(d=0;d>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)E(b,d,e,
c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),t(b,S,Z);else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,
d--,b.dyn_ltree[2*(da[e]+F+1)]++,b.dyn_dtree[2*(256>d?ea[d]:ea[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);n(b,R,S);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(c,f,d){f.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=
@@ -658,8 +658,8 @@ mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.
mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var c=this.getEdgeWidth();this.isMarkerStart()&&(c=Math.max(c,this.getStartArrowWidth()));this.isMarkerEnd()&&(c=Math.max(c,this.getEndArrowWidth()));a.grow((c/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,c){var f=this.strokewidth;this.outline&&(f=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+f,b=this.getEndArrowWidth()+f,e=this.outline?this.getEdgeWidth()+f:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),n=g?0:this.arrowSpacing+f/2,m=this.startSize+f,f=this.endSize+f,p=this.isArrowRounded(),r=c[c.length-1],s=1;sR&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(O,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(O,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=m||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){v=l;var n=b.model.isEdge(l.cell)?b.view.getPoint(l):
new mxPoint(l.getCenterX(),l.getCenterY()),n=new mxRectangle(n.x-this.refreshTarget.width/2,n.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);B.style.left=Math.floor(n.x)+"px";B.style.top=Math.floor(n.y)+"px";null==D&&(b.container.appendChild(B),D=B.parentNode);g(a,e,n,B)}else null==v||!mxUtils.contains(v,a,e)||1500R&&R>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=u&&n){k=[G,F,y,x,E,A];for(n=0;nR&&R>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=u&&n){k=[G,F,y,x,E,A];for(n=0;n=b&&(u.y+u.height<=l&&u.y>=a&&u.x+u.width<=k)&&f.push(t);this.getAllCells(b,a,d,c,t,f)}}}return f};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:E.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style,
-"locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();A=null!=d&&!this.isSelectionEmpty()&&!this.isCellSelected(d.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),e=a.getProperty("cell");
-null==e?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=A?this.addSelectionCells(A):1a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return D.apply(this,arguments)};var G=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=
this.graph.getModel(),d=a.getParent(b.cell),e=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=e&&e.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(a=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))):G.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell),
c=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()a.maxImageSize||l>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=C;l*=C}r>A?(A=Math.round(A*t/r),r=t):(r=Math.round(r*v/A),A=v);var O=document.createElement("div");O.setAttribute("draggable","true");O.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";O.style.position="relative";
O.style.cursor="move";mxUtils.setPrefixedStyle(O.style,"transition","transform .1s ease-in-out");if(null!=b){var P=document.createElement("img");P.setAttribute("src",E.convert(b));P.style.width=r+"px";P.style.height=A+"px";P.style.margin="10px";P.style.paddingBottom=Math.floor((v-A)/2)+"px";P.style.paddingLeft=Math.floor((t-r)/2)+"px";O.appendChild(P)}else if(null!=n){var M=a.stringToCells(a.editor.graph.decompress(n.xml));0z?y-1:y,0,m.splice(z,1)[0]),s.insertBefore(s.children[z],s.children[y])):(m.push(m.splice(z,1)[0]),s.appendChild(s.children[z]));else if(0f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+J.value+"/"+r.value;var b=
+document.createElement("input");r.setAttribute("type","text");mxUtils.write(k,"Path:");g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(r);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var s=a.lastIndexOf(".");0f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+I.value+"/"+r.value;var b=
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(l.value+
-":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c){var d=this.spinner.pause(),e=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
-b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){d();var e=null!=a.getTitle()?a.getTitle():this.defaultFilename,f=e.lastIndexOf("."),g=e;0]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
-g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>
-6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
-this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=a.length,L=J,N=[],T=mxUtils.bind(this,function(a,b){N[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(N);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;db};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=
-0;e>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=
-e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>
-8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,
-e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border=
-"1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=
+g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
+15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=
+c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=
+a.length,L=I,N=[],T=mxUtils.bind(this,function(a,b){N[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(N);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;db};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,
+k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+
+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
+function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+
+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;gmxUtils.indexOf(this.settings.customLibraries,a)&&this.settings.customLibraries.push(a);mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,this.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return this.settings.customLibraries},getPlugins:function(){return this.settings.plugins},setPlugins:function(a){this.settings.plugins=a},getFormatWidth:function(){return parseInt(this.settings.formatWidth)},setFormatWidth:function(a){this.settings.formatWidth=
a},getCurrentEdgeStyle:function(){return this.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){this.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return this.settings.currentVertexStyle},setCurrentVertexStyle:function(a){this.settings.currentVertexStyle=a},isCreateTarget:function(){return this.settings.createTarget},setCreateTarget:function(a){this.settings.createTarget=a},getPageFormat:function(){return this.settings.pageFormat},setPageFormat:function(a){this.settings.pageFormat=
@@ -7644,7 +7645,8 @@ ChatWindow.prototype.collaboratorListener=function(a){var c=null;if(!a.collabora
ChatWindow.prototype.htmlEscape=function(a){return a.replace(/&/g,"\x26amp;").replace(//g,"\x26gt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26#039;")};App=function(a,c,f){EditorUi.call(this,a,c,null!=f?f:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII\x3d":
(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var f=window.open(a);null==f||void 0===f?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateUi();a=document.createElement("canvas");this.canvasSupported=!(!a.getContext||!a.getContext("2d"));window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.isOffline()||(EditDataDialog.placeholderHelpLink=
"https://support.draw.io/questions/9338941");this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(a=0;anavigator.userAgent.indexOf("MSIE")||9<=document.documentMode;if(!mxClient.IS_CHROMEAPP&&("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||
null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"==urlParams.chrome&&(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript("https://js.live.net/v5.0/wl.js"):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
@@ -7682,7 +7684,8 @@ this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fir
this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);
mxSettings.save()}));mxClient.IS_CHROMEAPP&&(this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave());null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);if(!this.editor.chromeless&&null!=this.sidebar&&(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0)))this.toggleScratchpad(),mxSettings.save();this.addListener("formatWidthChanged",
function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
-App.prototype.checkLicense=function(){var a=this.drive.getUser(),a=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=a){var c=a.lastIndexOf("@"),f=a;0<=c&&(f=a.substring(c+1));mxUtils.post("/license","domain\x3d"+encodeURIComponent(f)+"\x26ts\x3d"+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200==a.getStatus()){var b=a.getText();if(0e){var g="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain\x3d"+encodeURIComponent(c);f.style.height="100%";f.style.margin="0px";f.style.display=
"";0>e?(this.footerHeight=80,f.innerHTML='\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert geBlink"\x3e\x3ca href\x3d"'+g+'" style\x3d"padding-top:16px;" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseHasExpired",[c,b.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e"):(this.footerHeight=46,f.innerHTML=
'\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert"\x3e\x3ca href\x3d"'+g+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseWillExpire",[c,b.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e");this.refresh()}}return d};
@@ -7905,36 +7908,38 @@ this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get(
c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,k=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;k.apply(g,arguments);b&&(null==a.getCurrentFile()&&"1"!=urlParams.embed)&&a.showSplash()}}}
function m(b){b.pickFile(function(c){if(a.spinner.spin(document.body,mxResources.get("loading")))if(b==a.dropbox){var d=/(\.png)$/i.test(c)?"image/png":"text/xml";a.loadUrl(c,function(a){n(a,d,c)},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},"image/png"==d)}else b.getFile(c,function(a){var b=/(\.png)$/i.test(a.getTitle())?"image/png":"text/xml";n(a.getData(),b,a.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},!0)},!0)}var n=
mxUtils.bind(this,function(b,c,e){"image/png"==c?a.loadImage(b,mxUtils.bind(this,function(g){a.resizeImage(g,b,mxUtils.bind(this,function(g,k,l){g=Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/l));a.importFile(b,c,0,0,Math.round(k*g),Math.round(l*g),e,function(b){a.spinner.stop();d.setSelectionCells(b)})}),!0)})):a.importFile(b,c,0,0,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b)})});null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){m(a.drive)},c):e&&b.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){m(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){m(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);b.addItem(mxResources.get("browser")+
-"...",null,function(){l(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+L.value+"/"+r.value;var b=
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(l.value+
-":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c){var d=this.spinner.pause(),e=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
-b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){d();var e=null!=a.getTitle()?a.getTitle():this.defaultFilename,f=e.lastIndexOf("."),g=e;0]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
-g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>
-6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
-this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=a.length,K=L,R=[],T=mxUtils.bind(this,function(a,b){R[a]=b;if(0==--K){this.spinner.stop();if(null!=k)k(R);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;db};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=
-0;e>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=
-e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>
-8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,
-e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border=
-"1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=
+g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
+15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=
+c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=
+a.length,K=L,R=[],T=mxUtils.bind(this,function(a,b){R[a]=b;if(0==--K){this.spinner.stop();if(null!=k)k(R);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;db};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,
+k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+
+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
+function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+
+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g>1,filter:m}),d("fill",{color:"string"==typeof e.color?e.color:e.color[a%e.color.length],opacity:e.opacity}),d("stroke",{opacity:0}))))}var k,l=e.length+e.width,m=2*l;k=2*-(e.width+e.length)+"px";var n=b(f(),{position:"absolute",top:k,left:k});if(e.shadow)for(k=1;k<=e.lines;k++)g(k,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius\x3d2,makeshadow\x3d1,shadowopacity\x3d.3)");for(k=1;k<=e.lines;k++)g(k);return c(a,n)};g.prototype.opacity=function(b,a,d,e){b=b.firstChild;e=e.shadow&&
e.lines||0;b&&a+e>1)+"px"})}for(var k,
+{spin:function(d){this.stop();var e=this,c=e.opts,f=e.el=b(a(0,{className:c.className}),{position:c.position,width:0,zIndex:c.zIndex});c.radius+c.length+c.width;if(d&&(d.insertBefore(f,d.firstChild||null),b(f,{left:c.left,top:c.top})),f.setAttribute("role","progressbar"),e.lines(f,e.opts),!l){var g,k=0,m=(c.lines-1)*(1-c.direction)/2,n=c.fps,p=n/c.speed,r=(1-c.opacity)/(p*c.trail/100),s=p/c.lines;!function G(){k++;for(var b=0;b>1)+"px"})}for(var k,
m=0,n=(e.lines-1)*(1-e.direction)/2;m]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
-"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function N(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var q=n.cssPropBits,p=q&80,u=q&1536,r=NaN,s=0,F=0;s=E)z=q&1?z:"";else if(G=z.charCodeAt(1),B=z.charCodeAt(2),H=48<=G&&57>=G,A=48<=B&&57>=B,43===E&&(H||46===G&&A))z=q&1?(H?"":"0")+z.substring(1):"";else if(45===E&&(H||46===G&&A))z=q&4?(H?"-":"-0")+z.substring(1):q&1?"0":"";else if(46===E&&H)z=q&1?"0"+z:"";else if('url("'===z.substring(0,
+m);var n=a,p=a,r=a,s=a;(function(){function b(a){return"string"===typeof a?'url("'+a.replace(A,g)+'")':'url("about:blank")'}function g(b){return B[b]}function k(b,a){return b?m.ha.N(b,a):a}function t(b,a,d){if(!d)return f;var e=(""+b).match(E);return e&&(!e[1]||F.test(e[1]))?d(b,a):f}function D(b){return b.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var A=/[\n\f\r\"\'()*<>]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
+"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function N(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var q=n.cssPropBits,p=q&80,u=q&1536,r=NaN,s=0,G=0;s=E)z=q&1?z:"";else if(F=z.charCodeAt(1),B=z.charCodeAt(2),H=48<=F&&57>=F,A=48<=B&&57>=B,43===E&&(H||46===F&&A))z=q&1?(H?"":"0")+z.substring(1):"";else if(45===E&&(H||46===F&&A))z=q&4?(H?"-":"-0")+z.substring(1):q&1?"0":"";else if(46===E&&H)z=q&1?"0"+z:"";else if('url("'===z.substring(0,
5))z=f&&q&16?b(t(k(g,c[s].substring(5,z.length-2)),d,f)):"";else if("("===z.charAt(z.length-1))a:{U=c;ea=s;z=1;aa=ea+1;for(E=U.length;aag&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?a(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function a(c,f,g,k){++f;for(k.startBlock&&k.startBlock();fm)return m=~m,m===k?m+1:m;var n=b[m];if("{"!==n)return m===k?m+1:m;a=m+1;m>k&&" "===b[m-1]&&--m;for(g.startRuleset&&g.startRuleset(b.slice(k,m));an)n=~n;else{for(var q=[],p=0,t=a;te.windowBits&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15));!(0<=e.windowBits&&16>e.windowBits)||d&&d.windowBits||(e.windowBits+=32);15e.windowBits&&0===(15&e.windowBits)&&(e.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;d=g.inflateInit2(this.strm,e.windowBits);if(d!==m.Z_OK)throw Error(n[d]);
-this.header=new r;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/constants"),n=c("./zlib/messages"),p=c("./zlib/zstream"),r=c("./zlib/gzheader"),s=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,n,p,r,A=this.strm,B=this.options.chunkSize,E=this.options.dictionary,G=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH;
-"string"==typeof b?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(B),A.next_out=0,A.avail_out=B),e=g.inflate(A,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&E&&(r="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===s.call(E)?new Uint8Array(E):E,e=g.inflateSetDictionary(this.strm,r)),e===m.Z_BUF_ERROR&&!0===G&&(e=m.Z_OK,G=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e),
-this.ended=!0,!1;A.next_out&&(0!==A.avail_out&&e!==m.Z_STREAM_END&&(0!==A.avail_in||c!==m.Z_FINISH&&c!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(A.output,A.next_out),n=A.next_out-f,p=l.buf2string(A.output,f),A.next_out=n,A.avail_out=B-n,n&&k.arraySet(A.output,A.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(A.output,A.next_out))));0===A.avail_in&&0===A.avail_out&&(G=!0)}while((0f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=fu
0))}function k(b,d){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function m(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function n(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-X?b.strstart-(b.w_size-X):0,n=b.window,q=b.w_mask,p=b.prev,t=b.strstart+R,u=n[g+k-1],r=n[g+k];b.prev_length>=b.good_match&&
(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===r&&n[e+k-1]===u&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;e++;do;while(n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&gk){if(b.match_start=d,k=c,c>=l)break;u=n[g+k-1];r=n[g+k]}}while((d=p[d&q])>m&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
g+(g-X)){x.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,x.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=A(d.adler,c,l,k):2===d.state.wrap&&(d.adler=B(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)),
-b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<<
+b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<<
b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==e&&b.strstart-e<=b.w_size-X&&(b.match_length=n(b,e)),b.match_length>=K)if(c=D._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===N||b.match_length===K&&4096=
+b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===N||b.match_length===K&&4096=
K&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-K;c=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:ca,d.adler=2===e.wrap?0:1,e.last_flush=G,D._tr_init(e),H):b(d,J)}function v(b){var d=u(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
+this.lit_bufsize=this.l_buf=0}function u(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=W,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:ca,d.adler=2===e.wrap?0:1,e.last_flush=F,D._tr_init(e),H):b(d,J)}function v(b){var d=u(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return J;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15g||g>C||c!==Q||8>f||15e||9k||k>S)return b(d,J);8===f&&(f=9);var m=new t;return d.state=m,m.strm=d,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===G)return T;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-X&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=0,d===F?(k(b,!0),0===b.strm.avail_out?ba:Y):(b.strstart>b.block_start&&k(b,!1),T)}),new q(4,4,8,
+m.w_size),m.head=new x.Buf16(m.hash_size),m.prev=new x.Buf16(m.w_size),m.lit_bufsize=1<b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===F)return T;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-X&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=0,d===G?(k(b,!0),0===b.strm.avail_out?ba:Y):(b.strstart>b.block_start&&k(b,!1),T)}),new q(4,4,8,
4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return z(b,d,Q,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?J:(b.state.gzhead=d,H):J};d.deflate=function(d,c){var f,n,q,t;if(!d||!d.state||5c)return d?b(d,J):J;if(n=d.state,!d.output||!d.input&&0!==d.avail_in||
-666===n.status&&c!==F)return b(d,0===d.avail_out?-5:J);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===da)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),
+666===n.status&&c!==G)return b(d,0===d.avail_out?-5:J);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===da)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),
l(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(d.adler=B(d.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ca)):(q=Q+(n.w_bits-8<<4)<<8,t=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,q|=t<<6,0!==n.strstart&&(q|=32),n.status=ca,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,d.adler>>>16),m(n,65535&d.adler)),d.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535&
n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&
(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){t=1;break}t=n.gzindexq&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),
q=n.pending,n.pending===n.pending_buf_size)){t=1;break}t=n.gzindexq&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(d),n.pending+2<=n.pending_buf_size&&(l(n,255&d.adler),l(n,d.adler>>8&255),d.adler=0,n.status=ca)):n.status=ca),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush=
--1,H}else if(0===d.avail_in&&(c<<1)-(4=K&&0n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
-K?(u=D._tr_tally(n,1,n.match_length-K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(u=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),u&&(k(n,!1),0===n.strm.avail_out)){u=T;break a}}u=(n.insert=0,c===F?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?T:Z)}else u=y[n.level].func(n,c);if(u!==ba&&u!==Y||(n.status=666),u===T||u===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(u===Z&&(1===c?D._tr_align(n):5!==c&&(D._tr_stored_block(n,
-0,0,!1),3===c&&(e(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,H}return c!==F?H:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0=K&&0n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
+K?(u=D._tr_tally(n,1,n.match_length-K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(u=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),u&&(k(n,!1),0===n.strm.avail_out)){u=T;break a}}u=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?T:Z)}else u=y[n.level].func(n,c);if(u!==ba&&u!==Y||(n.status=666),u===T||u===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(u===Z&&(1===c?D._tr_align(n):5!==c&&(D._tr_stored_block(n,
+0,0,!1),3===c&&(e(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,H}return c!==G?H:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=f;b.next_in=
0;b.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<z&&(v+=J[f++]<>>24,v>>>=E,z-=E,E=B>>>16&255,0===E)L[m++]=65535&B;else{if(!(16&E)){if(0===(64&E)){B=y[(65535&B)+(v&(1<>>=E,z-=E);15>z&&(v+=J[f++]<>>24,v>>>=E,z-=E,E=B>>>16&255,
-!(16&E)){if(0===(64&E)){B=x[(65535&B)+(v&(1<r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=E,z-=E,E=m-n,F>E){if(E=F-E,E>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=u,0===t){if(B+=s-E,E>3;f-=G;z-=G<<3;b.next_in=f;b.next_out=m;b.avail_in=fz&&(v+=J[f++]<>>24,v>>>=E,z-=E,E=B>>>16&255,0===E)L[m++]=65535&B;else{if(!(16&E)){if(0===(64&E)){B=y[(65535&B)+(v&(1<>>=E,z-=E);15>z&&(v+=J[f++]<>>24,v>>>=E,z-=E,E=B>>>16&255,
+!(16&E)){if(0===(64&E)){B=x[(65535&B)+(v&(1<r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=E,z-=E,E=m-n,G>E){if(E=G-E,E>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=u,0===t){if(B+=s-E,E>3;f-=F;z-=F<<3;b.next_in=f;b.next_out=m;b.avail_in=f>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work=
new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=x,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new s.Buf32(D),d.distcode=d.distdyn=new s.Buf32(A),d.sane=1,d.back=-1,z):y}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):y}function l(b,d){var e,c;return b&&b.state?(c=b.state,
0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15=b.wsize?(s.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),s.arraySet(b.window,d,e-
@@ -168,21 +168,21 @@ m--;A+=f[k++]<>>=c.extra;C-=c.extra;c.back+
29;case 29:Z=1;break a;case 30:Z=-3;break a;case 31:return-4;default:return y}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=m,c.hold=A,c.bits=C,(c.wsize||P!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,P-d.avail_out)?(c.mode=31,-4):(O-=d.avail_in,P-=d.avail_out,d.total_in+=O,d.total_out+=P,c.total+=P,c.wrap&&P&&(d.adler=c.check=c.flags?t(c.check,g,P,d.next_out-P):q(c.check,g,P,d.next_out-P)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15===
c.mode?256:0),(0===O&&0===P||4===e)&&Z===z&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,z};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,z)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:n(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,z)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,
-25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,t,u){var v,z,y,x,D,A,B,E;x=u.bits;for(var G=0,F=0,H=0,J=0,L=0,N=0,S=0,W=0,Q=0,C=null,O=0,P=new b.Buf16(16),N=new b.Buf16(16),M=null,V=0,G=0;15>=G;G++)P[G]=0;for(F=0;FJ&&(L=J),0===J)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H=G;G++)if(v<<=1,v-=P[G],0>v)return-1;if(0G;G++)N[G+
-1]=N[G]+P[G];for(F=0;FD?(B=M[V+t[F]],E=C[O+t[F]]):(B=96,E=0);v=1<>S)+z]=A<<24|B<<16|E|0;while(0!==z);for(v=1<>=1;if(0!==v?(Q&=v-1,Q+=v):Q=0,F++,0===--P[G]){if(G===J)break;G=c[f+t[F]]}if(G>L&&(Q&r)!==y){0===S&&(S=L);x+=H;N=
-G-S;for(v=1<=v));)N++,v<<=1;if(W+=1<=F;F++)P[F]=0;for(G=0;GJ&&(L=J),0===J)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H=F;F++)if(v<<=1,v-=P[F],0>v)return-1;if(0F;F++)N[F+
+1]=N[F]+P[F];for(G=0;GD?(B=M[V+t[G]],E=C[O+t[G]]):(B=96,E=0);v=1<>S)+z]=A<<24|B<<16|E|0;while(0!==z);for(v=1<>=1;if(0!==v?(Q&=v-1,Q+=v):Q=0,G++,0===--P[F]){if(F===J)break;F=c[f+t[G]]}if(F>L&&(Q&r)!==y){0===S&&(S=L);x+=H;N=
+F-S;for(v=1<=v));)N++,v<<=1;if(W+=1<>>8&255}function l(b,d,e){b.bi_valid>W-e?(b.bi_buf|=d<>W-b.bi_valid,b.bi_valid+=e-W):(b.bi_buf|=d<>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(S+1),g=0;for(c=1;c<=S;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=n(f[c]++,c))}function r(b){var d;for(d=0;dc?da[c]:da[256+(c>>>7)],m(b,g,e),k=V[g],
+2*d,g=2*e;return b[f]c?da[c]:da[256+(c>>>7)],m(b,g,e),k=V[g],
0!==k&&(c-=Z[g],l(b,c,k)));while(nb.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=m;for(e=b.heap_len>>1;1<=e;e--)t(b,g,e);f=l;do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),
c=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,k=d.dyn_tree,l=d.max_code,u=d.stat_desc.static_tree,r=d.stat_desc.has_stree,v=d.stat_desc.extra_bits,s=d.stat_desc.extra_base,x=d.stat_desc.max_length,y=0;for(c=0;c<=S;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+1]=0;for(e=b.heap_max+1;ex&&(c=x,y++),k[2*f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=s&&(n=v[f-s]),q=k[2*f],b.opt_len+=q*(c+n),r&&(b.static_len+=q*(u[2*f+1]+n)));if(0!==y){do{for(c=x-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[x]--;y-=2}while(0l||(k[2*n+1]!==c&&(b.opt_len+=(c-k[2*n+1])*k[2*n],k[2*n+1]=c),f--)}p(g,m,b.bl_count)}function z(b,d,e){var c,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(e+1)+1]=65535;for(c=0;c<=
e;c++)f=k,k=d[2*(c+1)+1],++l=l?b.bl_tree[2*O]++:b.bl_tree[2*P]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function y(b,d,e){var c,f,g=-1,k=d[1],n=0,q=7,p=4;0===k&&(q=138,p=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++n=n?(m(b,O,b.bl_tree),l(b,n-3,3)):(m(b,P,b.bl_tree),l(b,
-n-11,7));n=0;g=f;0===k?(q=138,p=3):f===k?(q=6,p=3):(q=7,p=4)}}function x(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return E;for(d=32;d=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return E;for(d=32;df;f++){T[f]=c;for(d=0;d<1<f;f++){Z[f]=c;for(d=0;d<1<>=7;f=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,H+1,k);for(d=0;df;f++){Z[f]=c;for(d=0;d<1<>=7;f=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,H+1,k);for(d=0;d>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)D(b,d,e,c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),u(b,R,X);
-else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(ca[e]+F+1)]++,b.dyn_dtree[2*(256>
+else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(ca[e]+G+1)]++,b.dyn_dtree[2*(256>
d?da[d]:da[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,Q,R);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(c,f,d){f.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(c,
f,d){d=c("./lib/utils/common").assign;var b=c("./lib/deflate"),e=c("./lib/inflate");c=c("./lib/zlib/constants");var g={};d(g,b,e,c);f.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,c){var f="",d,b,e,g,k,l,m=0;for(null!=c&&c||(a=Base64._utf8_encode(a));m>2,d=(d&3)<<4|b>>4,k=(b&15)<<2|e>>6,l=e&63,isNaN(b)?k=l=64:isNaN(e)&&(l=64),f=f+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return f},decode:function(a,c){c=null!=c?c:!1;var f="",d,b,e,g,k,l=0;for(a=
@@ -668,9 +668,9 @@ function mxArrowConnector(a,c,f,d,b,e,g){mxShape.call(this);this.points=a;this.f
mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};
mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var c=this.getEdgeWidth();this.isMarkerStart()&&(c=Math.max(c,this.getStartArrowWidth()));this.isMarkerEnd()&&(c=Math.max(c,this.getEndArrowWidth()));a.grow((c/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,c){var f=this.strokewidth;this.outline&&(f=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+f,b=this.getEndArrowWidth()+f,e=this.outline?this.getEdgeWidth()+f:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+f/2,n=this.startSize+f,f=this.endSize+f,p=this.isArrowRounded(),r=c[c.length-1],s=1;sQ&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(O,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(O,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=n||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){v=l;var m=b.model.isEdge(l.cell)?b.view.getPoint(l):
new mxPoint(l.getCenterX(),l.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);B.style.left=Math.floor(m.x)+"px";B.style.top=Math.floor(m.y)+"px";null==E&&(b.container.appendChild(B),E=B.parentNode);g(a,e,m,B)}else null==v||!mxUtils.contains(v,a,e)||1500Q&&Q>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&m){k=[G,F,y,x,D,A];for(m=0;mQ&&Q>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&m){k=[F,G,y,x,D,A];for(m=0;m=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,e,d):null,d=null!=(null!=c?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),c):null)?this.fixedHandleImage:null!=c&&null!=e?this.terminalHandleImage:this.handleImage;if(null!=d)return d=new mxImageShape(new mxRectangle(0,
0,d.width,d.height),d.src),d.preserveImageAspect=!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&(d-=1);return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var B=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,a,d){this.handleImage=a==mxEvent.ROTATION_HANDLE?u:a==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return B.apply(this,arguments)};var E=mxGraphHandler.prototype.getBoundingBox;
-mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var a=this.graph.getModel(),d=a.getParent(b[0]),e=this.graph.getCellGeometry(b[0]);if(a.isEdge(d)&&null!=e&&e.relative&&(a=this.graph.view.getState(b[0]),null!=a&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return E.apply(this,arguments)};var G=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=
-this.graph.getModel(),d=a.getParent(b.cell),e=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=e&&e.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(a=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))):G.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell),
-c=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return E.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a=
+this.graph.getModel(),d=a.getParent(b.cell),e=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=e&&e.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(a=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))):F.apply(this,arguments)};var G=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell),
+c=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&G.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+J.value+"/"+r.value;var b=
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(l.value+
-":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c){var d=this.spinner.pause(),e=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
-b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){d();var e=null!=a.getTitle()?a.getTitle():this.defaultFilename,f=e.lastIndexOf("."),g=e;0]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
-g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>
-6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
-this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=a.length,L=J,N=[],S=mxUtils.bind(this,function(a,b){N[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(N);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;db};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=
-0;e>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=
-e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>
-8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,
-e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border=
-"1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=
+g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
+15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=
+c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=
+a.length,L=J,N=[],S=mxUtils.bind(this,function(a,b){N[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(N);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;db};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,
+k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+
+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
+function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+
+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;gmxUtils.indexOf(this.settings.customLibraries,a)&&this.settings.customLibraries.push(a);mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,this.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return this.settings.customLibraries},getPlugins:function(){return this.settings.plugins},setPlugins:function(a){this.settings.plugins=a},getFormatWidth:function(){return parseInt(this.settings.formatWidth)},setFormatWidth:function(a){this.settings.formatWidth=
@@ -7317,7 +7318,8 @@ delete this.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStor
App=function(a,c,f){EditorUi.call(this,a,c,null!=f?f:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII\x3d":(new Image).src=
mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var f=window.open(a);null==f||void 0===f?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateUi();a=document.createElement("canvas");this.canvasSupported=!(!a.getContext||!a.getContext("2d"));window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.isOffline()||(EditDataDialog.placeholderHelpLink=
"https://support.draw.io/questions/9338941");this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(a=0;anavigator.userAgent.indexOf("MSIE")||9<=document.documentMode;if(!mxClient.IS_CHROMEAPP&&("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||
null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"==urlParams.chrome&&(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript("https://js.live.net/v5.0/wl.js"):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
@@ -7355,7 +7357,8 @@ this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fir
this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);
mxSettings.save()}));mxClient.IS_CHROMEAPP&&(this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave());null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);if(!this.editor.chromeless&&null!=this.sidebar&&(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0)))this.toggleScratchpad(),mxSettings.save();this.addListener("formatWidthChanged",
function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
-App.prototype.checkLicense=function(){var a=this.drive.getUser(),a=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=a){var c=a.lastIndexOf("@"),f=a;0<=c&&(f=a.substring(c+1));mxUtils.post("/license","domain\x3d"+encodeURIComponent(f)+"\x26ts\x3d"+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200==a.getStatus()){var b=a.getText();if(0e){var g="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain\x3d"+encodeURIComponent(c);f.style.height="100%";f.style.margin="0px";f.style.display=
"";0>e?(this.footerHeight=80,f.innerHTML='\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert geBlink"\x3e\x3ca href\x3d"'+g+'" style\x3d"padding-top:16px;" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseHasExpired",[c,b.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e"):(this.footerHeight=46,f.innerHTML=
'\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert"\x3e\x3ca href\x3d"'+g+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseWillExpire",[c,b.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e");this.refresh()}}return d};
@@ -7442,7 +7445,7 @@ mxEvent.addGestureListeners(e,function(){},mxUtils.bind(this,function(a){n.isMou
mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(e.style.border="3px solid transparent",null!=d&&(d.style.border="3px dotted lightGray"),e.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,q(a),mxEvent.consume(a))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="visible",
e.style.border="3px solid transparent",e.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),null!=d&&(d.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=d?d.style.border="3px dotted rgb(254, 137, 12)":e.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";e.style.cursor="copy";
this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){e.style.border="3px solid transparent";e.style.cursor="";null!=d&&(d.style.border="3px dotted lightGray");0= 0)
{
domain = email.substring(at + 1);
+ email = this.crc32(email.substring(0, at)) + '@' + domain;
}
// Timestamp is workaround for cached response in certain environments
- mxUtils.post('/license', 'domain=' + encodeURIComponent(domain) + '&ts=' + new Date().getTime(),
+ mxUtils.post('/license', 'domain=' + encodeURIComponent(domain) + '&email=' +
+ encodeURIComponent(email) + '&ts=' + new Date().getTime(),
mxUtils.bind(this, function(req)
{
var registered = false;
diff --git a/war/js/diagramly/Dialogs.js b/war/js/diagramly/Dialogs.js
index c49fb11b..af4e9a2c 100644
--- a/war/js/diagramly/Dialogs.js
+++ b/war/js/diagramly/Dialogs.js
@@ -3695,7 +3695,7 @@ var CreateDialog = function(editorUi, title, createFn, cancelFn, dlgTitle, btnLa
}
}
- if (allowBrowser && isLocalStorage)
+ if (allowBrowser && isLocalStorage && urlParams['browser'] != '0')
{
var browserOption = document.createElement('option');
browserOption.setAttribute('value', App.MODE_BROWSER);
diff --git a/war/js/diagramly/EditorUi.js b/war/js/diagramly/EditorUi.js
index 4cf3ffc8..341df603 100644
--- a/war/js/diagramly/EditorUi.js
+++ b/war/js/diagramly/EditorUi.js
@@ -1696,7 +1696,7 @@
/**
*
*/
- EditorUi.prototype.uploadToImgur = function(file, base64Data, editable)
+ EditorUi.prototype.uploadToImgur = function(file, base64Data, editable, socialHandler)
{
var resume = this.spinner.pause();
@@ -1781,11 +1781,10 @@
mxResources.get('close'), mxUtils.bind(this, function()
{
this.hideDialog();
- }), null,
- mxResources.get('openInNewWindow'), mxUtils.bind(this, function()
+ }), null, mxResources.get('share'), function()
{
- window.open('http://imgur.com/' + res.data.id);
- }), false);
+ socialHandler(res.data.id);
+ }, false);
this.showDialog(dlg.container, 340, 170, true, false);
dlg.init();
});
@@ -1840,7 +1839,7 @@
/**
*
*/
- EditorUi.prototype.publishImage = function(handler)
+ EditorUi.prototype.publishImage = function(handler, socialHandler)
{
var file = this.getCurrentFile();
@@ -1868,7 +1867,7 @@
{
var xml = (editable) ? mxUtils.getXml(this.editor.getGraphXml(ignoreSelection)) : null;
var data = this.createPngDataUri(canvas, xml);
- handler(file, data.substring(data.lastIndexOf(',') + 1), editable);
+ handler(file, data.substring(data.lastIndexOf(',') + 1), editable, socialHandler);
}
catch (e)
{
@@ -1910,7 +1909,7 @@
{
if (req.getStatus() == 200)
{
- handler(file, req.getText(), editable);
+ handler(file, req.getText(), editable, socialHandler);
}
else
{
@@ -5598,6 +5597,8 @@
this.actions.get('editDiagram').setEnabled(urlParams['embed'] == '1' ||
(file != null && !file.isRestricted()));
this.actions.get('imgur').setEnabled(file != null && !file.isRestricted());
+ this.actions.get('twitter').setEnabled(file != null && !file.isRestricted());
+ this.actions.get('facebook').setEnabled(file != null && !file.isRestricted());
this.actions.get('github').setEnabled(file != null && !file.isRestricted());
this.actions.get('publishLink').setEnabled(file != null && !file.isRestricted());
this.menus.get('publish').setEnabled(file != null && !file.isRestricted());
diff --git a/war/js/diagramly/Menus.js b/war/js/diagramly/Menus.js
index 93ad8232..c64c9ea6 100644
--- a/war/js/diagramly/Menus.js
+++ b/war/js/diagramly/Menus.js
@@ -1275,10 +1275,13 @@
menu.addSeparator(parent);
- menu.addItem(mxResources.get('browser') + '...', null, function()
+ if (isLocalStorage && urlParams['browser'] != '0')
{
- importFile(false);
- }, parent);
+ menu.addItem(mxResources.get('browser') + '...', null, function()
+ {
+ importFile(false);
+ }, parent);
+ }
if (!mxClient.IS_IOS)
{
@@ -1487,7 +1490,30 @@
editorUi.actions.addAction('imgur...', mxUtils.bind(this, function()
{
- editorUi.publishImage(mxUtils.bind(editorUi, editorUi.uploadToImgur));
+ editorUi.publishImage(mxUtils.bind(editorUi, editorUi.uploadToImgur), function(imgurId)
+ {
+ window.open('https://imgur.com/' + imgurId);
+ });
+ }));
+
+ editorUi.actions.addAction('facebook...', mxUtils.bind(this, function()
+ {
+ editorUi.publishImage(mxUtils.bind(editorUi, editorUi.uploadToImgur), function(imgurId)
+ {
+ window.open('https://www.facebook.com/sharer.php?p[url]=' + encodeURIComponent('https://imgur.com/' + imgurId) +
+ '&p[images][0]=' + encodeURIComponent(imgurId + '.png'));
+ });
+ }));
+
+ editorUi.actions.addAction('twitter...', mxUtils.bind(this, function()
+ {
+ editorUi.publishImage(mxUtils.bind(editorUi, editorUi.uploadToImgur), function(imgurId)
+ {
+ window.open('https://twitter.com/intent/tweet?text=' +
+ encodeURIComponent('Check out the diagram I made with draw.io') +
+ '&via=drawio&hashtags=madewithdrawio&url=' +
+ encodeURIComponent('https://imgur.com/' + imgurId));
+ });
}));
editorUi.actions.addAction('github...', mxUtils.bind(this, function()
@@ -1507,6 +1533,8 @@
this.addMenuItems(menu, ['github'], parent);
}
+ this.addMenuItems(menu, ['twitter'], parent);
+ this.addMenuItems(menu, ['facebook'], parent);
this.addMenuItems(menu, ['imgur'], parent);
}
@@ -1736,7 +1764,7 @@
menu.addSeparator(parent);
- if (isLocalStorage)
+ if (isLocalStorage && urlParams['browser'] != '0')
{
menu.addItem(mxResources.get('browser') + '...', null, function()
{
@@ -1829,7 +1857,7 @@
menu.addSeparator(parent);
- if (isLocalStorage)
+ if (isLocalStorage && urlParams['browser'] != '0')
{
menu.addItem(mxResources.get('browser') + '...', null, function()
{
@@ -1895,7 +1923,7 @@
menu.addSeparator(parent);
- if (isLocalStorage)
+ if (isLocalStorage && urlParams['browser'] != '0')
{
menu.addItem(mxResources.get('browser') + '...', null, function()
{
diff --git a/war/js/embed-static.min.js b/war/js/embed-static.min.js
index 28d907a7..5cad15ef 100644
--- a/war/js/embed-static.min.js
+++ b/war/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+u.join(",")+"}";f=s;return r}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;enavigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.7.0.5",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/war/js/reader.min.js b/war/js/reader.min.js
index 28992551..3b071e70 100644
--- a/war/js/reader.min.js
+++ b/war/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+u.join(",")+"}";f=s;return r}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;enavigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.7.0.5",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/war/js/viewer.min.js b/war/js/viewer.min.js
index d84bd5b9..cbdd7d74 100644
--- a/war/js/viewer.min.js
+++ b/war/js/viewer.min.js
@@ -2617,74 +2617,74 @@ document.createElement("input");r.setAttribute("type","text");mxUtils.write(k,"P
k=k.cloneNode(!1);k.appendChild(L);g.appendChild(k);f.appendChild(g);var k=k.cloneNode(!1),K=document.createElement("input");K.setAttribute("type","text");mxUtils.write(k,"Message:");K.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(k);k=k.cloneNode(!1);k.appendChild(K);g.appendChild(k);f.appendChild(g);k=k.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+n.value+"/"+
p.value+"/contents/"+r.value+"?ref\x3d"+encodeURIComponent(L.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:r.value,message:K.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+L.value+"/"+r.value;var b=
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(l.value+
-":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c){var d=this.spinner.pause(),e=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
-b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){d();var e=null!=a.getTitle()?a.getTitle():this.defaultFilename,f=e.lastIndexOf("."),g=e;0]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&
-g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>
-6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
-this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=a.length,K=L,R=[],T=mxUtils.bind(this,function(a,b){R[a]=b;if(0==--K){this.spinner.stop();if(null!=k)k(R);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;db};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=
-0;e>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=
-e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>
-8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,
-e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border=
-"1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=
+g.gridSize}finally{g.getModel().endUpdate()}return[e]}};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
+15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=
+c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=
+a.length,K=L,R=[],T=mxUtils.bind(this,function(a,b){R[a]=b;if(0==--K){this.spinner.stop();if(null!=k)k(R);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;db};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e>>8;return a}})();EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,
+k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+
+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=
+function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+
+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var g=0;g