commit fa42b0871e3dde999d0c20dfd4e75d3ceb5eb649 Author: Nariman Jelveh Date: Sat Mar 2 18:39:14 2024 -0800 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..dfe07704 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f0d711a3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +node_modules/ +*.zip +*.tgz +license.config.json \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..bae94e18 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 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 Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..c09797d2 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +

Puter.com, The Personal Cloud Computer: All your files, apps, and games in one place accessible from anywhere at any time.

+ +

Desktop Environment in the Browser!

+ +

+ « LIVE DEMO » +
+
+ Puter.com + · + SDK + · + Discord + · + Reddit + · + X (Twitter) +

+ +

screenshot

+ +
+ +## Getting Started + +```bash +git clone https://github.com/HeyPuter/puter.com +cd puter.com +npm install +npm start +``` + +This will launch Puter in development mode at http://localhost:4000 (or the next available port). + +
+ +## Deploy to Production + +Here's a detailed guide on how to run Puter in production: [docs/prod.md](docs/prod.md) + +
+ +## FAQ + +### ❓ What's the use case for Puter? + +Puter can be used as: + +- An alternative to Dropbox, Google Drive, OneDrive, etc. with a fresh interface and powerful features. +- Remote desktop environment for remote servers and workstations. +- A platform for building and hosting websites, web apps, and games. +- A friendly, open-source project and community to learn about web development, cloud computing, distributed systems, and much more! + +### ❓ Why isn't Puter built with React, Angular, Vue, etc.? + +For performance reasons, Puter is built with vanilla JavaScript and jQuery. Additionally, we'd like to avoid complex abstractions and to remain in control of the entire stack, as much as possible. + +Also partly inspired by some of our favorite projects that are not built with frameworks: [VSCode](https://github.com/microsoft/vscode), [Photopea](https://www.photopea.com/), and [OnlyOffice](https://www.onlyoffice.com/). + +### ❓ Why jQuery? + +Puter interacts directly with the DOM and jQuery provides an elegant yet powerful API to manipulate the DOM, handle events, and much more. It's also fast, mature, and battle-tested. + +
+ +## Credits + +The default wallpaper is created by [Milad Fakurian](https://unsplash.com/photos/blue-orange-and-yellow-wallpaper-E8Ufcyxz514) and published on [Unsplash](https://unsplash.com/). + +Icons by [Papirus](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme) under GPL-3.0 license. + +Icons by [Iconoir](https://iconoir.com/) under MIT license. + +Icons by [Elementary Icons](https://github.com/elementary/icons) under GPL-3.0 license. + +Icons by [Tabler Icons](https://tabler.io/) under MIT license. + +Icons by [bootstrap-icons](https://icons.getbootstrap.com/) under MIT license. \ No newline at end of file diff --git a/build.js b/build.js new file mode 100644 index 00000000..08f23664 --- /dev/null +++ b/build.js @@ -0,0 +1,3 @@ +const {build} = require("./utils.js") + +build(); \ No newline at end of file diff --git a/dev-server.js b/dev-server.js new file mode 100644 index 00000000..9dfc3b30 --- /dev/null +++ b/dev-server.js @@ -0,0 +1,57 @@ +const express = require("express"); +const { generateDevHtml, build } = require("./utils.js"); +const { argv } = require('node:process'); +const chalk = require('chalk'); + +const app = express(); +let port = 4000; // Starting port +const maxAttempts = 10; // Maximum number of ports to try +const env = argv[2] ?? "dev"; + +const startServer = (attempt) => { + if (attempt > maxAttempts) { + console.error(chalk.red(`ERROR: Unable to find an available port after ${maxAttempts} attempts.`)); + return; + } + + app.listen(port, () => { + console.log("\n-----------------------------------------------------------\n"); + console.log(`Puter is now live at: `, chalk.underline.blue(`http://localhost:${port}`)); + console.log("\n-----------------------------------------------------------\n"); + }).on('error', (err) => { + if (err.code === 'EADDRINUSE') { // Check if the error is because the port is already in use + console.error(chalk.red(`ERROR: Port ${port} is already in use. Trying next port...`)); + port++; // Increment the port number + startServer(attempt + 1); // Try the next port + } + }); +}; + +// Start the server with the first attempt +startServer(1); + +// build the GUI +build(); + +app.get(["/", "/app/*", "/action/*"], (req, res) => { + res.send(generateDevHtml({ + env: env, + api_origin: "https://api.puter.com", + title: "Puter", + max_item_name_length: 150, + require_email_verification_to_publish_website: false, + short_description: `Puter is a privacy-first personal cloud that houses all your files, apps, and games in one private and secure place, accessible from anywhere at any time.`, + })); +}) +app.use(express.static('./')); + +if(env === "prod"){ + // make sure to serve the ./dist/ folder maps to the root of the website + app.use(express.static('./dist/')); +} + +if(env === "dev"){ + app.use(express.static('./src/')); +} + +module.exports = app; \ No newline at end of file diff --git a/dist/browserconfig.xml b/dist/browserconfig.xml new file mode 100644 index 00000000..92994302 --- /dev/null +++ b/dist/browserconfig.xml @@ -0,0 +1,8 @@ + + + + + + + +#ffffff \ No newline at end of file diff --git a/dist/bundle.min.css b/dist/bundle.min.css new file mode 100644 index 00000000..dd87414a --- /dev/null +++ b/dist/bundle.min.css @@ -0,0 +1,21 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} + + +/*! jQuery UI - v1.13.2 - 2022-07-14 +* http://jqueryui.com +* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?bgShadowXPos=&bgOverlayXPos=&bgErrorXPos=&bgHighlightXPos=&bgContentXPos=&bgHeaderXPos=&bgActiveXPos=&bgHoverXPos=&bgDefaultXPos=&bgShadowYPos=&bgOverlayYPos=&bgErrorYPos=&bgHighlightYPos=&bgContentYPos=&bgHeaderYPos=&bgActiveYPos=&bgHoverYPos=&bgDefaultYPos=&bgShadowRepeat=&bgOverlayRepeat=&bgErrorRepeat=&bgHighlightRepeat=&bgContentRepeat=&bgHeaderRepeat=&bgActiveRepeat=&bgHoverRepeat=&bgDefaultRepeat=&iconsHover=url(%22images%2Fui-icons_555555_256x240.png%22)&iconsHighlight=url(%22images%2Fui-icons_777620_256x240.png%22)&iconsHeader=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsError=url(%22images%2Fui-icons_cc0000_256x240.png%22)&iconsDefault=url(%22images%2Fui-icons_777777_256x240.png%22)&iconsContent=url(%22images%2Fui-icons_444444_256x240.png%22)&iconsActive=url(%22images%2Fui-icons_ffffff_256x240.png%22)&bgImgUrlShadow=&bgImgUrlOverlay=&bgImgUrlHover=&bgImgUrlHighlight=&bgImgUrlHeader=&bgImgUrlError=&bgImgUrlDefault=&bgImgUrlContent=&bgImgUrlActive=&opacityFilterShadow=Alpha(Opacity%3D30)&opacityFilterOverlay=Alpha(Opacity%3D30)&opacityShadowPerc=30&opacityOverlayPerc=30&iconColorHover=%23555555&iconColorHighlight=%23777620&iconColorHeader=%23444444&iconColorError=%23cc0000&iconColorDefault=%23777777&iconColorContent=%23444444&iconColorActive=%23ffffff&bgImgOpacityShadow=0&bgImgOpacityOverlay=0&bgImgOpacityError=95&bgImgOpacityHighlight=55&bgImgOpacityContent=75&bgImgOpacityHeader=75&bgImgOpacityActive=65&bgImgOpacityHover=75&bgImgOpacityDefault=75&bgTextureShadow=flat&bgTextureOverlay=flat&bgTextureError=flat&bgTextureHighlight=flat&bgTextureContent=flat&bgTextureHeader=flat&bgTextureActive=flat&bgTextureHover=flat&bgTextureDefault=flat&cornerRadius=3px&fwDefault=normal&ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&cornerRadiusShadow=8px&thicknessShadow=5px&offsetLeftShadow=0px&offsetTopShadow=0px&opacityShadow=.3&bgColorShadow=%23666666&opacityOverlay=.3&bgColorOverlay=%23aaaaaa&fcError=%235f3f3f&borderColorError=%23f1a899&bgColorError=%23fddfdf&fcHighlight=%23777620&borderColorHighlight=%23dad55e&bgColorHighlight=%23fffa90&fcContent=%23333333&borderColorContent=%23dddddd&bgColorContent=%23ffffff&fcHeader=%23333333&borderColorHeader=%23dddddd&bgColorHeader=%23e9e9e9&fcActive=%23ffffff&borderColorActive=%23003eff&bgColorActive=%23007fff&fcHover=%232b2b2b&borderColorHover=%23cccccc&bgColorHover=%23ededed&fcDefault=%23454545&borderColorDefault=%23c5c5c5&bgColorDefault=%23f6f6f6 +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;-ms-filter:"alpha(opacity=0)"}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;font-size:100%}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-button{padding:.4em 1em;display:inline-block;position:relative;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2em;box-sizing:border-box;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-button-icon-only{text-indent:0}.ui-button-icon-only .ui-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.ui-button.ui-icon-notext .ui-icon{padding:0;width:2.1em;height:2.1em;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-icon-notext .ui-icon{width:auto;height:auto;text-indent:0;white-space:normal;padding:.4em 1em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-controlgroup{vertical-align:middle;display:inline-block}.ui-controlgroup > .ui-controlgroup-item{float:left;margin-left:0;margin-right:0}.ui-controlgroup > .ui-controlgroup-item:focus,.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus{z-index:9999}.ui-controlgroup-vertical > .ui-controlgroup-item{display:block;float:none;width:100%;margin-top:0;margin-bottom:0;text-align:left}.ui-controlgroup-vertical .ui-controlgroup-item{box-sizing:border-box}.ui-controlgroup .ui-controlgroup-label{padding:.4em 1em}.ui-controlgroup .ui-controlgroup-label span{font-size:80%}.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item{border-left:none}.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item{border-top:none}.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content{border-right:none}.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content{border-bottom:none}.ui-controlgroup-vertical .ui-spinner-input{width:75%;width:calc( 100% - 2.4em )}.ui-controlgroup-vertical .ui-spinner .ui-spinner-up{border-top-style:solid}.ui-checkboxradio-label .ui-icon-background{box-shadow:inset 1px 1px 1px #ccc;border-radius:.12em;border:none}.ui-checkboxradio-radio-label .ui-icon-background{width:16px;height:16px;border-radius:1em;overflow:visible;border:none}.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon{background-image:none;width:8px;height:8px;border-width:4px;border-style:solid}.ui-checkboxradio-disabled{pointer-events:none}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;left:.5em;top:.3em}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-n{height:2px;top:0}.ui-dialog .ui-resizable-e{width:2px;right:0}.ui-dialog .ui-resizable-s{height:2px;bottom:0}.ui-dialog .ui-resizable-w{width:2px;left:0}.ui-dialog .ui-resizable-se,.ui-dialog .ui-resizable-sw,.ui-dialog .ui-resizable-ne,.ui-dialog .ui-resizable-nw{width:7px;height:7px}.ui-dialog .ui-resizable-se{right:0;bottom:0}.ui-dialog .ui-resizable-sw{left:0;bottom:0}.ui-dialog .ui-resizable-ne{right:0;top:0}.ui-dialog .ui-resizable-nw{left:0;top:0}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C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pvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;-ms-filter:"alpha(opacity=25)";opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-text{display:block;margin-right:20px;overflow:hidden;text-overflow:ellipsis}.ui-selectmenu-button.ui-button{text-align:left;white-space:nowrap;width:14em}.ui-selectmenu-icon.ui-icon{float:right;margin-top:0}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:pointer;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:.222em 0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:2em}.ui-spinner-button{width:1.6em;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top-style:none;border-bottom-style:none;border-right-style:none}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #c5c5c5}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-icon-background,.ui-state-active .ui-icon-background{border:#003eff;background-color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-checked{border:1px solid #dad55e;background:#fffa90}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;-ms-filter:"alpha(opacity=70)";font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;-ms-filter:"alpha(opacity=35)";background-image:none}.ui-state-disabled .ui-icon{-ms-filter:"alpha(opacity=35)"}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-icon-blank.ui-icon-blank.ui-icon-blank{background-image:none}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.003;-ms-filter:Alpha(Opacity=.3)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666} + + +*{font-family:"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;user-select:none}body,html{overscroll-behavior-x:none}body{background:no-repeat center center fixed;background-position:center;background-size:cover;background-color:#3d4c74;overflow:hidden}.embedded-in-3rd-party-website,.embedded-in-popup{background:0 0!important;background-color:#ccccccbe!important}.disable-user-select{cursor:default;-webkit-touch-callout:none!important;-webkit-user-select:none!important;-khtml-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.enable-user-select,.enable-user-select *{cursor:initial;-webkit-touch-callout:text!important;-webkit-user-select:text!important;-khtml-user-select:text!important;-moz-user-select:text!important;-ms-user-select:text!important;user-select:text!important}.window-container{position:fixed;top:0;left:-100000px;width:200000px;height:200000px;z-index:-9999}input[type=email],input[type=password],input[type=text],select{width:100%;padding:8px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;outline:0;-webkit-font-smoothing:antialiased;color:#393f46;font-size:14px}.device-phone input[type=email],.device-phone input[type=password],.device-phone input[type=text],.device-phone select{font-size:17px}input[type=email]:focus,input[type=password]:focus,input[type=text]:focus,select:focus{border:2px solid #01a0fd;padding:7px}.button{color:#666;background-color:#eee;border-color:#eee;font-size:14px;text-decoration:none;text-align:center;line-height:40px;height:35px;padding:0 30px;margin:0;display:inline-block;appearance:none;cursor:pointer;border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-color:#b9b9b9;border-style:solid;border-width:1px;line-height:35px;background:-webkit-gradient(linear,left top,left bottom,from(#f6f6f6),to(#e1e1e1));background:linear-gradient(#f6f6f6,#e1e1e1);-webkit-box-shadow:inset 0 1px 0 rgb(255 255 255 / 30%),0 1px 2px rgb(0 0 0 / 15%);box-shadow:inset 0 1px 0 rgb(255 255 255 / 30%),0 1px 2px rgb(0 0 0 / 15%);border-radius:4px;outline:0}.button:focus-visible{border-color:rgb(118 118 118)}.button.active,.button.has-open-contextmenu,.button.is-active,.button:active{text-decoration:none;background-color:#eee;border-color:#cfcfcf;color:#a9a9a9;-webkit-transition-duration:0s;transition-duration:0s;-webkit-box-shadow:inset 0 1px 3px rgb(0 0 0 / 20%);box-shadow:inset 0 2px 3px rgb(0 0 0 / 36%),0 1px 0 #fff}.button.disabled,.button.is-disabled,.button:disabled{top:0!important;background:#eee!important;border:1px solid #ddd!important;text-shadow:0 1px 1px #fff!important;color:#ccc!important;cursor:default!important;appearance:none!important;pointer-events:none}.button-action.disabled,.button-action.is-disabled,.button-action:disabled{background:#55a975!important;border:1px solid #60ab7d!important;text-shadow:none!important;color:#ccc!important}.button-primary.disabled,.button-primary.is-disabled,.button-primary:disabled{background:#8fc2e7!important;border:1px solid #98adbd!important;text-shadow:none!important;color:#f5f5f5!important}.button-block{width:100%}.button-primary{border-color:#088ef0;background:-webkit-gradient(linear,left top,left bottom,from(#34a5f8),to(#088ef0));background:linear-gradient(#34a5f8,#088ef0);color:#fff}.button-danger{border-color:#f00808;background:-webkit-gradient(linear,left top,left bottom,from(#f83434),to(#f00808));background:linear-gradient(#f83434,#f00808);color:#fff}.button-primary-flat.active,.button-primary-flat.is-active,.button-primary-flat:active,.button-primary.active,.button-primary.is-active,.button-primary:active{background-color:#2798eb;border-color:#2798eb;color:#bedef5}.button-action{border-color:#08bf4e;background:-webkit-gradient(linear,left top,left bottom,from(#29d55d),to(#1ccd60));background:linear-gradient(#29d55d,#1ccd60);color:#fff}.button-action-flat.active,.button-action-flat.is-active,.button-action-flat:active,.button-action.active,.button-action.is-active,.button-action:active{background-color:#27eb41;border-color:#27eb41;color:#bef5ca}.button-giant{font-size:28px;height:70px;line-height:70px;padding:0 70px}.button-jumbo{font-size:24px;height:60px;line-height:60px;padding:0 60px}.button-large{font-size:20px;height:50px;line-height:50px;padding:0 50px}.button-normal{font-size:16px;height:40px;line-height:38px;padding:0 40px}.button-small{height:30px;line-height:29px;padding:0 30px}.button-tiny{font-size:9.6px;height:24px;line-height:24px;padding:0 24px}.desktop{display:none;overflow:hidden;height:calc(100vh - 60px);width:100%;display:grid;grid-template-rows:repeat(auto-fill,109px);grid-auto-flow:column;grid-template-columns:repeat(auto-fill,120px)}.fullpage-mode .window-minimize-btn{display:none}.device-phone .desktop{height:100vh!important;height:100dvh!important;overflow-x:scroll}.item-container-list{display:grid;overflow-x:scroll!important;overflow-y:hidden!important;grid-template-rows:repeat(auto-fill,18px);grid-auto-flow:column;gap:15px 70px;padding-top:5px}.device-phone .item-container-list{grid-template-rows:repeat(auto-fill,55px);overflow-x:hidden!important;overflow-y:scroll!important;grid-auto-flow:unset}.item-container-details{overflow-x:scroll!important;overflow-y:scroll!important;padding-top:5px}.item{width:110px;height:70px;user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none;text-align:center;margin:15px 5px 30px 5px;float:left;position:relative;scroll-margin:15px 15px 100px 15px;pointer-events:all}.item-disabled{opacity:.7;pointer-events:none}.item-container-list .item{height:initial;width:max-content;margin:0;pointer-events:all}.device-phone .item-container-list .item{height:50px;width:100%;padding-left:10px}.item-container-details .item{height:initial;width:max-content;margin:0;pointer-events:all;width:100vw;margin-bottom:20px}.explore-table-headers{display:none;width:100vw;height:25px;border-bottom:1px solid #e2e2e2;background-color:#fff;margin-left:-10px;padding-top:0;margin-top:-7px;margin-bottom:8px;position:sticky;top:-7px;z-index:1}.device-phone .explore-table-headers{display:none!important}.header-sort-icon{margin-left:7px;pointer-events:none}span.header-sort-icon img{margin-bottom:-1px;width:10px}.explore-table-headers .explore-table-headers-th{font-size:12px;line-height:25px;margin-left:15px;color:#555c61;display:inline-block}.explore-table-headers-th-active{font-weight:700}.explore-table-headers-th--name{width:330px}.explore-table-headers-th--size{width:135px}.explore-table-headers-th--modified{width:135px}.item-container-details .explore-table-headers{display:block}.item-disabled .item-icon,.item-disabled .item-name{opacity:.7;pointer-events:none}.item-icon{display:block;margin:0 auto;padding:5px;height:45px;width:45px;filter:drop-shadow(1px 1px 1px rgba(102, 102, 102, .5));display:flex;justify-content:center;align-items:center}.item-container-list .item-icon{float:left;height:15px;width:15px}.device-phone .item-container-list .item-icon{float:left;height:45px;width:45px}.item-container-details .item-icon{float:left;height:15px;width:15px}.device-desktop .item-container-details .item-selected .item-icon{background-color:transparent}.item-icon img{max-height:45px;max-width:45px}.item-container-list .item-icon img{max-height:15px;max-width:15px}.device-phone .item-container-list .item-icon img{max-height:45px;max-width:45px}.item-container-details .item-icon img{max-height:15px;max-width:15px}.item-icon-thumb{padding:1px;background-color:#fff;border:1px solid #eee;border-radius:3px}.device-desktop .item-selected .item-icon{background-color:#d4d4d430;border-radius:3px;filter:drop-shadow(0px 0px 1px rgba(102, 102, 102, 1))}.item-badges{position:absolute;height:15px;width:55px;text-align:center;justify-content:right;display:flex;top:38px;left:28px;right:50%}.item-container-list .item-badges{display:none}.item-container-details .item-badges{display:none}.item-badge{filter:drop-shadow(0px 0px 1px rgba(0, 0, 0, .4));display:none;margin:1px;width:15px;height:15px;box-sizing:border-box;border-radius:100%}.item-badge.item-shortcut{border-radius:1px;background:#fff}.item-has-website-badge{filter:drop-shadow(0px 0px 2px rgba(0, 0, 0, .4));display:none;cursor:pointer}.item-has-website-url-badge{cursor:pointer}.item-has-website-url-badge.has-open-contextmenu{filter:drop-shadow(0px 0px 1px rgba(0, 0, 0, 1))}.item-name,.item-name-editor,.item-name-shadow{font-size:13px;color:#fff;text-shadow:0 0 3px #00000082,0 0 3px #00000082,0 0 3px #00000082;-webkit-font-smoothing:antialiased;padding:3px;margin-top:4px;display:inline-block;font-weight:700;border-radius:4px;line-break:anywhere;box-sizing:border-box}.item-name{transition:opacity .2s ease-in-out;cursor:default;max-width:110px}.item-container-list .item-name{margin-top:2px;float:left;max-width:initial}.item-container-details .item-name{margin-top:2px;float:left;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-align:left;max-width:220px}.item-name-shadow{display:none;max-width:110px}.item-name-editor{background:0 0;background-color:#fff;text-shadow:none;color:#000;text-align:center;border:none;max-width:100%;padding:1px 3px;resize:none;display:none;margin:6px auto;user-select:initial;position:relative;box-sizing:border-box;z-index:999999999}.item-container-list .item-name-editor{width:fit-content!important;max-width:200px!important;text-align:left;background-color:#fff!important}.item-container-list .item-name-editor-active{background-color:#fff!important}.item-container-details .item-name-editor{width:fit-content!important;max-width:200px!important;text-align:left;background-color:#fff!important;position:absolute;left:35px}.item-container-details .item-name-editor-active{background-color:#fff!important}.item-name-editor-active{display:block}.item-attr{display:none;position:absolute;text-align:left;font-size:12px;height:25px;line-height:25px;width:max-content;color:#738c9f}.item-container-details .item-attr{display:inline}.device-desktop .item-container-details .item-selected .item-attr{color:#fff}.item-container-details .item-attr--modified{left:350px}.item-container-details .item-attr--size{left:500px}.item-container-details .item-attr--type{left:650px}.window-disabled{pointer-events:none!important}.window-disable-mask{width:100%;height:100%;position:absolute;display:none;background-color:#d1d1d18a;pointer-events:initial;z-index:2}.device-phone .window-disable-mask,.device-tablet .window-disable-mask{background-color:#626060a1}.window-disable-mask .busy-indicator{-moz-animation:three-quarters-loader 1.25s infinite linear;-webkit-animation:three-quarters-loader 1.25s infinite linear;animation:three-quarters-loader 1.25s infinite linear;border:5px solid #4b4b4b;border-right-color:transparent;border-radius:100%;box-sizing:border-box;display:inline-block;position:relative;overflow:hidden;text-indent:-9999px;width:45px;height:45px;position:absolute;top:calc(50% - 22px)!important;left:calc(50% - 22px)!important;transform:translate(-50%,-50%);display:none}.window-body .item .item-name{color:#494949;text-shadow:none;font-weight:500;font-size:13px;margin-left:3px}.device-phone .item-container-list .item .item-name{line-height:42px}.window-body .item .item-name-editor{font-weight:500;font-size:13px}.device-desktop .item-selected>.item-name,.device-desktop .window-body .item-selected>.item-name{background-color:#3b56ee;color:#fff}.device-desktop .item-container-details .item-selected{background-color:#3b56ee;border-radius:3px}.device-desktop .item-selected.item-blurred .item-name{background-color:#dbdada;color:#494949;text-shadow:none}.window-body .item-name-editor{color:#494949;text-shadow:none}.explorer-empty-message{text-align:center;margin-top:20px;color:#a3a3a3;-webkit-font-smoothing:antialiased;display:none}.explorer-loading-spinner{margin-top:20px;font-size:13px;display:none}.explorer-loading-spinner-msg{text-align:center;margin-top:5px;color:#a3a3a3;font-size:15px;-webkit-font-smoothing:antialiased}.window{display:none;position:absolute;background:0 0;padding:0;border:1px solid #9a9a9a;box-shadow:0 0 15px #00000066;overflow:hidden;border-radius:4px;border:none;transition:opacity .2s;user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none}.window[data-is_maximized="1"]{transform:none;border-radius:0}.window-cover-page{border-radius:0}.device-phone .window[data-is_maximized="1"]{top:0!important}.device-phone .window:not(.window-alert),.device-tablet .window:not(.window-alert){border-radius:0;transform:none;width:100%;height:100dvh!important;top:0!important}.device-phone .window,.device-tablet .window{z-index:9999999!important}.device-phone .window-alert,.device-tablet .window-alert{min-width:90%;max-width:300px;position:absolute;left:50%!important;top:50%!important;transform:translate(-50%,-50%)}.device-phone .window .ui-resizable-handle,.device-phone .window .window-scale-btn,.device-tablet .window .window-scale-btn{display:none!important}.window-backdrop{position:fixed;top:0;bottom:0;left:0;right:0;background-color:#00000052}.window.ui-resizable-resizing{transition:none}.window-dragging{transition:none}.window-head-draggable{overflow:hidden;flex-grow:1;display:flex}.window-head{overflow:hidden!important;padding:0;background-color:rgba(231,238,245,.95);filter:grayscale(80%);box-shadow:inset 0 -4px 5px -7px rgb(0 0 0 / 64%);display:flex;flex-flow:row;padding-left:5px;margin-bottom:-1px}.device-phone .window-head{background-color:rgba(231,238,245)}.window-head,.window-head *{user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important;-ms-user-select:none!important;cursor:default}.window-active .window-head{filter:none!important}.window-head-title{float:left;line-height:30px;font-size:14px;color:#666d74;margin-left:10px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.window-active .window-head-title{color:#373e44}.window-head-icon{float:left;width:16px;height:16px;margin-left:8px;margin-top:7px;margin-right:-5px;filter:drop-shadow(0px 0px .5px rgb(51, 51, 51))}.window-navbar{overflow:hidden;border-bottom:1px solid #e3e3e3;padding:5px 0 5px 1px;background-color:#fafafa;height:48px;box-sizing:border-box}.window-navbar-btn{margin:7px 6px 0;cursor:pointer;width:17px;border-radius:100%;padding:3px;transition:background-color .2s ease-in}.window-navbar-btn.has-open-contextmenu,.window-navbar-btn:hover{background-color:#dfdfdf}.window-navbar-btn-disabled{pointer-events:none;opacity:.5}.window-navbar-path{overflow:hidden;line-height:35px;padding-left:10px;font-size:14px;color:#41484c;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;-webkit-font-smoothing:antialiased;border:1px solid #e3e3e3;border-radius:3px;background:#f1f3f4;box-sizing:border-box;user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important;-ms-user-select:none!important;cursor:default}.device-phone .window-navbar-path{display:none}.window-navbar-layout-settings{width:30px;height:30px;margin-left:10px;margin-top:3px}.device-phone .window-navbar-layout-settings{float:right;margin-right:10px}.window-navbar-path-input{overflow:hidden;line-height:17px;padding-left:10px;font-size:15px;color:#41484c;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border:1px solid #00b6ff;border-radius:3px;background:#fff;display:none;box-sizing:border-box;padding-top:9px;padding-bottom:9px;outline:1px solid #00b6ff}.window-navbar-path,.window-navbar-path-input{width:calc(100% - 170px);float:left}.window-navbar-path-dirname{cursor:pointer;font-weight:500;padding:0 7px;height:33px;display:inline-block;overflow:initial!important}.window-navbar-path-dirname-active{text-decoration:underline}.window-navbar-path-dirname:hover{color:#414a4e;text-decoration:underline}.path-seperator{width:10px;opacity:.2}.window-body{width:100%;height:calc(100% - 77px);background-color:#fff;overflow:auto}.window-body.item-container{box-sizing:border-box;width:initial;padding-left:10px;border:3px solid rgba(255,255,255,0)}.item-container-transparent-border{border-color:transparent!important}.window-body.item-container-active{border-color:#bcedff!important}.device-phone .window-body.item-container{padding-left:0}.window-sidebar{min-width:170px;height:calc(100% - 28px);float:left;border-right:1px solid #ccc;padding:15px 10px;box-sizing:border-box;background-color:rgba(231,238,245,.95);overflow-y:scroll;margin-top:1px}.window-sidebar .ui-resizable-e{right:0}.window-filedialog .window-sidebar{height:calc(100% - 30px)}.window-cover-page.window-filedialog .window-body{height:calc(100% - 109px)!important}.window-cover-page .window-sidebar{height:100%}.window-cover-page.window-puter-dialog{height:100%;width:100%;top:0!important}.window-cover-page.window-puter-dialog .window-body{width:100%;height:100%;padding:0!important}.window-cover-page.window-login,.window-cover-page.window-signup{height:100vh!important;width:100%;top:0!important}.window-sidebar-title{margin:0;font-weight:700;font-size:13px;color:#6d7787;text-shadow:1px 1px rgb(247 247 247 / 15%);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding-left:6px;cursor:default;margin-top:20px;margin-bottom:5px}.window-sidebar-title:first-child{margin-top:0}.window-sidebar-item.has-open-contextmenu,.window-sidebar-item:hover{background-color:rgba(243,243,243,.8);cursor:pointer}.window-sidebar-item{margin-bottom:6px;margin-top:2px;padding:4px;border-radius:3px;color:#444;font-size:13px;cursor:pointer;transition:.15s background-color;box-sizing:border-box;overflow-x:hidden!important;overflow-y:hidden!important;white-space:nowrap;text-overflow:ellipsis}.window-sidebar-item-active,.window-sidebar-item-active:hover,.window-sidebar-item-drag-active{background-color:#fefeff}.window-sidebar-item-icon{width:14px;height:14px;filter:drop-shadow(0px 0px .2px rgb(51, 51, 51));margin-right:5px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:-2px}.window[data-app=explorer] .window-body{height:calc(100% - 107px)}.explorer-footer{background:#fff;overflow:auto;height:30px;font-size:13px;line-height:28px;padding-left:10px;background-color:#fafafa;border-top:1px solid #e3e3e3;color:#505050;user-select:none!important;-moz-user-select:none!important;-webkit-user-select:none!important;-ms-user-select:none!important;cursor:default}.device-phone .explorer-footer{width:100%}.explorer-footer-selected-items-count,.explorer-footer-seperator{display:none}.explorer-footer-seperator{margin:15px;color:#ccc}.window-body-filedialog{height:calc(100% - 137px)}.window-body-app{height:calc(100% - 30px)}.fullpage-mode.device-phone .window-body-app{height:calc(100%)}.window-filedialog-prompt{height:60px;border-top:1px solid #dbdee3;background-color:#f3f5f9;padding:0 15px;display:flex;flex-direction:column;justify-content:center}.savefiledialog-filename{float:left;margin-right:10px;padding:5px!important;border-width:1px!important;height:31px;flex-grow:1}.openfiledialog-open-btn,.savefiledialog-save-btn{margin-left:10px}.filedialog-cancel-btn{margin-left:10px}.window-action-btn{margin-right:5px;margin-left:10px;padding-bottom:3px;opacity:.6}.window-active .window-action-btn{opacity:1}.window-action-btn>img{width:18px;margin-top:5px;margin-right:4px;margin-left:4px;opacity:.5;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.window-action-btn:hover>img{opacity:1}.window-scale-btn>img{width:15px;height:15px;margin-top:7px}.window-app-iframe{width:100%;height:100%;border:none;margin:0;display:block;height:calc(100%);pointer-events:none;overflow:hidden}.window-active .window-app-iframe{pointer-events:all}.window-disabled .window-app-iframe{pointer-events:none!important}.ui-resizable-e,.ui-resizable-w{cursor:ew-resize}.ui-resizable-n,.ui-resizable-s{cursor:ns-resize}.ui-resizable-ne,.ui-resizable-sw{cursor:nesw-resize}.ui-resizable-nw,.ui-resizable-se{cursor:nwse-resize}.window>.ui-resizable-ne,.window>.ui-resizable-nw,.window>.ui-resizable-se,.window>.ui-resizable-sw{width:15px;height:15px;z-index:95!important}.window-alert-message,.window-prompt-message{font-size:15px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#414650;text-shadow:1px 1px #ffffff52;margin-top:10px;word-break:break-word}.window-alert-message{text-align:center}.window-alert-icon{width:64px;margin:10px auto 20px;display:block}.alert-resp-button{width:100%;margin-top:10px}.prompt-resp-button{margin-left:10px}.prompt-resp-btn-ok{width:110px}.mywebsites-card{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:relative;border:1px solid #ccc;padding:10px;margin-bottom:10px;border-radius:4px;background-color:#fff}.mywebsites-address-link{color:#0d6efd;text-decoration:none}.mywebsites-address-link:hover{text-decoration:underline}.mywebsites-dir-path{cursor:pointer;font-size:14px;margin-bottom:0}.mywebsites-dir-path img{width:16px;margin-bottom:-3px;margin-right:5px}.mywebsites-dir-path:hover{text-decoration:underline}.mywebsites-dis-dir{cursor:pointer}.mywebsites-dis-dir:hover{text-decoration:underline}.mywebsites-no-dir-notice{margin-bottom:0;color:#7e7e7e;font-size:14px}.mywebsites-release-address{color:red;cursor:pointer;font-size:13px}.mywebsites-site-setting{position:absolute;right:5px;top:5px;cursor:pointer;width:20px;height:20px}.context-menu{display:none;z-index:9999999999;position:absolute;overflow:hidden;white-space:nowrap;font-family:sans-serif;background:#fff;color:#333;border-radius:2px;padding:3px 0;min-width:200px;background-color:rgba(231,238,245,.98);border:1px solid #e4ebf3de;box-shadow:0 0 15px #00000066;padding-left:6px;padding-right:6px;padding-top:4px;padding-bottom:4px}.context-menu li{list-style-type:none;user-select:none;cursor:default!important}.context-menu .context-menu-divider>hr{margin-top:5px;margin-bottom:5px;border-bottom:none;border-top:1px solid #00000033}.context-menu .context-menu-item{padding:5px;list-style-type:none;user-select:none;font-size:13px;height:25px;box-sizing:border-box;position:relative}.context-menu .context-menu-item .ctx-item-icon{width:15px;height:15px;position:absolute;left:5px;top:5px;filter:drop-shadow(0px 0px .3px rgb(51, 51, 51))}.submenu-arrow{width:15px;height:15px;float:right}.submenu-arrow-active{display:none}.context-menu-item-active .submenu-arrow{display:none;pointer-events:none}.context-menu-item-active .submenu-arrow-active{display:inline-block}.context-menu .context-menu-item-active-blurred .submenu-arrow{display:inline-block}.context-menu .context-menu-item-active-blurred .submenu-arrow-active{display:none;pointer-events:none}.context-menu .context-menu-item-active{background-color:rgb(59 134 226);color:#fff;border-radius:4px}.context-menu .context-menu-item-active-blurred{background-color:#c7cdd4;color:initial;border-radius:4px}.context-menu .context-menu-item-disabled,.context-menu .context-menu-item-disabled:hover{opacity:.5;background-color:transparent;color:initial;cursor:initial}.context-menu-item-icon,.context-menu-item-icon-active{display:inline-block;width:20px;text-align:center;margin-right:5px;font-size:14px;line-height:5px}.context-menu-item-icon-active,.contextmenu-label-active{display:none}.context-menu .context-menu-item-active .context-menu-item-icon,.context-menu .context-menu-item-active .contextmenu-label{display:none}.context-menu .context-menu-item-active .context-menu-item-icon-active{display:inline-block;color:#fff}.context-menu .context-menu-item-active .contextmenu-label-active{display:inline-block}.draggable-count-badge{background-color:red;border:2px solid #fff;border-radius:100%;position:absolute;display:none;width:22px;height:22px;text-align:center;color:#fff;font-weight:700;z-index:9999999999;font-size:12px;line-height:22px}.selection-area{background-color:#afafaf36;border:1px solid #ccc}.container{user-select:none}label{display:block;-webkit-font-smoothing:antialiased;color:#3a3d40;margin-bottom:3px;text-shadow:1px 1px #ffffff61;font-size:14px}.toolbar{float:right;width:100%;background-color:#00000040;height:30px;position:relative;z-index:999999;box-sizing:border-box;display:flex;flex-direction:row;justify-content:flex-end;align-content:center;flex-wrap:wrap;padding-right:10px}.show-desktop-btn{color:#fff;font-size:11px!important;padding:2px 5px 2px!important;border:1px solid;border-radius:4px;height:18px!important;width:90px!important;margin-top:2px;text-decoration:none;margin-left:10px!important;font-weight:500}.device-phone .toolbar{z-index:1}@supports ((backdrop-filter:blur())){.toolbar{background-color:#00000040;backdrop-filter:blur(10px)}}.toolbar-btn{padding:4px;font-size:14px;width:auto;padding:0 5px;margin-left:20px;overflow-y:hidden!important;overflow-x:hidden!important;background-size:contain;background-repeat:no-repeat;background-position:center;display:inline-block;width:22px;height:22px;padding:3px;box-sizing:border-box;background-origin:content-box;display:flex;justify-content:center;align-items:center;opacity:.8}.toolbar-btn:hover{opacity:1}.user-options-menu-btn.has-open-contextmenu{background-color:rgb(255 255 255 / 35%);border-radius:3px}.user-options-menu-username{color:#000;margin-left:5px;display:block;max-width:70px;text-overflow:ellipsis;float:right;overflow:hidden}.user-options-menu-username:empty{margin-left:0}.user-options-create-account-btn,.user-options-login-btn{padding:0 15px}.toolbar-btn:hover:not(.has-open-contextmenu){background-color:rgb(255 255 255 / 15%);border-radius:3px}.logout-btn{position:absolute;right:7px;top:7px;padding:4px;border-radius:4px;cursor:pointer;border:2px solid #ccc}.logout-btn img{width:20px;margin-bottom:-5px}.form-error-msg,.login-error-msg,.publish-website-error-msg,.signup-error-msg{display:none;color:red;border:1px solid red;border-radius:4px;padding:9px;margin-bottom:15px;text-align:center;font-size:13px}.error{display:none;color:red;border:1px solid red;border-radius:4px;padding:9px;margin-bottom:15px;text-align:center;font-size:13px}.form-success-msg{display:none;color:#008145;border:1px solid #00c911;border-radius:4px;padding:9px;margin-bottom:15px;text-align:center;font-size:13px}.publish-btn{margin-top:20px}.window-give-item-access-success,.window-publishWebsite-success{display:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:auto}.manage-your-websites-link{color:#007cff;text-decoration:underline;cursor:pointer}.publishWebsite-published-link{text-decoration:none;color:#007cff}.publishWebsite-published-link:hover{text-decoration:underline}.publishWebsite-published-link-icon{display:inline-block;width:12px;margin-left:5px;margin-bottom:-1px;user-select:none!important}.login-form-title,.signup-form-title{text-align:center;margin-top:0;padding-bottom:15px;font-size:23px;font-weight:400;margin-bottom:10px;color:#657489;text-shadow:1px 1px #ffffff1c}.signup-form-title{margin-top:10px}.login-c2a-clickable,.signup-c2a-clickable{border:none;background:0 0;display:block;margin:0 auto;cursor:pointer;font-weight:400;-webkit-font-smoothing:antialiased;color:#4f5a68;font-size:20px}.login-c2a-clickable:hover,.signup-c2a-clickable:hover{text-decoration:underline}#p102xyzname,.p102xyzname{display:none}.intro-menu-item{text-decoration:none;color:#398ce7;font-weight:400}.intro-menu-item:hover{text-decoration:underline}.bull{margin:10px;color:#ccc}.create-account-form-title{text-align:center;margin-top:0;padding-bottom:15px;font-size:20px;font-weight:300;margin-bottom:10px;color:#383e46}.create-account-desc{margin-top:0;margin-bottom:30px;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2f3f53}.unsupported-device-notice{position:absolute;width:100%;height:100%;background-color:#fff;z-index:9999999;display:none;flex-direction:column;justify-content:center;text-align:center;padding:30px;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.item-props-tabview{display:flex;flex-direction:column;height:100%}.item-props-tab-content{display:none;padding:5px 10px;flex-grow:1;border:1px solid #ccc;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;margin-top:-1px}.item-props-tab-content-selected{display:block;background-color:#fff}.item-props-tab-btn{display:inline-block;padding:10px 15px;cursor:pointer;margin-right:10px;border-top-left-radius:3px;border-top-right-radius:3px;border:1px solid #ffffff00;margin-bottom:-1px;color:#374653}.item-props-tab-selected{border:1px solid #ccc;margin-bottom:-1px;border-bottom:none;background-color:#fff;position:relative;color:#000}.item-props-tbl{font-size:13px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.item-props-tbl td{padding-bottom:10px;word-break:break-all}.item-prop-label{text-align:left;font-weight:500;white-space:nowrap}.item-prop-original-name,.item-prop-original-path{display:none}.item-prop-version-entry:not(:last-child){display:inline-block;width:100%;padding-bottom:10px;margin-bottom:10px;border-bottom:1px solid #ccc}.item-prop-val{padding-left:10px}.conf-email-log-out,.send-conf-email{cursor:pointer}.email-confirm-code-hyphen{display:inline-block;width:14%;text-align:center;font-size:40px;font-weight:300}.conf-email-log-out:hover,.send-conf-email:hover{text-decoration:underline}.disassociate-website-link,.remove-permission-link{cursor:pointer;color:red}.permission-owner-badge{background-color:#9dacbd;border-radius:2px;padding:2px 4px;color:#fff;font-size:13px}.disassociate-website-link:hover,.remove-permission-link:hover{text-decoration:underline}.item-perm-recipient-card{margin-bottom:5px;margin-top:15px;padding:11px;background-color:#fff;border-radius:3px;border:1px solid #e0e0e0;color:#65707b}.remove-permission-icon{display:none;text-decoration:none!important;color:#b8b8b8}.remove-permission-icon:hover{color:#6d6d6d}.item-perm-recipient-card:hover .remove-permission-icon{display:block}.share-recipients{margin-top:10px;max-height:200px;overflow:scroll}.feedback-sent-success{display:none;padding:10px;margin-bottom:20px;border:1px solid #59d959;border-radius:3px;background-color:#e4f9e4;position:relative}.window-give-item-access-success{display:none;padding:10px;margin-bottom:20px;border:1px solid #59d959;border-radius:3px;background-color:#e4f9e4;position:relative}.save-account-success{display:none;padding:30px;border-radius:3px;background-color:#e4f9e4;position:relative;color:green}.hide-sharing-success-alert{position:absolute;color:#8d8c8c;font-size:20px;right:15px;cursor:pointer}.hide-sharing-success-alert:hover{color:#000}.access-recipient{height:40px;background-color:#fff;margin-bottom:5px;width:100%}.item-is-shared{cursor:pointer}.session-entry{cursor:pointer;padding:20px;border:1px solid #ccc;border-radius:3px;margin-bottom:10px;background-color:#fff;font-weight:500;color:#394d5c}.session-entry:hover{border-color:#00a6ff}.login-c2a-session-list,.signup-c2a-session-list{cursor:pointer;font-size:15px;color:#636363}.login-c2a-session-list:hover,.signup-c2a-session-list:hover{text-decoration:underline}.taskbar{position:fixed;bottom:0;left:0;width:100%;background-color:rgba(231,238,245,.9);display:flex;justify-content:center;z-index:99999;box-shadow:5px 5px 5px 3px #6e6e6e;overflow:hidden!important}.taskbar .taskbar-item{float:left;position:relative;overflow:hidden!important;transition:background-color .2s;display:none}.taskbar .taskbar-item,.taskbar .taskbar-item-sortable-placeholder{width:40px;height:40px;padding:6px 5px 10px 5px}.taskbar .taskbar-item .taskbar-icon{border-radius:3px}.taskbar .taskbar-item,.taskbar .taskbar-item *{-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.taskbar-item.ui-sortable-helper{margin-left:25px;z-index:999999999!important}.taskbar .taskbar-item:hover .taskbar-icon{background-color:rgb(255 255 255 / 40%);transition:background-color .2s}.taskbar .taskbar-item.active .taskbar-icon,.taskbar .taskbar-item:active .taskbar-icon,.taskbar .taskbar-item:focus .taskbar-icon,.taskbar .taskbar-item:focus-visible .taskbar-icon,.taskbar .taskbar-item:focus-within .taskbar-icon,.taskbar-item.has-open-contextmenu .taskbar-icon,.taskbar-item.has-open-popover .taskbar-icon,.taskbar-item.ui-sortable-helper .taskbar-icon{background-color:rgb(255 255 255 / 80%)!important;transition:background-color .2s;filter:none}.active-taskbar-indicator{font-size:18px;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:-6px;display:none;width:9px;height:3px;background-color:#686868;bottom:8px;border-radius:3px}.taskbar .taskbar-icon img{width:100%;height:100%;filter:drop-shadow(0px 0px .2px rgb(51, 51, 51));padding:5px;box-sizing:border-box}.taskbar-icon{height:40px}#clock{display:none;position:absolute;right:10px}.desktop-bg-settings-wrapper{display:none;overflow:hidden}.desktop-bg-color-block{width:25px;height:25px;float:left;margin:5px;border:1px solid #898989;box-sizing:border-box;border-radius:2px}@supports ((backdrop-filter:blur())){.taskbar{background-color:#ffffff94;backdrop-filter:blur(10px)}.taskbar .taskbar-icon img{filter:drop-shadow(0px 0px .5px rgb(51, 51, 51))}}.arrow:after,.ui-tooltip{background-color:rgba(231,238,245,.92);backdrop-filter:blur(3px)}.ui-tooltip{padding:5px 10px;border-radius:2px;font:14px "Helvetica Neue",Sans-Serif;box-shadow:0 0 3px rgba(0,0,0,.455);background-color:rgba(231,238,245,.92);backdrop-filter:blur(3px)}.arrow{width:70px;height:16px;overflow:hidden;position:absolute;left:50%;margin-left:-35px;bottom:-16px;border-top:none}.arrow.top{top:-16px;bottom:auto}.arrow.left{left:20%}.arrow:after{content:"";position:absolute;left:20px;top:-20px;width:25px;height:25px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.arrow.top:after{bottom:-20px;top:auto}.font-selector{padding:10px;border-radius:2px;margin:10px 0;scroll-margin:10px 0}.font-selector-active{color:#fff;background-color:#2b62f1}.window-snap-placeholder{display:none;transition:all .2s;position:absolute;box-sizing:border-box;padding:10px;backdrop-filter:blur(5px)}.window-snap-placeholder-inner{border-radius:4px;width:100%;height:100%;background-color:rgba(245,245,245,.7)}.popover{position:absolute;display:none;z-index:9999999;box-sizing:border-box;border-radius:4px;overflow:hidden;box-shadow:0 0 15px #00000066}@supports ((backdrop-filter:blur())){.launch-popover{background-color:rgba(231,238,245,.92);backdrop-filter:blur(3px)}}.popover-apps-item{clear:both;margin-bottom:10px;overflow:hidden;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:5px}.popover-apps-item:hover{background-color:#a5c8f3;border-radius:4px}.popover-apps-item img{float:left;filter:drop-shadow(0px 0px .75px rgb(51, 51, 51))}.popover-apps-item span{line-height:47px;display:block;float:left;margin-left:10px}.device-phone .popover{height:100vh;height:100dvh;top:0!important;left:0!important;width:100%;padding:0;margin:0}.notification{width:250px;height:54px;position:absolute;right:10px;background:#ffffffcd;backdrop-filter:blur(5px);border-radius:11px;z-index:9999999;box-shadow:0 0 17px -9px #000;border:1px solid #d5d5d5}.notification-close{position:absolute;background:#fff;border-radius:100%;top:-6px;left:-6px;width:13px;padding:2px;filter:drop-shadow(0px 0px .5px rgb(51, 51, 51));z-index:99999999;display:none}.notification:hover .notification-close{display:block}.launch-popover{width:530px;height:500px;padding:20px 20px 20px;border:1px solid #bbc2c9;border-radius:4px;background-color:rgba(231,238,245,.92);backdrop-filter:blur(3px);box-sizing:border-box;overflow-y:scroll}.close-launch-popover{position:absolute;top:5px;right:10px;padding:5px;display:none}.device-phone .close-launch-popover{display:block}.device-phone .launch-popover{width:100vw;height:100vh;height:100dvh;background-color:rgba(231,238,245)}.start-section-heading{font-size:13px;margin:0;padding:0;height:15px;margin-left:5px;margin-right:5px;border-bottom:1px solid #ccc;padding-bottom:10px;color:#677a86;clear:both}.start-app-card{height:100px;width:20%;float:left;display:flex;flex-direction:column;justify-content:center;box-sizing:content-box}.start-app{width:70px;height:70px;text-align:center;overflow:hidden;margin:0 auto;padding:5px;display:flex;flex-direction:column;justify-content:center;border-radius:4px;transition:.1s background-color}.start-app-icon{filter:drop-shadow(0px 0px .5px rgb(51, 51, 51));display:block;margin:0 auto;width:32px;height:32px;margin-top:2px}.start-app.ui-draggable-dragging{background-color:transparent!important;width:40px!important;height:40px!important}.start-app.ui-draggable-dragging img{width:26px!important;height:26px!important}.start-app.ui-draggable-dragging .start-app-title{display:none}.launch-app-selected .start-app,.start-app:hover{background-color:#fff}.start-app:active{background-color:#fff}.start-app-title{font-size:13px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-overflow:ellipsis;display:block;margin-top:8px;width:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden}.digit-input{box-sizing:border-box;width:12.89%;height:50px;font-size:25px;text-align:center;border-radius:.5rem;-moz-appearance:textfield;border:2px solid #9b9b9b;color:#485660}.digit-input::-webkit-inner-spin-button,.digit-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.pulse{display:block;float:left;width:5px;height:5px;border-radius:50%;background:#fff;animation:pulse-white 1.5s infinite;margin:0;margin-top:8px}.forgot-password-link{cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:13px}.forgot-password-link:hover{text-decoration:underline}.pulse-dark{display:block;float:left;width:5px;height:5px;border-radius:50%;background:#3f3f3f;cursor:pointer;animation:pulse-dark 1.5s infinite;margin-top:-7px;margin-left:7px}.context-menu-item-icon-active .pulse{margin-top:-7px;margin-left:7px}.generic-close-window-button,.qr-code-window-close-btn{position:absolute;top:0;right:0;font-size:20px;cursor:pointer!important;color:#5f626d;opacity:.5;cursor:initial;padding:2px 10px 0 10px}.generic-close-window-button,.qr-code-window-close-btn:hover{opacity:1}.otp-qr-code{width:100%;display:flex;justify-content:center;flex-direction:column;align-items:center;height:320px}.otp-qr-code img{width:155px}.perm-title{text-align:center;margin-top:0;padding-bottom:15px;font-size:20px;font-weight:400;margin-bottom:10px;color:#4b586a;text-shadow:1px 1px #ffffff1c}.perm-description{text-align:center;font-size:15px;-webkit-font-smoothing:antialiased;padding:0 10px;color:#2d3847;margin-top:5px;margin-bottom:5px}@-webkit-keyframes pulse-white{0%{-webkit-box-shadow:0 0 0 0 #fff}70%{-webkit-box-shadow:0 0 0 px rgba(204,169,44,0)}100%{-webkit-box-shadow:0 0 0 0 rgba(204,169,44,0)}}@keyframes pulse-white{0%{-moz-box-shadow:0 0 0 0 #fff;box-shadow:0 0 0 0 #fff}70%{-moz-box-shadow:0 0 0 6px rgba(204,169,44,0);box-shadow:0 0 0 6px rgba(204,169,44,0)}100%{-moz-box-shadow:0 0 0 0 rgba(204,169,44,0);box-shadow:0 0 0 0 rgba(204,169,44,0)}}@-webkit-keyframes pulse-dark{0%{-webkit-box-shadow:0 0 0 0 #3f3f3f}70%{-webkit-box-shadow:0 0 0 6px #0267ff00}100%{-webkit-box-shadow:0 0 0 0 #0267ff00}}@keyframes pulse-dark{0%{-moz-box-shadow:0 0 0 0 #3f3f3f;box-shadow:0 0 0 0 #3f3f3f}70%{-moz-box-shadow:0 0 0 6px #0267ff00;box-shadow:0 0 0 6px #0267ff00}100%{-moz-box-shadow:0 0 0 0 #0267ff00;box-shadow:0 0 0 0 #0267ff00}}.download-progress-bar-container,.upload-progress-bar-container{width:100%;height:15px;border:1px solid rgb(40 109 157);background-color:#fff;box-shadow:inset -1px 3px 4px #dfdfdf}.download-progress-bar,.upload-progress-bar{width:0;height:15px;background-color:rgb(0 137 255);transition:.4s width;background-image:linear-gradient(to bottom,rgba(255,255,255,.3),rgba(255,255,255,.05))}.hide-scrollbar::-webkit-scrollbar{width:0!important;display:none}.hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.allow-user-select,.allow-user-select *{user-select:text}@keyframes spin{to{-webkit-transform:rotate(360deg)}}@-webkit-keyframes spin{to{-webkit-transform:rotate(360deg)}}@supports ((backdrop-filter:blur())){.window-head{background-color:rgba(231,238,245,.8);backdrop-filter:blur(10px)}.device-phone .window-head{background-color:rgba(231,238,245);backdrop-filter:blur(10px)}.window-sidebar{background-color:rgb(231 238 245 / 91%);backdrop-filter:blur(10px)}.window-snap-placeholder{backdrop-filter:blur(5px)}.context-menu{background-color:rgb(255 255 255 / 92%);backdrop-filter:blur(3px)}.popover:not(.device-phone .popover){background-color:#eef3f8;backdrop-filter:blur(10px)}}@-moz-keyframes three-quarters-loader{0%{-moz-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes three-quarters-loader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes three-quarters-loader{0%{-moz-transform:rotate(0);-ms-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.hidden{display:none}.invisible{visibility:hidden}.login-progress{height:200px;display:flex;flex-direction:column;justify-content:center;align-items:center}.dl-conf-item-attr{width:60px;text-align:right;display:inline-block;margin-right:10px}.launch-search{border-radius:5px;background-repeat:no-repeat;width:100%;box-sizing:border-box;background-color:#fff;padding:5px;background-size:20px;background-position-y:center;background-position-x:5px;padding-left:35px;padding-right:35px;border:2px solid #ccc}.launch-search-clear{display:none;position:absolute;right:10px;top:8px;opacity:.5}.launch-search-clear:hover{opacity:1}.website-badge-popover-title{font-size:14px;margin:-10px;margin-bottom:5px;padding:8px 10px;background:#e5e5e5;color:#4b5f6f}.website-badge-popover-content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:270px;padding:10px}.website-badge-popover-link,.website-badge-popover-link:visited{color:#0073ed;text-decoration:none;width:179px}.website-badge-popover-link:hover{text-decoration:underline}/*! + * animate.css - https://animate.style/ + * Version - 4.1.1 + * Licensed under the MIT license - http://opensource.org/licenses/MIT + * + * Copyright (c) 2020 Animate.css + */:root{--animate-duration:1s;--animate-delay:1s;--animate-repeat:1}.animate__animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-duration:var(--animate-duration);animation-duration:var(--animate-duration);-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.animate__zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.animate__fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}.animate__animated.animate__slow{-webkit-animation-duration:calc(1s * 2);animation-duration:calc(1s * 2);-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2)}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}:root{--animate-duration:300ms}.animate__animated.animate__faster{-webkit-animation-duration:calc(1s / 2);animation-duration:calc(1s / 2);-webkit-animation-duration:calc(var(--animate-duration) / 2);animation-duration:calc(var(--animate-duration) / 2)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.share-copy-link-on-social{float:right;width:30px;cursor:pointer;margin-top:2px}.copy-link-social-btn{margin:10px;display:inline-block;width:20px;height:20px}.copy-link-social-btn img{width:20px;height:20px}.puter-auth-dialog{outline:0;display:block;width:100%!important}.puter-auth-dialog{outline:0}.puter-auth-dialog-content{border:1px solid #e8e8e8;border-radius:8px;padding:20px;background:#fff;box-shadow:0 0 9px 1px rgb(0 0 0 / 21%);padding:80px 20px;-webkit-font-smoothing:antialiased;color:#575762;position:relative;background-image:url('data:image/webp;base64,UklGRlAbAABXRUJQVlA4WAoAAAAwAAAA8AIArQEAQUxQSB0AAAABB1ChiAgAKNL//xTR/9T//ve///3vf//73/+ZAwBWUDggDBsAAHAjAZ0BKvECrgE+nUyfTKWkMKsjk3mqEBOJaW6WwjzR/6prSfc95r2ztLOrL7Qmk8WYj6B+qfKm8C//+ufPmvfz/L6dZ/lf/79Rn1D/u8lf1n/h51GW/9DvL9u3/+z8//rLz8rv/Ho91qL//9Tf3+Dt29xsjEB3trEAO1CpmGKEcxEE0NTCpyVf/lDAyEBRUXwgPowMARkOmIbfb4QzfbEpqmW/oVDjCDhYdvNTH6wCem7jlfp6TsCUMhAr8Nka9YNDW//M1hIARGlp5TiuWo8zkVrq7MQ8sjAbL2ZDAR5HrshhvuQpLP42dIBC+d2vAQEWdwbMDviLsUYj7YuRYgd/nYcIbMPrxgnEqUps4UewgKUjphAD2DIgVLi0raUFF6zyUCN4z77Os61eB1TcZJ0RwsZHd++GEzQ7mz3e/8Gt7hdASIxvpMWj1hBk/wtwuFUwoyhwmcO1bs85XxEslCt8brpD8GCPMocPhn3/M5wnWvE4CeIukjl4/r+Ma/17kBr2SFIk0YVKOOYHgsl6GX4fv5Tgz90tiX7+h39885X77VVv+c7XN0O/GPWEet/y34k/ypNmTihk+1ziSLuRV3nLSLZDMraRTIfNve0QRePaEiQVD4I+oFEmoBXEet6lDvR2iq+orPAMjasfTuLzL+gpCtJ47qYj+USzv7/+nm7jib/cuN82LsnH50Z/Qk0/cZniT2GD2pL57Z/3gcIbTLEo7saABHxnU5Dv78DbEISkXdIVUjE/Awv/4aAzf8VAkX+XJNfUhTeww6xuB7Zu0m2J+gfOeH0Nn0l+pr9VX7F9aMLFhnIMOTFt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7V+sTf6OD/uo/B4/KpnM53lfCWfJNC3WKm5fyoUSeqj3NqjWfSS6bne3lcMnOk46zJZSIXyxaPs7Gb7NXogDdulXYM5PHj7DTDwprdEMKgENQa9Lxht5U4tfsrFsBR9HBLSMOUTAv3JQd9oEymfBz/lZBpVIM79OlzzKZcBKmTtus9qlm++iXv6eGLdEoEi17rSx1W7X7kQXaIkMsV+Ns9HtgN+2AZuzvsMRPdkX5oF21vVSmE91By9UnhKG8jjNUr66maTmHc0VBff2EPP1MC5OJ3h8EzlOaedk2k0OcEiRYPsasA2vYeu9fkcJLmT2Sq76VYK8/IPpTXI+/TSpXUFc1V5VqNyt/39hTJ/6kjBuuw+1cvJI4Ch4lMhw2xDUPR1uVztKpLamzen1fLYdTeupquuXMLAxtLFUEnwaQ18gb3wxUYIJwE3VkfXA/shqyDSb1+jNg5uBJmQyEgTBHjmHRoLIe/Woh58xTbLtb7IrXITJgvZmFXeSbhjd7ms2Kb0DyyDFPDz1pxEk2VO13dfjgNzw4rRZXDGNxKdW4V8x0ZqfMrs48cLI/j1eOqmLvo3k6gkaYRfrs1ngoVMqazzJrkJYFz8WmsD+K1eEp/LqNxUkodWrAq885E8VeIULxp0u3xb1m7uUnyrHzshPXSnGCDUaxFj6UxoYG6a3Ga7OYz0Sdnw+dQk230G0weEIt9GN3BpWOiGAJZ69w4jr2D+6RkhzNmnY9n1qV05DE1BflAzIDxsPW78jJAFiz5aARulRgVFwgBnMuPWxvLmIXBvAAHy65muvCAsGfVex4ZHKCCv6XnQ2OW9EURTQsdw7Gb8bz9teGINBk3/fz0oAJ5e9QAAAA==');background-repeat:no-repeat;background-position:center center;background-size:100% 100%;background-color:#fff;height:100%;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center}.puter-auth-dialog *{max-width:500px;font-family:"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif}.puter-auth-dialog p.about{text-align:center;font-size:17px;padding:10px 30px;font-weight:400;-webkit-font-smoothing:antialiased;color:#404048;box-sizing:border-box}.puter-auth-dialog .buttons{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;margin-top:20px;text-align:center;margin-bottom:20px}.launch-auth-popup-footnote{font-size:11px;color:#666;margin-top:10px;position:absolute;left:0;right:0;bottom:10px;text-align:center;margin:0 10px}.signup-terms{font-size:11px;color:#666;margin-top:10px;bottom:10px;text-align:center;margin:10px 0 15px}.puter-auth-dialog .close-btn{position:absolute;right:15px;top:10px;font-size:17px;color:#8a8a8a;cursor:pointer}.puter-auth-dialog .close-btn:hover{color:#000}.puter-auth-dialog .button{color:#666;background-color:#eee;border-color:#eee;font-size:14px;text-decoration:none;text-align:center;line-height:40px;height:35px;padding:0 30px;margin:0;display:inline-block;appearance:none;cursor:pointer;border:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-color:#b9b9b9;border-style:solid;border-width:1px;line-height:35px;background:-webkit-gradient(linear,left top,left bottom,from(#f6f6f6),to(#e1e1e1));background:linear-gradient(#f6f6f6,#e1e1e1);-webkit-box-shadow:inset 0 1px 0 rgb(255 255 255 / 30%),0 1px 2px rgb(0 0 0 / 15%);box-shadow:inset 0 1px 0 rgb(255 255 255 / 30%),0 1px 2px rgb(0 0 0 / 15%);border-radius:4px;outline:0;-webkit-font-smoothing:antialiased}.puter-auth-dialog .button:focus-visible{border-color:rgb(118 118 118)}.puter-auth-dialog .button.active,.puter-auth-dialog .button.has-open-contextmenu,.puter-auth-dialog .button.is-active,.puter-auth-dialog .button:active{text-decoration:none;background-color:#eee;border-color:#cfcfcf;color:#a9a9a9;-webkit-transition-duration:0s;transition-duration:0s;-webkit-box-shadow:inset 0 1px 3px rgb(0 0 0 / 20%);box-shadow:inset 0 2px 3px rgb(0 0 0 / 36%),0 1px 0 #fff}.puter-auth-dialog .button.disabled,.puter-auth-dialog .button.is-disabled,.puter-auth-dialog .button:disabled{top:0!important;background:#eee!important;border:1px solid #ddd!important;text-shadow:0 1px 1px #fff!important;color:#ccc!important;cursor:default!important;appearance:none!important;pointer-events:none}.puter-auth-dialog .button-action.disabled,.puter-auth-dialog .button-action.is-disabled,.puter-auth-dialog .button-action:disabled{background:#55a975!important;border:1px solid #60ab7d!important;text-shadow:none!important;color:#ccc!important}.puter-auth-dialog .button-primary.disabled,.puter-auth-dialog .button-primary.is-disabled,.puter-auth-dialog .button-primary:disabled{background:#8fc2e7!important;border:1px solid #98adbd!important;text-shadow:none!important;color:#f5f5f5!important}.puter-auth-dialog .button-block{width:100%}.puter-auth-dialog .button-primary{border-color:#088ef0;background:-webkit-gradient(linear,left top,left bottom,from(#34a5f8),to(#088ef0));background:linear-gradient(#34a5f8,#088ef0);color:#fff}.puter-auth-dialog .button-danger{border-color:#f00808;background:-webkit-gradient(linear,left top,left bottom,from(#f83434),to(#f00808));background:linear-gradient(#f83434,#f00808);color:#fff}.puter-auth-dialog .button-primary-flat.active,.puter-auth-dialog .button-primary-flat.is-active,.puter-auth-dialog .button-primary-flat:active,.puter-auth-dialog .button-primary.active,.puter-auth-dialog .button-primary.is-active,.puter-auth-dialog .button-primary:active{background-color:#2798eb;border-color:#2798eb;color:#bedef5}.puter-auth-dialog .button-action{border-color:#08bf4e;background:-webkit-gradient(linear,left top,left bottom,from(#29d55d),to(#1ccd60));background:linear-gradient(#29d55d,#1ccd60);color:#fff}.puter-auth-dialog .button-action-flat.active,.puter-auth-dialog .button-action-flat.is-active,.puter-auth-dialog .button-action-flat:active,.puter-auth-dialog .button-action.active,.puter-auth-dialog .button-action.is-active,.puter-auth-dialog .button-action:active{background-color:#27eb41;border-color:#27eb41;color:#bef5ca}.puter-auth-dialog .button-giant{font-size:28px;height:70px;line-height:70px;padding:0 70px}.puter-auth-dialog .button-jumbo{font-size:24px;height:60px;line-height:60px;padding:0 60px}.puter-auth-dialog .button-large{font-size:20px;height:50px;line-height:50px;padding:0 50px}.puter-auth-dialog .button-normal{font-size:16px;height:40px;line-height:38px;padding:0 40px}.puter-auth-dialog .button-small{height:30px;line-height:29px;padding:0 30px}.puter-auth-dialog .button-tiny{font-size:9.6px;height:24px;line-height:24px;padding:0 24px}#launch-auth-popup{margin-left:10px;width:200px;font-weight:500;font-size:15px}.puter-auth-dialog .button-auth{margin-bottom:10px}.puter-auth-dialog a,.puter-auth-dialog a:visited{color:rgb(0 69 238);text-decoration:none}.puter-auth-dialog a:hover{text-decoration:underline}@media (max-width:480px){.puter-auth-dialog-content{padding:50px 20px}.puter-auth-dialog .buttons{flex-direction:column-reverse}.puter-auth-dialog p.about{padding:10px 0}.puter-auth-dialog .button-auth{width:100%!important;margin:0!important;margin-bottom:10px!important}}.loading{width:100%;height:100%;position:absolute;top:0;left:0;background-color:#ebebebc2;display:flex;justify-content:center;align-items:center;display:none} + + diff --git a/dist/bundle.min.js b/dist/bundle.min.js new file mode 100644 index 00000000..1a974779 --- /dev/null +++ b/dist/bundle.min.js @@ -0,0 +1,323 @@ +window.icons = []; + + +window.icons['app-icon-uploader.svg'] = "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjIiIGJhc2VQcm9maWxlPSJ0aW55LXBzIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OCA0OCIgd2lkdGg9IjQ4IiBoZWlnaHQ9IjQ4Ij4KCTx0aXRsZT5hcHAtaWNvbi11cGxvYWRlci1zdmc8L3RpdGxlPgoJPGRlZnM+CgkJPGxpbmVhckdyYWRpZW50IGlkPSJncmQxIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgIHgxPSI0OC4wMDkiIHkxPSIzMC42OTEiIHgyPSIwIiB5Mj0iNy4yNzYiPgoJCQk8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM2Y2M0ZjUiICAvPgoJCQk8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNiNmRkZjIiICAvPgoJCTwvbGluZWFyR3JhZGllbnQ+CgkJPGxpbmVhckdyYWRpZW50IGlkPSJncmQ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pLTYtOS03LTgtOSIKICAgICAgIHI9IjUiIC8+CiAgICA8bGluZWFyR3JhZGllbnQKICAgICAgIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIgogICAgICAgeGxpbms6aHJlZj0iI2MtMyIKICAgICAgIGlkPSJuIgogICAgICAgeDE9IjI2IgogICAgICAgeDI9IjI2IgogICAgICAgeTE9IjIyIgogICAgICAgeTI9IjgiCiAgICAgICBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTMpIiAvPgogICAgPGxpbmVhckdyYWRpZW50CiAgICAgICBpZD0iYy0zIj4KICAgICAgPHN0b3AKICAgICAgICAgb2Zmc2V0PSIwIgogICAgICAgICBzdG9wLWNvbG9yPSIjZmZmIgogICAgICAgICBpZD0ic3RvcDM2LTYiIC8+CiAgICAgIDxzdG9wCiAgICAgICAgIG9mZnNldD0iMC40MjgxODMwNSIKICAgICAgICAgc3RvcC1jb2xvcj0iI2ZmZiIKICAgICAgICAgaWQ9InN0b3AzOC03IiAvPgogICAgICA8c3RvcAogICAgICAgICBvZmZzZXQ9IjAuNTAwOTMzMTciCiAgICAgICAgIHN0b3AtY29sb3I9IiNmZmYiCiAgICAgICAgIHN0b3Atb3BhY2l0eT0iLjY0MyIKICAgICAgICAgaWQ9InN0b3A0MC01IiAvPgogICAgICA8c3RvcAogICAgICAgICBvZmZzZXQ9IjEiCiAgICAgICAgIHN0b3AtY29sb3I9IiNmZmYiCiAgICAgICAgIHN0b3Atb3BhY2l0eT0iLjM5MSIKICAgICAgICAgaWQ9InN0b3A0Mi0zIiAvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPG1ldGFkYXRhCiAgICAgaWQ9Im1ldGFkYXRhNjY1NCI+CiAgICA8cmRmOlJERj4KICAgICAgPGNjOldvcmsKICAgICAgICAgcmRmOmFib3V0PSIiPgogICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2Uvc3ZnK3htbDwvZGM6Zm9ybWF0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UiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLXdpZHRoPSIxLjkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPg=="; +window.icons['c-check.svg'] = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgdmVyc2lvbj0iMS4xIj4KIDxjaXJjbGUgc3R5bGU9ImZpbGw6IzRjYWY1MCIgY3g9IjI0IiBjeT0iMjQiIHI9IjIwIi8+CiA8cGF0aCBzdHlsZT0iZmlsbDojZmZmZmZmIiBkPSJNIDM1LDE0IDIyLDI3IDE0LDE5IDEwLDIzIDIyLDM1IDM5LDE4IFoiLz4KPC9zdmc+Cg=="; +window.icons['chevron-right-active.svg'] = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNTlweCIgaGVpZ2h0PSI1OXB4IiBzdHJva2Utd2lkdGg9IjEuOSIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjb2xvcj0iI2ZmZmZmZiI+CiAgICA8cGF0aCBkPSJNOSA2TDE1IDEyTDkgMTgiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPgo8L3N2Zz4="; +window.icons['chevron-right.svg'] = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1OXB4IiBoZWlnaHQ9IjU5cHgiIHN0cm9rZS13aWR0a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2IDIuMzI4NTkyLC0xLjExMzEyOSAzLjQ0NzAyMywtMS40OTk3ODcgMC4wNDIwOSwwLjM4OTU1IDAuMDcxNjMsMC43NzEwMTkgMC4wNzcwMiwxLjEzNjMyMyAwLjAyODA3LDEuOTExNDQ1IC0wLjQzMDkxNCwzLjM3MjQ0OCAtMS4yNDk0MzYsNC4yODQwMzQgbCAtMi4yNzQ1NDIsLTMuOTIwNTI1IHogbSAtNi4yNTQ1MjksNC41ODQwMTggYyAwLjQ2NjY3MSwwLjM1NTI5IDAuOTM3NzU5LDAuNjg3MjE3IDEuNDEzNDQ4LDAuOTY5ODMzIDAuMzczOTkzLDAuMjIyMTkxIDAuNzUyOTY2LDAuNDEyNDQxIDEuMTMzNzUzLDAuNTg0OTg1IC0xLjIyNzMwMSwwLjA4MzE3IC0yLjQ1MDI0MiwtMC4wMTk5IC0zLjYzMTI1NywtMC4zMDM3NDcgMC4zMjU4MzYsLTAuNDEzODIzIDAuNjc4ODU0LC0wLjgzMTk2MiAxLjA4NDAxLC0xLjI1MTA5MSB6IG0gMTEuNjQ1NTM0LC02LjY1MDcxNCBjIDAuNTYzMzk3LC0wLjEzNDUzMSAxLjEwMDM5MiwtMC4yMjY0MTIgMS42MTg0NywtMC4yOTQ5MTQgLTAuMzQ1Mzk4LDEuMTQ0ODIzIC0wLjg2NDIyOCwyLjIzNTY5NCAtMS41NDQxMjcsMy4yMzkyMTkgMC4wMzkzNSwtMC40MTc5MTMgMC4wNjM2OCwtMC44NDE5NTcgMC4wNTcyNiwtMS4yNzgyOCAtMC4wMDc5LC0wLjUzOTQ4MiAtMC4wNTg4LC0xLjA5OTE1NCAtMC4xMzE2MSwtMS42NjYwNyB6Ii8+Cjwvc3ZnPgo="; + + + +/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0g in E?Y(E,g,{enumerable:!0,configurable:!0,writable:!0,value:v}):E[g]=v;var u=(E,g,v)=>($(E,typeof g!="symbol"?g+"":g,v),v);class E{constructor(){u(this,"_listeners",new Map);u(this,"on",this.addEventListener);u(this,"off",this.removeEventListener);u(this,"emit",this.dispatchEvent)}addEventListener(n,e){const t=this._listeners.get(n)||new Set;return this._listeners.set(n,t),t.add(e),this}removeEventListener(n,e){var t;return(t=this._listeners.get(n))==null||t.delete(e),this}dispatchEvent(n,...e){let t=!0;for(const s of this._listeners.get(n)||[])t=s(...e)!==!1&&t;return t}unbindAllListeners(){this._listeners.clear()}}const g=(r,n="px")=>typeof r=="number"?r+n:r;function v({style:r},n,e){if(typeof n=="object")for(const[t,s]of Object.entries(n))s!==void 0&&(r[t]=g(s));else e!==void 0&&(r[n]=g(e))}function C(r){return(n,e,t,s={})=>{n instanceof HTMLCollection||n instanceof NodeList?n=Array.from(n):Array.isArray(n)||(n=[n]),Array.isArray(e)||(e=[e]);for(const o of n)for(const i of e)o[r](i,t,{capture:!1,...s});return[n,e,t,s]}}const A=C("addEventListener"),b=C("removeEventListener"),w=r=>{const{clientX:n,clientY:e,target:t}=r.touches&&r.touches[0]||r;return{x:n,y:e,target:t}};function M(r,n,e="touch"){switch(e){case"center":{const t=n.left+n.width/2,s=n.top+n.height/2;return t>=r.left&&t<=r.right&&s>=r.top&&s<=r.bottom}case"cover":return n.left>=r.left&&n.top>=r.top&&n.right<=r.right&&n.bottom<=r.bottom;case"touch":return r.right>=n.left&&r.left<=n.right&&r.bottom>=n.top&&r.top<=n.bottom}}function T(r,n=document){const e=Array.isArray(r)?r:[r];let t=[];for(let s=0,o=e.length;smatchMedia("(hover: none), (pointer: coarse)").matches,q=()=>"safari"in window,R=(r,n)=>{for(const[e,t]of Object.entries(r)){const s=n[e];r[e]=s===void 0?r[e]:typeof s=="object"&&typeof t=="object"&&t!==null&&!Array.isArray(t)?R(t,s):s}return r},F=r=>{let n,e=-1,t=!1;return{next(...s){n=s,t||(t=!0,e=requestAnimationFrame(()=>{r(...n),t=!1}))},cancel(){cancelAnimationFrame(e),t=!1}}},{abs:S,max:k,min:D,ceil:j}=Math;class B extends E{constructor(e){super();u(this,"_options");u(this,"_selection",{stored:[],selected:[],touched:[],changed:{added:[],removed:[]}});u(this,"_area");u(this,"_clippingElement");u(this,"_targetElement");u(this,"_targetRect");u(this,"_selectables",[]);u(this,"_latestElement");u(this,"_areaRect",new DOMRect);u(this,"_areaLocation",{y1:0,x2:0,y2:0,x1:0});u(this,"_singleClick",!0);u(this,"_frame");u(this,"_scrollAvailable",!0);u(this,"_scrollingActive",!1);u(this,"_scrollSpeed",{x:0,y:0});u(this,"_scrollDelta",{x:0,y:0});u(this,"disable",this._bindStartEvents.bind(this,!1));u(this,"enable",this._bindStartEvents);this._options=R({selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,behaviour:{overlap:"invert",intersect:"touch",startThreshold:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:0,y:0}}},features:{range:!0,touch:!0,singleTap:{allow:!0,intersect:"native"}},startAreas:["html"],boundaries:["html"],container:"body"},e);for(const i of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[i]=="function"&&(this[i]=this[i].bind(this));const{document:t,selectionAreaClass:s,selectionContainerClass:o}=this._options;this._area=t.createElement("div"),this._clippingElement=t.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(s),o&&this._clippingElement.classList.add(o),v(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),v(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=F(i=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",i),this._redrawSelectionArea()}),this.enable()}_bindStartEvents(e=!0){const{document:t,features:s}=this._options,o=e?A:b;o(t,"mousedown",this._onTapStart),s.touch&&o(t,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(e,t=!1){const{x:s,y:o,target:i}=w(e),{_options:l}=this,{document:c}=this._options,d=i.getBoundingClientRect(),_=T(l.startAreas,l.document),m=T(l.boundaries,l.document);this._targetElement=m.find(y=>M(y.getBoundingClientRect(),d));const f=e.composedPath();if(!this._targetElement||!_.find(y=>f.includes(y))||!m.find(y=>f.includes(y))||!t&&this._emitEvent("beforestart",e)===!1)return;this._areaLocation={x1:s,y1:o,x2:0,y2:0};const a=c.scrollingElement||c.body;this._scrollDelta={x:a.scrollLeft,y:a.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),A(c,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),A(c,["mouseup","touchcancel","touchend"],this._onTapStop),A(c,"scroll",this._onScroll)}_onSingleTap(e){const{singleTap:{intersect:t},range:s}=this._options.features,o=w(e);let i;if(t==="native")i=o.target;else if(t==="touch"){this.resolveSelectables();const{x:c,y:d}=o;i=this._selectables.find(_=>{const{right:m,left:f,top:a,bottom:y}=_.getBoundingClientRect();return cf&&da})}if(!i)return;for(this.resolveSelectables();!this._selectables.includes(i);){if(!i.parentElement)return;i=i.parentElement}const{stored:l}=this._selection;if(this._emitEvent("start",e),e.shiftKey&&l.length&&s){const c=this._latestElement??l[0],[d,_]=c.compareDocumentPosition(i)&4?[i,c]:[c,i],m=[...this._selectables.filter(f=>f.compareDocumentPosition(d)&4&&f.compareDocumentPosition(_)&2),d,_];this.select(m)}else l.includes(i)&&(l.length===1||e.ctrlKey||l.every(c=>this._selection.stored.includes(c)))?this.deselect(i):(this._latestElement=i,this.select(i));this._emitEvent("stop",e)}_delayedTapMove(e){const{container:t,document:s,behaviour:{startThreshold:o}}=this._options,{x1:i,y1:l}=this._areaLocation,{x:c,y:d}=w(e),_=typeof o;if(_==="number"&&S(c+d-(i+l))>=o||_==="object"&&S(c-i)>=o.x||S(d-l)>=o.y){if(b(s,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",e)===!1){b(s,["mouseup","touchcancel","touchend"],this._onTapStop);return}A(s,["mousemove","touchmove"],this._onTapMove,{passive:!1}),v(this._area,"display","block"),T(t,s)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(A(s,"wheel",this._manualScroll,{passive:!1}),this._selectables=this._selectables.filter(m=>this._targetElement.contains(m))),this._setupSelectionArea(),this._emitEvent("start",e),this._onTapMove(e)}this._handleMoveEvent(e)}_setupSelectionArea(){const{_clippingElement:e,_targetElement:t,_area:s}=this,o=this._targetRect=t.getBoundingClientRect();this._scrollAvailable?(v(e,{top:o.top,left:o.left,width:o.width,height:o.height}),v(s,{marginTop:-o.top,marginLeft:-o.left})):(v(e,{top:0,left:0,width:"100%",height:"100%"}),v(s,{marginTop:0,marginLeft:0}))}_onTapMove(e){const{x:t,y:s}=w(e),{_scrollSpeed:o,_areaLocation:i,_options:l,_frame:c}=this,{speedDivider:d}=l.behaviour.scrolling,_=this._targetElement;if(i.x2=t,i.y2=s,this._scrollAvailable&&!this._scrollingActive&&(o.y||o.x)){this._scrollingActive=!0;const m=()=>{if(!o.x&&!o.y){this._scrollingActive=!1;return}const{scrollTop:f,scrollLeft:a}=_;o.y&&(_.scrollTop+=j(o.y/d),i.y1-=_.scrollTop-f),o.x&&(_.scrollLeft+=j(o.x/d),i.x1-=_.scrollLeft-a),c.next(e),requestAnimationFrame(m)};requestAnimationFrame(m)}else c.next(e);this._handleMoveEvent(e)}_handleMoveEvent(e){const{features:t}=this._options;(t.touch&&H()||this._scrollAvailable&&q())&&e.preventDefault()}_onScroll(){const{_scrollDelta:e,_options:{document:t}}=this,{scrollTop:s,scrollLeft:o}=t.scrollingElement||t.body;this._areaLocation.x1+=e.x-o,this._areaLocation.y1+=e.y-s,e.x=o,e.y=s,this._setupSelectionArea(),this._frame.next(null)}_manualScroll(e){const{manualSpeed:t}=this._options.behaviour.scrolling,s=e.deltaY?e.deltaY>0?1:-1:0,o=e.deltaX?e.deltaX>0?1:-1:0;this._scrollSpeed.y+=s*t,this._scrollSpeed.x+=o*t,this._onTapMove(e),e.preventDefault()}_recalculateSelectionAreaRect(){const{_scrollSpeed:e,_areaLocation:t,_areaRect:s,_targetElement:o,_options:i}=this,{scrollTop:l,scrollHeight:c,clientHeight:d,scrollLeft:_,scrollWidth:m,clientWidth:f}=o,a=this._targetRect,{x1:y,y1:L}=t;let{x2:p,y2:h}=t;const{behaviour:{scrolling:{startScrollMargins:x}}}=i;pa.right-x.x?(e.x=m-_-f?S(a.left+a.width-p-x.x):0,p=p>a.right?a.right:p):e.x=0,ha.bottom-x.y?(e.y=c-l-d?S(a.top+a.height-h-x.y):0,h=h>a.bottom?a.bottom:h):e.y=0;const O=D(y,p),P=D(L,h),W=k(y,p),X=k(L,h);s.x=O,s.y=P,s.width=W-O,s.height=X-P}_redrawSelectionArea(){const{x:e,y:t,width:s,height:o}=this._areaRect,{style:i}=this._area;i.left=`${e}px`,i.top=`${t}px`,i.width=`${s}px`,i.height=`${o}px`}_onTapStop(e,t){var l;const{document:s,features:o}=this._options,{_singleClick:i}=this;b(s,["mousemove","touchmove"],this._delayedTapMove),b(s,["touchmove","mousemove"],this._onTapMove),b(s,["mouseup","touchcancel","touchend"],this._onTapStop),b(s,"scroll",this._onScroll),this._keepSelection(),e&&i&&o.singleTap.allow?this._onSingleTap(e):!i&&!t&&(this._updateElementSelection(),this._emitEvent("stop",e)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,this._scrollAvailable&&b(s,"wheel",this._manualScroll,{passive:!0}),this._clippingElement.remove(),(l=this._frame)==null||l.cancel(),v(this._area,"display","none")}_updateElementSelection(){const{_selectables:e,_options:t,_selection:s,_areaRect:o}=this,{stored:i,selected:l,touched:c}=s,{intersect:d,overlap:_}=t.behaviour,m=_==="invert",f=[],a=[],y=[];for(let p=0;p!l.includes(p)));const L=_==="keep";for(let p=0;p!l.includes(d));switch(e.behaviour.overlap){case"drop":{t.stored=[...c,...l.filter(d=>!i.includes(d))];break}case"invert":{t.stored=[...c,...l.filter(d=>!o.removed.includes(d))];break}case"keep":{t.stored=[...l,...s.filter(d=>!l.includes(d))];break}}}resolveSelectables(){this._selectables=T(this._options.selectables,this._options.document)}clearSelection(e=!0,t=!1){const{selected:s,stored:o,changed:i}=this._selection;i.added=[],i.removed.push(...s,...e?o:[]),t||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._latestElement=void 0,this._selection={stored:e?[]:o,selected:[],touched:[],changed:{added:[],removed:[]}}}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}cancel(e=!1){this._onTapStop(null,!e)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(e,t=!1){const{changed:s,selected:o,stored:i}=this._selection,l=T(e,this._options.document).filter(c=>!o.includes(c)&&!i.includes(c));return i.push(...l),o.push(...l),s.added.push(...l),s.removed=[],this._latestElement=void 0,t||(this._emitEvent("move",null),this._emitEvent("stop",null)),l}deselect(e,t=!1){const{selected:s,stored:o,changed:i}=this._selection,l=T(e,this._options.document).filter(c=>s.includes(c)||o.includes(c));l.length&&(this._selection.stored=o.filter(c=>!l.includes(c)),this._selection.selected=s.filter(c=>!l.includes(c)),this._selection.changed.added=[],this._selection.changed.removed.push(...l.filter(c=>!i.removed.includes(c))),this._latestElement=void 0,t||(this._emitEvent("move",null),this._emitEvent("stop",null)))}}return u(B,"version","3.2.4"),B}); +//# sourceMappingURL=viselect.umd.js.map + + +(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,"undefined"!=typeof module&&(module.exports=g)}); + +//# sourceMappingURL=FileSaver.min.js.map + + +/*! + * Socket.IO v4.7.2 + * (c) 2014-2023 Guillermo Rauch + * Released under the MIT License. + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).io=e()}(this,(function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}var v=Object.create(null);v.open="0",v.close="1",v.ping="2",v.pong="3",v.message="4",v.upgrade="5",v.noop="6";var g=Object.create(null);Object.keys(v).forEach((function(t){g[v[t]]=t}));var m,b={type:"error",data:"parser error"},k="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),w="function"==typeof ArrayBuffer,_=function(t){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer},A=function(t,e,n){var r=t.type,i=t.data;return k&&i instanceof Blob?e?n(i):O(i,n):w&&(i instanceof ArrayBuffer||_(i))?e?n(i):O(new Blob([i]),n):n(v[r]+(i||""))},O=function(t,e){var n=new FileReader;return n.onload=function(){var t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function E(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}for(var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R="undefined"==typeof Uint8Array?[]:new Uint8Array(256),C=0;C<64;C++)R[T.charCodeAt(C)]=C;var B,S="function"==typeof ArrayBuffer,N=function(t,e){if("string"!=typeof t)return{type:"message",data:x(t,e)};var n=t.charAt(0);return"b"===n?{type:"message",data:L(t.substring(1),e)}:g[n]?t.length>1?{type:g[n],data:t.substring(1)}:{type:g[n]}:b},L=function(t,e){if(S){var n=function(t){var e,n,r,i,o,s=.75*t.length,a=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var c=new ArrayBuffer(s),h=new Uint8Array(c);for(e=0;e>4,h[u++]=(15&r)<<4|i>>2,h[u++]=(3&i)<<6|63&o;return c}(t);return x(n,e)}return{base64:!0,data:t}},x=function(t,e){return"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},P=String.fromCharCode(30);function q(){return new TransformStream({transform:function(t,e){!function(t,e){k&&t.data instanceof Blob?t.data.arrayBuffer().then(E).then(e):w&&(t.data instanceof ArrayBuffer||_(t.data))?e(E(t.data)):A(t,!1,(function(t){m||(m=new TextEncoder),e(m.encode(t))}))}(t,(function(n){var r,i=n.length;if(i<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,i);else if(i<65536){r=new Uint8Array(3);var o=new DataView(r.buffer);o.setUint8(0,126),o.setUint16(1,i)}else{r=new Uint8Array(9);var s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(i))}t.data&&"string"!=typeof t.data&&(r[0]|=128),e.enqueue(r),e.enqueue(n)}))}})}function j(t){return t.reduce((function(t,e){return t+e.length}),0)}function D(t,e){if(t[0].length===e)return t.shift();for(var n=new Uint8Array(e),r=0,i=0;i1?e-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}},{key:"_hostname",value:function(){var t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}},{key:"_port",value:function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}},{key:"_query",value:function(t){var e=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}(t);return e.length?"?"+e:""}}]),i}(U),z="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),J=64,$={},Q=0,X=0;function G(t){var e="";do{e=z[t%J]+e,t=Math.floor(t/J)}while(t>0);return e}function Z(){var t=G(+new Date);return t!==K?(Q=0,K=t):t+"."+G(Q++)}for(;X0&&void 0!==arguments[0]?arguments[0]:{};return i(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new st(this.uri(),t)}},{key:"doWrite",value:function(t,e){var n=this,r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(function(t,e){n.onError("xhr post error",t,e)}))}},{key:"doPoll",value:function(){var t=this,e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(function(e,n){t.onError("xhr poll error",e,n)})),this.pollXhr=e}}]),s}(W),st=function(t){o(i,t);var n=l(i);function i(t,r){var o;return e(this,i),H(f(o=n.call(this)),r),o.opts=r,o.method=r.method||"GET",o.uri=t,o.data=void 0!==r.data?r.data:null,o.create(),o}return r(i,[{key:"create",value:function(){var t,e=this,n=F(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;var r=this.xhr=new nt(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders)for(var o in r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this.opts.extraHeaders[o])}catch(t){}if("POST"===this.method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{r.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=function(){var t;3===r.readyState&&(null===(t=e.opts.cookieJar)||void 0===t||t.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?e.onLoad():e.setTimeoutFn((function(){e.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(t){return void this.setTimeoutFn((function(){e.onError(t)}),0)}"undefined"!=typeof document&&(this.index=i.requestsCount++,i.requests[this.index]=this)}},{key:"onError",value:function(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=rt,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete i.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),i}(U);if(st.requestsCount=0,st.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",at);else if("function"==typeof addEventListener){addEventListener("onpagehide"in I?"pagehide":"unload",at,!1)}function at(){for(var t in st.requests)st.requests.hasOwnProperty(t)&&st.requests[t].abort()}var ut="function"==typeof Promise&&"function"==typeof Promise.resolve?function(t){return Promise.resolve().then(t)}:function(t,e){return e(t,0)},ct=I.WebSocket||I.MozWebSocket,ht="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),ft=function(t){o(i,t);var n=l(i);function i(t){var r;return e(this,i),(r=n.call(this,t)).supportsBinary=!t.forceBase64,r}return r(i,[{key:"name",get:function(){return"websocket"}},{key:"doOpen",value:function(){if(this.check()){var t=this.uri(),e=this.opts.protocols,n=ht?{}:F(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=ht?new ct(t,e,n):e?new ct(t,e):new ct(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}}},{key:"addEventListeners",value:function(){var t=this;this.ws.onopen=function(){t.opts.autoUnref&&t.ws._socket.unref(),t.onOpen()},this.ws.onclose=function(e){return t.onClose({description:"websocket connection closed",context:e})},this.ws.onmessage=function(e){return t.onData(e.data)},this.ws.onerror=function(e){return t.onError("websocket error",e)}}},{key:"write",value:function(t){var e=this;this.writable=!1;for(var n=function(){var n=t[r],i=r===t.length-1;A(n,e.supportsBinary,(function(t){try{e.ws.send(t)}catch(t){}i&&ut((function(){e.writable=!0,e.emitReserved("drain")}),e.setTimeoutFn)}))},r=0;rMath.pow(2,21)-1){a.enqueue(b);break}i=l*Math.pow(2,32)+f.getUint32(4),r=3}else{if(j(n)t){a.enqueue(b);break}}}})}(Number.MAX_SAFE_INTEGER,t.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=q();i.readable.pipeTo(e.writable),t.writer=i.writable.getWriter();!function e(){r.read().then((function(n){var r=n.done,i=n.value;r||(t.onPacket(i),e())})).catch((function(t){}))}();var o={type:"open"};t.query.sid&&(o.data='{"sid":"'.concat(t.query.sid,'"}')),t.writer.write(o).then((function(){return t.onOpen()}))}))})))}},{key:"write",value:function(t){var e=this;this.writable=!1;for(var n=function(){var n=t[r],i=r===t.length-1;e.writer.write(n).then((function(){i&&ut((function(){e.writable=!0,e.emitReserved("drain")}),e.setTimeoutFn)}))},r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),(r=s.call(this)).binaryType="arraybuffer",r.writeBuffer=[],n&&"object"===t(n)&&(o=n,n=null),n?(n=vt(n),o.hostname=n.host,o.secure="https"===n.protocol||"wss"===n.protocol,o.port=n.port,n.query&&(o.query=n.query)):o.host&&(o.hostname=vt(o.host).host),H(f(r),o),r.secure=null!=o.secure?o.secure:"undefined"!=typeof location&&"https:"===location.protocol,o.hostname&&!o.port&&(o.port=r.secure?"443":"80"),r.hostname=o.hostname||("undefined"!=typeof location?location.hostname:"localhost"),r.port=o.port||("undefined"!=typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=o.transports||["polling","websocket","webtransport"],r.writeBuffer=[],r.prevBufferLen=0,r.opts=i({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},o),r.opts.path=r.opts.path.replace(/\/$/,"")+(r.opts.addTrailingSlash?"/":""),"string"==typeof r.opts.query&&(r.opts.query=function(t){for(var e={},n=t.split("&"),r=0,i=n.length;r1))return this.writeBuffer;for(var t,e=1,n=0;n=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}return this.writeBuffer}},{key:"write",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"send",value:function(t,e,n){return this.sendPacket("message",t,e,n),this}},{key:"sendPacket",value:function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}}},{key:"close",value:function(){var t=this,e=function(){t.onClose("forced close"),t.transport.close()},n=function n(){t.off("upgrade",n),t.off("upgradeError",n),e()},r=function(){t.once("upgrade",n),t.once("upgradeError",n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){t.upgrading?r():e()})):this.upgrading?r():e()),this}},{key:"onError",value:function(t){a.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}},{key:"onClose",value:function(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(t){for(var e=[],n=0,r=t.length;n=0&&e.num1?e-1:0),r=1;r1?n-1:0),i=1;in._opts.retries&&(n._queue.shift(),e&&e(t));else if(n._queue.shift(),e){for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s0&&void 0!==arguments[0]&&arguments[0];if(this.connected&&0!==this._queue.length){var e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}}},{key:"packet",value:function(t){t.nsp=this.nsp,this.io._packet(t)}},{key:"onopen",value:function(){var t=this;"function"==typeof this.auth?this.auth((function(e){t._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}},{key:"_sendConnectPacket",value:function(t){this.packet({type:Bt.CONNECT,data:this._pid?i({pid:this._pid,offset:this._lastOffset},t):t})}},{key:"onerror",value:function(t){this.connected||this.emitReserved("connect_error",t)}},{key:"onclose",value:function(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}},{key:"onpacket",value:function(t){if(t.nsp===this.nsp)switch(t.type){case Bt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Bt.EVENT:case Bt.BINARY_EVENT:this.onevent(t);break;case Bt.ACK:case Bt.BINARY_ACK:this.onack(t);break;case Bt.DISCONNECT:this.ondisconnect();break;case Bt.CONNECT_ERROR:this.destroy();var e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}},{key:"onevent",value:function(t){var e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}},{key:"emitEvent",value:function(t){if(this._anyListeners&&this._anyListeners.length){var e,n=y(this._anyListeners.slice());try{for(n.s();!(e=n.n()).done;){e.value.apply(this,t)}}catch(t){n.e(t)}finally{n.f()}}p(s(a.prototype),"emit",this).apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}},{key:"ack",value:function(t){var e=this,n=!1;return function(){if(!n){n=!0;for(var r=arguments.length,i=new Array(r),o=0;o0&&t.jitter<=1?t.jitter:0,this.attempts=0}It.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},It.prototype.reset=function(){this.attempts=0},It.prototype.setMin=function(t){this.ms=t},It.prototype.setMax=function(t){this.max=t},It.prototype.setJitter=function(t){this.jitter=t};var Ft=function(n){o(s,n);var i=l(s);function s(n,r){var o,a;e(this,s),(o=i.call(this)).nsps={},o.subs=[],n&&"object"===t(n)&&(r=n,n=void 0),(r=r||{}).path=r.path||"/socket.io",o.opts=r,H(f(o),r),o.reconnection(!1!==r.reconnection),o.reconnectionAttempts(r.reconnectionAttempts||1/0),o.reconnectionDelay(r.reconnectionDelay||1e3),o.reconnectionDelayMax(r.reconnectionDelayMax||5e3),o.randomizationFactor(null!==(a=r.randomizationFactor)&&void 0!==a?a:.5),o.backoff=new It({min:o.reconnectionDelay(),max:o.reconnectionDelayMax(),jitter:o.randomizationFactor()}),o.timeout(null==r.timeout?2e4:r.timeout),o._readyState="closed",o.uri=n;var u=r.parser||qt;return o.encoder=new u.Encoder,o.decoder=new u.Decoder,o._autoConnect=!1!==r.autoConnect,o._autoConnect&&o.open(),o}return r(s,[{key:"reconnection",value:function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}},{key:"reconnectionAttempts",value:function(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}},{key:"reconnectionDelay",value:function(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}},{key:"randomizationFactor",value:function(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}},{key:"reconnectionDelayMax",value:function(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}},{key:"timeout",value:function(t){return arguments.length?(this._timeout=t,this):this._timeout}},{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function(t){var e=this;if(~this._readyState.indexOf("open"))return this;this.engine=new gt(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;var i=jt(n,"open",(function(){r.onopen(),t&&t()})),o=function(n){e.cleanup(),e._readyState="closed",e.emitReserved("error",n),t?t(n):e.maybeReconnectOnOpen()},s=jt(n,"error",o);if(!1!==this._timeout){var a=this._timeout,u=this.setTimeoutFn((function(){i(),o(new Error("timeout")),n.close()}),a);this.opts.autoUnref&&u.unref(),this.subs.push((function(){e.clearTimeoutFn(u)}))}return this.subs.push(i),this.subs.push(s),this}},{key:"connect",value:function(t){return this.open(t)}},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.emitReserved("open");var t=this.engine;this.subs.push(jt(t,"ping",this.onping.bind(this)),jt(t,"data",this.ondata.bind(this)),jt(t,"error",this.onerror.bind(this)),jt(t,"close",this.onclose.bind(this)),jt(this.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key:"ondata",value:function(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}},{key:"ondecoded",value:function(t){var e=this;ut((function(){e.emitReserved("packet",t)}),this.setTimeoutFn)}},{key:"onerror",value:function(t){this.emitReserved("error",t)}},{key:"socket",value:function(t,e){var n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new Ut(this,t,e),this.nsps[t]=n),n}},{key:"_destroy",value:function(t){for(var e=0,n=Object.keys(this.nsps);e=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.duration();this._reconnecting=!0;var r=this.setTimeoutFn((function(){e.skipReconnect||(t.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((function(n){n?(e._reconnecting=!1,e.reconnect(),t.emitReserved("reconnect_error",n)):e.onreconnect()})))}),n);this.opts.autoUnref&&r.unref(),this.subs.push((function(){t.clearTimeoutFn(r)}))}}},{key:"onreconnect",value:function(){var t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}]),s}(U),Mt={};function Vt(e,n){"object"===t(e)&&(n=e,e=void 0);var r,i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==n?n.protocol+"//"+t:"https://"+t),r=vt(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+e,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(n=n||{}).path||"/socket.io"),o=i.source,s=i.id,a=i.path,u=Mt[s]&&a in Mt[s].nsps;return n.forceNew||n["force new connection"]||!1===n.multiplex||u?r=new Ft(o,n):(Mt[s]||(Mt[s]=new Ft(o,n)),r=Mt[s]),i.query&&!n.query&&(n.query=i.queryKey),r.socket(i.path,n)}return i(Vt,{Manager:Ft,Socket:Ut,io:Vt,connect:Vt}),Vt})); +//# sourceMappingURL=socket.io.min.js.map + + + +var QRCode;!function(){function t(t){this.mode=r.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,o=this.data.length;e65536?(i[0]=240|(1835008&n)>>>18,i[1]=128|(258048&n)>>>12,i[2]=128|(4032&n)>>>6,i[3]=128|63&n):n>2048?(i[0]=224|(61440&n)>>>12,i[1]=128|(4032&n)>>>6,i[2]=128|63&n):n>128?(i[0]=192|(1984&n)>>>6,i[1]=128|63&n):i[0]=n,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function e(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,r)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var o=-1;o<=7;o++)e+o<=-1||this.moduleCount<=e+o||(this.modules[t+r][e+o]=0<=r&&r<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=o&&o<=4)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var o=g.getLostPoint(this);(0==r||t>o)&&(t=o,e=r)}return e},createMovieClip:function(t,e,r){var o=t.createEmptyMovieClip(e,r);this.make();for(var i=0;i>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(r=0;r<18;r++){o=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,o=g.getBCHTypeInfo(r),i=0;i<15;i++){var n=!t&&1==(o>>i&1);i<6?this.modules[i][8]=n:i<8?this.modules[i+1][8]=n:this.modules[this.moduleCount-15+i][8]=n}for(i=0;i<15;i++){n=!t&&1==(o>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=n:i<9?this.modules[8][15-i-1+1]=n:this.modules[8][15-i-1]=n}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,o=this.moduleCount-1,i=7,n=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var s=0;s<2;s++)if(null==this.modules[o][a-s]){var h=!1;n>>i&1)),g.getMask(e,o,a-s)&&(h=!h),this.modules[o][a-s]=h,-1==--i&&(n++,i=7)}if((o+=r)<0||this.moduleCount<=o){o-=r,r=-r;break}}}},e.PAD0=236,e.PAD1=17,e.createData=function(t,r,o){for(var i=m.getRSBlocks(t,r),n=new _,a=0;a8*h)throw new Error("code length overflow. ("+n.getLengthInBits()+">"+8*h+")");for(n.getLengthInBits()+4<=8*h&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;!(n.getLengthInBits()>=8*h||(n.put(e.PAD0,8),n.getLengthInBits()>=8*h));)n.put(e.PAD1,8);return e.createBytes(n,i)},e.createBytes=function(t,e){for(var r=0,o=0,i=0,n=new Array(e.length),a=new Array(e.length),s=0;s=0?d.get(c):0}}var m=0;for(u=0;u=0;)e^=g.G15<=0;)e^=g.G18<>>=1;return e},getPatternPosition:function(t){return g.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case i:return(e+r)%2==0;case n:return e%2==0;case a:return r%3==0;case s:return(e+r)%3==0;case h:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case l:return e*r%2+e*r%3==0;case u:return(e*r%2+e*r%3)%2==0;case f:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new p([1],0),r=0;r5&&(r+=3+n-5)}for(o=0;o=256;)t-=255;return d.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},c=0;c<8;c++)d.EXP_TABLE[c]=1<>>7-t%8&1)},put:function(t,e){for(var r=0;r>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var v=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function C(){var t=!1,e=navigator.userAgent;if(/android/i.test(e)){t=!0;var r=e.toString().match(/android ([0-9]\.[0-9])/i);r&&r[1]&&(t=parseFloat(r[1]))}return t}var w=function(){var t=function(t,e){this._el=t,this._htOption=e};return t.prototype.draw=function(t){var e=this._htOption,r=this._el,o=t.getModuleCount();Math.floor(e.width/o),Math.floor(e.height/o);function i(t,e){var r=document.createElementNS("http://www.w3.org/2000/svg",t);for(var o in e)e.hasOwnProperty(o)&&r.setAttribute(o,e[o]);return r}this.clear();var n=i("svg",{viewBox:"0 0 "+String(o)+" "+String(o),width:"100%",height:"100%",fill:e.colorLight});n.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.appendChild(n),n.appendChild(i("rect",{fill:e.colorLight,width:"100%",height:"100%"})),n.appendChild(i("rect",{fill:e.colorDark,width:"1",height:"1",id:"template"}));for(var a=0;a'],s=0;s");for(var h=0;h');a.push("")}a.push(""),r.innerHTML=a.join("");var l=r.childNodes[0],u=(e.width-l.offsetWidth)/2,f=(e.height-l.offsetHeight)/2;u>0&&f>0&&(l.style.margin=f+"px "+u+"px")},t.prototype.clear=function(){this._el.innerHTML=""},t}():function(){function t(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}if(this._android&&this._android<=2.1){var e=1/window.devicePixelRatio,r=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(t,o,i,n,a,s,h,l,u){if("nodeName"in t&&/img/i.test(t.nodeName))for(var f=arguments.length-1;f>=1;f--)arguments[f]=arguments[f]*e;else void 0===l&&(arguments[1]*=e,arguments[2]*=e,arguments[3]*=e,arguments[4]*=e);r.apply(this,arguments)}}var o=function(t,e){this._bIsPainted=!1,this._android=C(),this._htOption=e,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=e.width,this._elCanvas.height=e.height,t.appendChild(this._elCanvas),this._el=t,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return o.prototype.draw=function(t){var e=this._elImage,r=this._oContext,o=this._htOption,i=t.getModuleCount(),n=o.width/i,a=o.height/i,s=Math.round(n),h=Math.round(a);e.style.display="none",this.clear();for(var l=0;lv.length)throw new Error("Too long data");return r}(QRCode=function(t,e){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:o.H},"string"==typeof e&&(e={text:e}),e)for(var r in e)this._htOption[r]=e[r];"string"==typeof t&&(t=document.getElementById(t)),this._htOption.useSVG&&(D=w),this._android=C(),this._el=t,this._oQRCode=null,this._oDrawing=new D(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)}).prototype.makeCode=function(t){this._oQRCode=new e(A(t,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(t),this._oQRCode.make(),this._el.title=t,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=o}(),"undefined"!=typeof module&&(module.exports=QRCode); + + +/*! jQuery UI - v1.13.2 - 2023-08-24 +* http://jqueryui.com +* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/datepicker.js, widgets/mouse.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(X){"use strict";X.ui=X.ui||{};X.ui.version="1.13.2";var n,i=0,r=Array.prototype.hasOwnProperty,a=Array.prototype.slice;X.cleanData=(n=X.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=X._data(i,"events"))&&e.remove&&X(i).triggerHandler("remove");n(t)}),X.widget=function(t,i,e){var s,n,o,r={},a=t.split(".")[0],l=a+"-"+(t=t.split(".")[1]);return e||(e=i,i=X.Widget),Array.isArray(e)&&(e=X.extend.apply(null,[{}].concat(e))),X.expr.pseudos[l.toLowerCase()]=function(t){return!!X.data(t,l)},X[a]=X[a]||{},s=X[a][t],n=X[a][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},X.extend(n,s,{version:e.version,_proto:X.extend({},e),_childConstructors:[]}),(o=new i).options=X.widget.extend({},o.options),X.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}r[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=X.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},r,{constructor:n,namespace:a,widgetName:t,widgetFullName:l}),s?(X.each(s._childConstructors,function(t,e){var i=e.prototype;X.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),X.widget.bridge(t,n),n},X.widget.extend=function(t){for(var e,i,s=a.call(arguments,1),n=0,o=s.length;n",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=X(e||this.defaultElement||this)[0],this.element=X(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=X(),this.hoverable=X(),this.focusable=X(),this.classesElementLookup={},e!==this&&(X.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=X(e.style?e.ownerDocument:e.document||e),this.window=X(this.document[0].defaultView||this.document[0].parentWindow)),this.options=X.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:X.noop,_create:X.noop,_init:X.noop,destroy:function(){var i=this;this._destroy(),X.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:X.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return X.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=X.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return X("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthk(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),r.offset(X.extend(h,{using:t}))})},X.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,r=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),X.ui.plugin={add:function(t,e,i){var s,n=X.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=X.ui.safeActiveElement(this.document[0]);X(t.target).closest(e).length||X.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),X.ui.ddmanager&&(X.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(r=i[3]+this.offset.click.top)),s.grid&&(t=s.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,r=!i||t-this.offset.click.top>=i[1]||t-this.offset.click.top>i[3]?t:t-this.offset.click.top>=i[1]?t-s.grid[1]:t+s.grid[1],t=s.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,o=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-s.grid[0]:t+s.grid[0]),"y"===s.axis&&(o=this.originalPageX),"x"===s.axis&&(r=this.originalPageY)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),X.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),X.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),X.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=X.extend({},t,{item:i.element});i.sortables=[],X(i.options.connectToSortable).each(function(){var t=X(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=X.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,X.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){X.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,X.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&X.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,X.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,X.each(n.sortables,function(){this.refreshPositions()}))})}}),X.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=X("body"),i=i.options;s.css("cursor")&&(i._cursor=s.css("cursor")),s.css("cursor",i.cursor)},stop:function(t,e,i){i=i.options;i._cursor&&X("body").css("cursor",i._cursor)}}),X.ui.plugin.add("draggable","opacity",{start:function(t,e,i){e=X(e.helper),i=i.options;e.css("opacity")&&(i._opacity=e.css("opacity")),e.css("opacity",i.opacity)},stop:function(t,e,i){i=i.options;i._opacity&&X(e.helper).css("opacity",i._opacity)}}),X.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],r=i.document[0];o!==r&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&X(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){X(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,r=this;if(this.handles=o.handles||(X(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=X(),this._addedHandles=X(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=X(this.handles[e]),this._on(this.handles[e],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=X(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=X(this.handles[e])[0])!==t.target&&!X.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=X(s.containment).scrollLeft()||0,i+=X(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=X(".ui-resizable-"+this.axis).css("cursor"),X("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),X.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(X.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),X("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=a-e.minWidth),s&&h&&(t.left=a-e.maxWidth),r&&i&&(t.top=l-e.minHeight),n&&i&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return X.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return X.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return X.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return X.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){X.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),X.ui.plugin.add("resizable","animate",{stop:function(e){var i=X(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,r=n?0:i.sizeDiff.width,n={width:i.size.width-r,height:i.size.height-o},r=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(X.extend(n,o&&r?{top:o,left:r}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&X(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),X.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=X(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,r=o instanceof X?o.get(0):/parent/.test(o)?e.parent().get(0):o;r&&(n.containerElement=X(r),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:X(document),left:0,top:0,width:X(document).width(),height:X(document).height()||document.body.parentNode.scrollHeight}):(i=X(r),s=[],X(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(r,"left")?r.scrollWidth:o,e=n._hasScroll(r)?r.scrollHeight:e,n.parentData={element:r,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=X(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,r={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(r=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-r.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-r.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-r.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=X(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=X(t.helper),r=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&X(this).css({left:r.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&X(this).css({left:r.left-s.left-i.left,width:a,height:o})}}),X.ui.plugin.add("resizable","alsoResize",{start:function(){var t=X(this).resizable("instance").options;X(t.alsoResize).each(function(){var t=X(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=X(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,r={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};X(s.alsoResize).each(function(){var t=X(this),s=X(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];X.each(e,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){X(this).removeData("ui-resizable-alsoresize")}}),X.ui.plugin.add("resizable","ghost",{start:function(){var t=X(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==X.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=X(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=X(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),X.ui.plugin.add("resizable","grid",{resize:function(){var t,e=X(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,r=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,h=a[1]||1,c=Math.round((s.width-n.width)/l)*l,p=Math.round((s.height-n.height)/h)*h,d=n.width+c,u=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>u;i.grid=a,m&&(d+=l),s&&(u+=h),f&&(d-=l),g&&(u-=h),/^(se|s|e)$/.test(r)?(e.size.width=d,e.size.height=u):/^(ne)$/.test(r)?(e.size.width=d,e.size.height=u,e.position.top=o.top-p):/^(sw)$/.test(r)?(e.size.width=d,e.size.height=u,e.position.left=o.left-c):((u-h<=0||d-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=X(this.element[0]).offset(),this.options.disabled||(this.selectees=X(t.filter,this.element[0]),this._trigger("start",i),X(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=X.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),X(i.target).parents().addBack().each(function(){var t,e=X.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,n=this,o=this.options,r=this.opos[0],a=this.opos[1],l=s.pageX,h=s.pageY;return ll||i.righth||i.bottomr&&i.righta&&i.bottom *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t*{ cursor: "+o.cursor+" !important; }").appendTo(n)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return X.ui.ddmanager&&(X.ui.ddmanager.current=this),X.ui.ddmanager&&!o.dropBehaviour&&X.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageYt[this.floating?"width":"height"]?h&&c:o",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===n?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),X("",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=X(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){X(" ",i.document[0]).attr("colspan",X(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,r,a,l,h,c=null,p=null,d=this.containers.length-1;0<=d;d--)X.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&X.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],p=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)X.contains(this.containers[p].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(r=this.items[e].item.offset()[n],a=!1,t[h]-r>this.items[e][o]/2&&(a=!0),Math.abs(t[h]-r)this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),e.grid&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0])),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i"))}function v(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){X(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&X(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&X(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,y)}function y(){X.datepicker._isDisabledDatepicker((m.inline?m.dpDiv.parent():m.input)[0])||(X(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),X(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&X(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&X(this).addClass("ui-datepicker-next-hover"))}function b(t,e){for(var i in X.extend(t,e),e)null==e[i]&&(t[i]=e[i]);return t}X.extend(X.ui,{datepicker:{version:"1.13.2"}}),X.extend(_.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return b(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s=t.nodeName.toLowerCase(),n="div"===s||"span"===s;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(i=this._newInst(X(t),n)).settings=X.extend({},e||{}),"input"===s?this._connectDatepicker(t,i):n&&this._inlineDatepicker(t,i)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?v(X("
")):this.dpDiv}},_connectDatepicker:function(t,e){var i=X(t);e.append=X([]),e.trigger=X([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),X.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s=this._get(e,"appendText"),n=this._get(e,"isRTL");e.append&&e.append.remove(),s&&(e.append=X("").addClass(this._appendClass).text(s),t[n?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(s=this._get(e,"buttonText"),i=this._get(e,"buttonImage"),this._get(e,"buttonImageOnly")?e.trigger=X("").addClass(this._triggerClass).attr({src:i,alt:s,title:s}):(e.trigger=X("`;a+=""}const n=await(0,i.A)({title:null,icon:null,uid:null,is_dir:!1,message:t.message,body_icon:t.body_icon,backdrop:t.backdrop??!1,is_resizable:!1,is_droppable:!1,has_head:!1,stay_on_top:t.stay_on_top??!1,selectable_body:!1,draggable_body:t.draggable_body??!0,allow_context_menu:!1,show_in_taskbar:!1,window_class:"window-alert",dominant:!0,body_content:a,width:350,parent_uuid:t.parent_uuid,...t.window_options,window_css:{height:"initial"},body_css:{width:"initial",padding:"20px","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});$(n).find(".button-primary").focus(),$(n).find(".alert-resp-button").on("click",(async function(t){return t.preventDefault(),t.stopPropagation(),e($(this).attr("data-value")),$(n).close(),!1}))}))}},453:(t,e,a)=>{"use strict";a.d(e,{A:()=>i}),window.select_ctxmenu_item=function(t){$(t).siblings(".context-menu-item").removeClass("context-menu-item-active"),$(t).addClass("context-menu-item-active")};const i=function t(e){$(".window-active .window-app-iframe").css("pointer-events","none");const a=global_element_id++;let i="";i+=`
`;for(let t=0;t
'):void 0===e.items[t].items?(i+=`
  • `,i+=`${e.items[t].icon??""}`,i+=`${e.items[t].icon_active??e.items[t].icon??""}`,i+=`${e.items[t].html}`,i+=`${e.items[t].html_active??e.items[t].html}`,i+="
  • "):(i+=`
  • `,i+=`${e.items[t].icon??""}`,i+=`${e.items[t].icon_active??e.items[t].icon??""}`,i+=`${html_encode(e.items[t].html)}`,i+=``,i+="
  • ");i+="
    ",$("body").append(i);const n=document.getElementById(`context-menu-${a}`),o=$(n).width(),s=$(n).outerHeight();let d,r,l,c;e.position?(d=e.position.left,r=e.position.top):isMobile.phone||isMobile.tablet?(d=window.last_touch_x,r=window.last_touch_y):(d=window.mouseX,r=window.mouseY),d+o>window.innerWidth?(l=d-o,e.parent_id&&(l-=$(`.context-menu[data-element-id="${e.parent_id}"]`).width()+30)):l=d,c=r+s>window.innerHeight-taskbar_height-10?window.innerHeight-s-taskbar_height-10:r,$(n).delay(100).show(0).css({top:c+"px",left:l+"px"}),$(".context-menu").not(n).removeClass("context-menu-active"),$(`#context-menu-${a} > li:not(.context-menu-item-disabled)`).on("click",(function(t){if(e.items[$(this).attr("data-action")].onClick&&"function"==typeof e.items[$(this).attr("data-action")].onClick){let a=t;a.value=e.items[$(this).attr("data-action")].val??void 0,e.items[$(this).attr("data-action")].onClick(a)}return $(this).hasClass("context-menu-item-submenu")||$(`#context-menu-${a}, .context-menu[data-element-id="${$(this).closest(".context-menu").attr("data-parent-id")}"]`).fadeOut(200,(function(){$(n).remove()})),!1})),$(n).find(".context-menu-item").on("mouseover",(function(t){$(n).find(".context-menu-item").removeClass("context-menu-item-active"),$(this).addClass("context-menu-item-active"),$(`.context-menu[data-parent-id="${a}"]`).remove(),$(n).addClass("context-menu-active")})),$(`#context-menu-${a} > li.context-menu-item-submenu`).on("mouseover",(function(i){if(0===$(`.context-menu[data-id="${a}-${$(this).attr("data-action")}"]`).length){let i=this.getBoundingClientRect();$(`.context-menu[parent-element-id="${a}"]`).remove(),t({items:e.items[parseInt($(this).attr("data-action"))].items,parent_id:a,is_submenu:!0,id:a+"-"+$(this).attr("data-action"),position:{top:i.top-5,left:l+i.width+15}})}return!1})),$(`#context-menu-${a} > li:not(.context-menu-item-disabled)`).on("mousedown",(function(t){return t.preventDefault(),t.stopPropagation(),!1})),e.parent_element&&($(e.parent_element).css("overflow","hidden"),$(e.parent_element).parent().addClass("children-have-open-contextmenu"),$(e.parent_element).addClass("has-open-contextmenu")),$(n).on("remove",(function(){e.parent_element&&($(e.parent_element).parent().removeClass("children-have-open-contextmenu"),$(e.parent_element).css("overflow","scroll"),$(e.parent_element).removeClass("has-open-contextmenu"),$(e.parent_element).hasClass("taskbar-item")&&make_taskbar_sortable())})),$(n).on("contextmenu",(function(t){return t.preventDefault(),t.stopPropagation(),!1}))}},124:(t,e,a)=>{"use strict";a.d(e,{A:()=>m});var i=a(93),n=a(795),o=a(17),s=a(8);var d=a(817),r=a(177),l=a(453),c=a(103),p=a(889);$("body").append(''),$(document).on("click",".item-has-website-url-badge",(async function(t){t.stopPropagation(),t.preventDefault();const e=$(this).closest(".item").attr("data-website_url");return e&&window.open(e,"_blank"),!1})),$(document).on("mousedown",".item-has-website-url-badge",(async function(t){return console.log("mousedown"),t.stopPropagation(),t.preventDefault(),!1})),$(document).on("contextmenu",".item-has-website-url-badge",(async function(t){t.stopPropagation(),t.preventDefault();const e=$(".context-menu");return e.fadeOut(200,(function(){e.remove()})),(0,l.A)({parent_element:this,items:[{html:`Open in New Tab `,html_active:`Open in New Tab `,onClick:function(){const e=$(t.target).closest(".item").attr("data-website_url");e&&window.open(e,"_blank")}},{html:"Copy Link",onClick:async function(){const e=$(t.target).closest(".item").attr("data-website_url");e&&await copy_to_clipboard(e)}}]}),!1})),$(document).on("click",".item-has-website-badge",(async function(t){puter.fs.stat({uid:$(this).closest(".item").attr("data-uid"),returnSubdomains:!0,returnPermissions:!1,returnVersions:!1,success:function(t){t.subdomains&&window.open(t.subdomains[0].address,"_blank")}})})),$(document).on("long-hover",".item-has-website-badge",(function(t){puter.fs.stat({uid:$(this).closest(".item").attr("data-uid"),returnSubdomains:!0,returnPermissions:!1,returnVersions:!1,success:function(e){var a=t.target.getBoundingClientRect(),i=document.body,n=document.documentElement,o=window.pageYOffset||n.scrollTop||i.scrollTop,d=window.pageXOffset||n.scrollLeft||i.scrollLeft,r=n.clientTop||i.clientTop||0,l=n.clientLeft||i.clientLeft||0,c=a.top+o-r,p=a.left+d-l;if(e.subdomains){let a='
    ",$(".website-badge-popover-content").closest(".popover").remove(),(0,s.A)({target:t.target,content:a,snapToElement:t.target,parent_element:t.target,top:c-30,left:p+20})}}})})),$(document).on("click",".website-badge-popover-link",(function(t){$(t.target).closest(".popover").remove()})),$.fn.removeItems=async function(t){return t=t||{},$(this).each((async function(){const t=$(this).closest(".item-container");$(this).remove(),show_or_hide_empty_folder_message(t)})),this},window.activate_item_name_editor=function(t){if("0"!==$(t).attr("data-immutable"))return;if(p.A.dirname($(t).attr("data-path"))===window.trash_path)return void(0,c.A)("This item can't be renamed because it's in the trash. To rename this item, first drag it out of the Trash.");const e=$(t).find(".item-name"),a=$(t).find(".item-name-editor").get(0);$(e).hide(),$(a).show(),$(a).focus(),$(a).addClass("item-name-editor-active");const i=$(t).attr("data-name"),n=parseInt($(t).attr("data-is_dir")),o=p.A.extname("/"+i);""===o||n?$(a).select():a.setSelectionRange(0,i.length-o.length)};const m=function t(e){const a=$(e.appendTo).length;if(a>1)return void $(e.appendTo).each((function(){const a=e;a.appendTo=this,t(a)}));if(0===a)return;const m=global_element_id++;let u=999999999999999,h=!1;e.disabled=e.disabled??!1,e.is_dir=e.is_dir??!1,e.is_selected=e.is_selected??!1,e.is_shared=e.is_shared??!1,e.is_shortcut=e.is_shortcut??0,e.is_trash=e.is_trash??!1,e.metadata=e.metadata??"",e.multiselectable=e.multiselectable??!0,e.shortcut_to=e.shortcut_to??"",e.shortcut_to_path=e.shortcut_to_path??"",e.immutable=!1===e.immutable||0===e.immutable||void 0===e.immutable?0:1,e.sort_container_after_append=void 0!==e.sort_container_after_append&&e.sort_container_after_append;const w=e.path!=="/"+window.user.username&&!e.path.startsWith("/"+window.user.username+"/");let g=determine_website_url(e.path);const f=$(e.appendTo).attr("data-allowed_file_types");window.check_fsentry_against_allowed_file_types_string({is_dir:e.is_dir,name:e.name,type:e.type},f)||(e.disabled=!0);let b="";b+=`
    `,b+='
    ',b+="
    ",b+='
    ',b+=`${0===e.modified?"-":timeago.format(1e3*e.modified)}`,b+="
    ",b+='
    ',b+=`${e.size?byte_format(e.size):"-"}`,b+="
    ",b+='
    ',e.is_dir?b+="Folder":b+=`${e.type?html_encode(e.type):"-"}`,b+="
    ",b+='
    ',b+=``,b+="
    ",b+='
    ',b+=``,b+=``,b+=``,b+=``,b+=``,b+="
    ",b+=`${html_encode(truncate_filename(e.name,TRUNCATE_LENGTH)).replaceAll(" "," ")}`,b+=``,b+="
    ",$(e.appendTo).append(b);const v=$(e.appendTo).closest(".item-container");show_or_hide_empty_folder_message(v);const y=document.getElementById(`item-${m}`),x=document.querySelector(`#item-${m} > .item-name`),k=document.querySelector(`#item-${m} .item-icon`),A=document.querySelector(`#item-${m} > .item-name-editor`),C=$(y).attr("data-path").startsWith(trash_path+"/");if(void 0!==e.appendTo){let t=e.appendTo;$(t).hasClass(".window")||(t=$(t).closest(".window")),update_explorer_footer_item_count(t)}let z,S;e.is_dir&&$(y).dragster({enter:function(){$(y).not(".item-disabled").addClass("item-selected")},leave:function(){$(y).removeClass("item-selected")},drop:function(t,e){const a=e.originalEvent;return $(y).removeClass("item-selected"),a.dataTransfer?.items?.length>0&&upload_items(a.dataTransfer.items,$(y).attr("data-path")),a.stopPropagation(),a.preventDefault(),!1}}),$(y).draggable({appendTo:"body",helper:"clone",revert:"invalid",zIndex:1e4,scroll:!1,distance:5,revertDuration:100,start:function(t,e){$(y).addClass("item-selected"),$(".ui-draggable-dragging").addClass("item-selected"),$(y).siblings(".item-selected").clone().addClass("item-selected-clone").css("position","absolute").appendTo("body").hide(),$(".item-selected-clone, .ui-draggable-dragging").css("z-index",99999);const a=$(".item-selected-clone").length;a>0&&$("body").append(`${a+1}`),$('.item[data-is_dir="0"][data-associated_app_name=""]:not(.item-selected)').droppable("disable"),$(".window-app-iframe").css("pointer-events","none"),z=null,S=null},drag:function(t,e){(Math.abs(e.originalPosition.top-e.offset.top)>5||Math.abs(e.originalPosition.left-e.offset.left)>5)&&($(".ui-draggable-dragging").show(),$(".item-selected-clone").show(),$(".draggable-count-badge").show());const a=$(".item-selected-clone"),i=a.length+1;$(".draggable-count-badge").css({top:t.pageY,left:t.pageX+10});for(let t=0;t{$(S).focusWindow()}),1200)),$(window.mouseover_item_container).closest(".window").is(window.mouseover_window)&&$(y).attr("data-path")!==$(window.mouseover_item_container).attr("data-path")&&$(y).attr("data-path")!==$(window.mouseover_item_container).attr("data-path")&&$(window.mouseover_item_container).addClass("item-container-active"),mouseover_window){const t=$(mouseover_window).find(".window-app-iframe");if(!$(mouseover_window).hasClass("window-disabled")&&t.length>0){var n=t.get(0).getBoundingClientRect();mouseX>n.left&&mouseXn.top&&mouseY{create_shortcut(p.A.basename($(t).attr("data-path")),"1"===$(t).attr("data-is_dir"),e.is_dir?$(y).attr("data-path"):p.A.dirname($(y).attr("data-path")),null,""===$(t).attr("data-shortcut_to")?$(t).attr("data-uid"):$(t).attr("data-shortcut_to"),""===$(t).attr("data-shortcut_to_path")?$(t).attr("data-path"):$(t).attr("data-shortcut_to_path"))})):e.is_dir&&move_items(i,""!==$(y).attr("data-shortcut_to_path")?$(y).attr("data-shortcut_to_path"):$(y).attr("data-path"));return $(".item-container").droppable("enable"),!1},over:function(t,a){const i=$(t.target).closest(".window");i.length>0&&i.attr("data-id")!==$(mouseover_window).attr("data-id")||$(a.draggable).hasClass("item")&&((e.is_dir||e.associated_app_name)&&($(y).addClass("item-selected"),$(".ui-draggable-dragging .item-name, .item-selected-clone .item-name").css("opacity",.1),$(".item-container").addClass("item-container-transparent-border")),$(".item-container").droppable("disable"))},out:function(t,a){$(a.draggable).hasClass("item")&&((e.is_dir||e.associated_app_name)&&($(y).removeClass("item-selected"),$(".ui-draggable-dragging .item-name, .item-selected-clone .item-name").css("opacity","initial"),$(".item-container").removeClass("item-container-transparent-border")),$(".item-container").droppable("enable"))}}),isMobile.phone||isMobile.tablet?$(y).on("click",(async function(t){return!$(y).hasClass("item-disabled")&&!$(t.target).hasClass("item-name-editor")&&void open_item({item:y,maximized:!0})})):$(y).on("dblclick",(async function(t){return!$(y).hasClass("item-disabled")&&!$(t.target).hasClass("item-name-editor")&&void open_item({item:y,new_window:t.metaKey||t.ctrlKey})})),$(y).on("mousedown",(function(t){if($(y).hasClass("item-disabled"))return!1;if($(t.target).hasClass("item-has-website-url-badge"))return!1;const e=$(y).closest(".window");if(3===t.which&&$(y).hasClass("item-selected")&&$(y).siblings(".item-selected").length>0)return $(".context-menu").remove(),!1;(!t.ctrlKey&&!t.metaKey&&!$(this).hasClass("item-selected")||e.length>0&&"true"!==e.attr("data-multiselectable"))&&$(this).closest(".item-container").find(".item-selected").removeClass("item-selected"),(t.ctrlKey||t.metaKey)&&$(this).hasClass("item-selected")?$(this).removeClass("item-selected"):$(this).addClass("item-selected"),update_explorer_footer_selected_items_count(e)})),$(y).on("click",(function(t){if($(y).hasClass("item-disabled"))return!1;T=!1;const a=$(y).closest(".window");t.ctrlKey||t.metaKey||($(this).closest(".item-container").find(".item-selected").not(this).removeClass("item-selected"),update_explorer_footer_selected_items_count(a)),"true"===a.attr("data-is_openFileDialog")&&(e.is_dir?a.find(".openfiledialog-open-btn").addClass("disabled"):a.find(".openfiledialog-open-btn").removeClass("disabled")),"true"!==a.attr("data-is_saveFileDialog")||e.is_dir||(a.find(".savefiledialog-filename").val($(y).attr("data-name")),a.find(".savefiledialog-save-btn").removeClass("disabled"))})),$(document).on("click",(function(t){$(t.target).hasClass("item")||$(t.target).hasClass("item-name")||$(t.target).hasClass("item-icon")||(T=!0),$(t.target).parents(".item").data("id")!==m&&(T=!0)})),$(A).on("keypress",(function(t){if($(A).is(":visible"))return 13===t.which?(t.stopPropagation(),t.preventDefault(),$(A).blur(),$(y).addClass("item-selected"),last_enter_pressed_to_rename_ts=Date.now(),update_explorer_footer_selected_items_count($(y).closest(".item-container")),!1):void 0})),$(A).on("keyup",(function(t){$(A).is(":visible")&&27===t.which&&(t.stopPropagation(),t.preventDefault(),h=!0,$(A).hide(),$(A).val(e.name),$(x).show())})),$(A).on("focusout",(function(t){t.stopPropagation(),t.preventDefault(),function(){if(h)return void(h=!1);const t=$(y).attr("data-name"),a=$(y).attr("data-path"),i=$(A).val();if(t===i||!i||"."===i||".."===i||!$(A).hasClass("item-name-editor-active"))return"."===i?(0,c.A)('The name "." is not allowed, because it is a reserved name. Please choose another name.'):".."===i&&(0,c.A)('The name ".." is not allowed, because it is a reserved name. Please choose another name.'),$(x).html(truncate_filename(e.name,TRUNCATE_LENGTH).replaceAll(" "," ")),$(x).show(),$(A).val($(y).attr("data-name")),void $(A).hide();$(A).removeClass("item-name-editor-active"),puter.fs.rename({uid:"null"===e.uid?null:e.uid,new_name:i,excludeSocketID:window.socket.id,success:async n=>{p.A.extname(t)!==p.A.extname(i)&&suggest_apps_for_fsentry({uid:e.uid,onSuccess:function(t){e.suggested_apps=t}}),$(`.item[data-uid='${$(y).attr("data-uid")}'] .item-name`).html(html_encode(truncate_filename(i,TRUNCATE_LENGTH)).replaceAll(" "," ")),$(x).show(),$(A).hide();const o=e.is_dir?window.icons["folder.svg"]:(await item_icon(n)).image;$(k).find(".item-icon-icon").attr("src",o),e.name=i,$(y).attr("data-name",html_encode(i)),$(`.item[data-uid='${$(y).attr("data-uid")}']`).attr("data-name",html_encode(i)),$(`.window-${e.uid}`).attr("data-name",html_encode(i)),$(`.item[data-uid='${$(y).attr("data-uid")}']`).attr("title",html_encode(i)),$(`.window-${e.uid}`).attr("title",html_encode(i)),$(`.item[data-uid='${$(y).attr("data-uid")}'] .item-name-editor`).val(html_encode(i)),$(`.item[data-uid='${$(y).attr("data-uid")}'] .item-name`).attr("title",html_encode(i)),e.path=p.A.join(p.A.dirname(e.path),e.name);const s=e.path;$(y).attr("data-path",s),$(`.item[data-uid='${$(y).attr("data-uid")}']`).attr("data-path",s),$(`.window-${e.uid}`).attr("data-path",s),$(`[data-path="${html_encode(a)}" i]`).each((function(){$(this).attr("data-path",s),$(this).hasClass("window-navbar-path-dirname")&&$(this).text(i)})),$(`[data-path^="${html_encode(a)+"/"}"]`).each((function(){const t=_.replace($(this).attr("data-path"),a+"/",s+"/");$(this).attr("data-path",t)})),"1"===$(y).attr("data-has_website")&&await update_sites_cache(),g=determine_website_url(s),$(y).attr("data-website_url",g),$(`.window-${e.uid}`).each((function(){update_window_path(this,e.path)})),$(`.window-${e.uid} .window-head-title`).text(i),$(`.item[data-uid='${$(y).attr("data-uid")}']`).parent(".item-container").each((function(){sort_items(this,$(y).closest(".item-container").attr("data-sort_by"),$(y).closest(".item-container").attr("data-sort_order"))}))},error:function(t){$(x).text(truncate_filename(e.name,TRUNCATE_LENGTH)),$(x).show(),$(A).hide(),$(A).val(html_encode($(y).attr("data-name"))),t.message&&(0,c.A)(t.message)}})}()}));let T=!0;$(x).on("click",(function(t){!T&&3!==t.which&&$(x).parent(".item-selected").length>0&&(u=Date.now(),setTimeout((()=>{!T&&Date.now()-u>400?(t.ctrlKey||t.metaKey||activate_item_name_editor(y),u=0):(u=Date.now()+500,T=!1)}),500)),T=!1})),$(x).on("dblclick",(function(t){T=!0})),$(y).bind("contextmenu taphold",(async function(t){if($(y).hasClass("item-disabled"))return!1;if($(t.target).hasClass("item-has-website-url-badge"))return!1;if("taphold"===t.type&&!isMobile.phone&&!isMobile.tablet)return;if(t.target===A)return;if(t.ctrlKey)return!1;let a;t.preventDefault();const m=$(y).closest(".item-container").find(".item-selected").not(y).addBack();if(m.length>1){const t=m.attr("data-path").startsWith(trash_path+"/");a=[],t&&(a.push({html:"Restore",onClick:function(){m.each((function(){const t=this;let e=""===$(t).attr("data-metadata")?{}:JSON.parse($(t).attr("data-metadata"));move_items([t],p.A.dirname(e.original_path))}))}}),a.push("-")),t||(a.push({html:"Download",onClick:async function(){let t=[];for(let e=0;e img").attr("src",window.icons["trash.svg"]),$(`.window[data-path="${html_encode(trash_path)}"]`).find(".window-head-icon").attr("src",window.icons["trash.svg"]))}}}),!t&&window.feature_flags.create_shortcut&&a.push({html:"Create Shortcut",onClick:async function(){m.each((function(){let t=p.A.dirname($(this).attr("data-path"));$(this).attr("data-path")&&$(this).closest(".item-container").attr("data-path")===window.desktop_path&&(t=window.desktop_path),create_shortcut(p.A.basename($(this).attr("data-path")),"1"===$(this).attr("data-is_dir"),t,$(this).closest(".item-container"),""===$(this).attr("data-shortcut_to")?$(this).attr("data-uid"):$(this).attr("data-shortcut_to"),""===$(this).attr("data-shortcut_to_path")?$(this).attr("data-path"):$(this).attr("data-shortcut_to_path"))}))}}),t||a.push({html:"Delete",onClick:async function(){move_items(m,trash_path)}})}else{const t=$(y).attr("data-path")===trash_path||$(y).attr("data-shortcut_to_path")===trash_path;if(a=[],C||(a.push({html:"Open",onClick:function(){open_item({item:y})}}),(e.associated_app_name||t)&&a.push("-")),!(C||t||null!==e.associated_app_name&&void 0!==e.associated_app_name)){let t=[];if(!e.suggested_apps||0===e.suggested_apps.length){const t=await suggest_apps_for_fsentry({uid:e.uid,path:e.path});t&&t.length>0&&(e.suggested_apps=t)}if(e.suggested_apps&&e.suggested_apps.length>0)for(let a=0;a`,onClick:async function(){launch_app({name:i.name,file_path:$(y).attr("data-path"),window_title:$(y).attr("data-name"),file_uid:$(y).attr("data-uid")})}}):console.warn("suggested_app is null",e.suggested_apps,a)}else t.push({html:"No suitable apps found",disabled:!0});a.push({html:"Open With",items:t}),a.push("-")}$(y).closest(".window-body").length>0&&e.is_dir&&(a.push({html:"Open in New Window",onClick:function(){e.is_dir&&open_item({item:y,new_window:!0})}}),t||C||!e.is_dir||a.push("-")),C||t||!e.is_dir||a.push({html:"Publish As Website",disabled:!e.is_dir,onClick:async function(){if(window.require_email_verification_to_publish_website){if(window.user.is_temp&&!await(0,d.A)({send_confirmation_code:!0,message:"Please create an account to proceed.",window_options:{backdrop:!0,close_on_backdrop_click:!1}}))return;if(!window.user.email_confirmed&&!await(0,r.A)())return}(0,i.A)(e.uid,$(y).attr("data-name"),$(y).attr("data-path"))}}),C||t||!e.is_dir||(a.push({html:"Deploy As App",disabled:!e.is_dir,onClick:async function(){launch_app({name:"dev-center",file_path:$(y).attr("data-path"),file_uid:$(y).attr("data-uid"),params:{source_path:e.path}})}}),a.push("-")),t&&a.push({html:"Empty Trash",onClick:async function(){empty_trash()}}),t||C||null!==e.associated_app_name&&void 0!==e.associated_app_name||a.push({html:"Download",disabled:e.is_dir&&!window.feature_flags.download_directory,onClick:async function(){e.is_dir?zipItems(y,p.A.dirname($(y).attr("data-path")),!0):trigger_download([e.path])}}),C||t||null!==e.associated_app_name&&void 0!==e.associated_app_name||a.push({html:"Get Copy Link",onClick:async function(){window.user.is_temp&&!await(0,d.A)({message:"Please create an account to proceed.",send_confirmation_code:!0,window_options:{backdrop:!0,close_on_backdrop_click:!1}})||(window.user.email_confirmed||await(0,r.A)())&&async function(t){let e="",a="Copy Link";const i=await puter.fs.sign(null,{uid:t.uid,action:"read"}),n=`${gui_origin}/?name=${encodeURIComponent(t.name)}&is_dir=${encodeURIComponent(t.is_dir)}&download=${encodeURIComponent(i.items.read_url)}`;e+="
    ",e+=`

    Share the following link with anyone and they will be able to receive a copy of ${html_encode(t.name)}

    `,e+='',e+=``,e+=``,e+="
    ";const d=await(0,o.A)({title:"Get Copy Link",icon:null,uid:null,is_dir:!1,body_content:e,draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!0,allow_user_select:!0,onAppend:function(t){},width:500,dominant:!0,window_css:{height:"initial"},body_css:{padding:"10px",width:"initial","max-height":"calc(100vh - 200px)","background-color":"rgb(241 246 251)","backdrop-filter":"blur(3px)",padding:"10px 20px 20px 20px",height:"initial"}});$(d).find(".window-body .downloadable-link").val(n),$(d).find(".window-body .share-copy-link-on-social").on("click",(function(e){const a=socialLink({url:n,title:`Get a copy of '${t.name}' on Puter.com!`,description:`Get a copy of '${t.name}' on Puter.com!`});let i="";i+='
    ',i+='

    Share to

    ',i+=``,i+=``,i+=``,i+=``,i+=``,i+=``,i+="
    ",(0,s.A)({content:i,snapToElement:this,parent_element:this,height:100,position:"bottom"})})),$(d).find(".window-body .copy-downloadable-link").on("click",(async function(t){var e=this;if(navigator.clipboard){const t=$(d).find(".window-body .downloadable-link").val();await navigator.clipboard.writeText(t)}else $(d).find(".window-body .downloadable-link").select(),document.execCommand("copy");$(this).html("Copied!"),setTimeout((function(){$(e).html(a)}),1e3)}))}({name:$(y).attr("data-name"),uid:$(y).attr("data-uid"),path:$(y).attr("data-path"),is_dir:e.is_dir})}}),t||C||$(y).attr("data-path").endsWith(".zip")||a.push({html:"Zip",onClick:function(){zipItems(y,p.A.dirname($(y).attr("data-path")),!1)}}),t||C||!$(y).attr("data-path").endsWith(".zip")||a.push({html:"Unzip",onClick:async function(){const t=new JSZip;let e=$(y).attr("data-path"),a=puter.fs.read($(y).attr("data-path"));t.loadAsync(a).then((async function(t){const a=await puter.fs.mkdir(p.A.dirname(e)+"/"+p.A.basename(e,".zip"),{dedupeName:!0});Object.keys(t.files).forEach((async function(e){e.endsWith("/")&&await puter.fs.mkdir(a.path+"/"+e,{createMissingParents:!0}),t.files[e].async("blob").then((async function(t){await puter.fs.write(a.path+"/"+e,t)})).catch((function(t){}))}))})).catch((function(t){}))}}),C&&a.push({html:"Restore",onClick:async function(){let t=""===$(y).attr("data-metadata")?{}:JSON.parse($(y).attr("data-metadata"));move_items([y],p.A.dirname(t.original_path))}}),t||null!==e.associated_app_name&&void 0!==e.associated_app_name||a.push("-"),"0"===$(y).attr("data-immutable")&&a.push({html:"Cut",onClick:function(){window.clipboard_op="move",window.clipboard=[e.path]}}),C||t||a.push({html:"Copy",onClick:function(){window.clipboard_op="copy",window.clipboard=[{path:e.path}]}}),"1"!==$(y).attr("data-is_dir")||C||t||a.push({html:"Paste Into Folder",disabled:!(clipboard.length>0),onClick:function(){"copy"===clipboard_op?copy_clipboard_items($(y).attr("data-path"),null):"move"===clipboard_op&&move_clipboard_items(null,$(y).attr("data-path"))}}),"0"!==$(y).attr("data-immutable")||t||a.push("-"),!C&&window.feature_flags.create_shortcut&&a.push({html:"Create Shortcut",onClick:async function(){let t=p.A.dirname($(y).attr("data-path"));$(y).attr("data-path")&&$(y).closest(".item-container").attr("data-path")===window.desktop_path&&(t=window.desktop_path),create_shortcut(p.A.basename($(y).attr("data-path")),e.is_dir,t,e.appendTo,""===e.shortcut_to?e.uid:e.shortcut_to,""===e.shortcut_to_path?e.path:e.shortcut_to_path)}}),"0"!==$(y).attr("data-immutable")||C||a.push({html:"Delete",onClick:async function(){move_items([y],trash_path)}}),C&&a.push({html:"Delete Permanently",onClick:async function(){if("Delete"===await(0,c.A)({message:"Are you sure you want to permanently delete this item?",buttons:[{label:"Delete",type:"primary"},{label:"Cancel"}]})){await delete_item(y);const t=await puter.fs.stat(trash_path);window.socket&&window.socket.emit("trash.is_empty",{is_empty:t.is_empty}),t.is_empty&&($(`.item[data-path="${html_encode(trash_path)}" i], .item[data-shortcut_to_path="${html_encode(trash_path)}" i]`).find(".item-icon > img").attr("src",window.icons["trash.svg"]),$(`.window[data-path="${trash_path}"]`).find(".window-head-icon").attr("src",window.icons["trash.svg"]))}}}),"0"!==$(y).attr("data-immutable")||C||t||a.push({html:"Rename",onClick:function(){activate_item_name_editor(y)}}),a.push("-"),a.push({html:"Properties",onClick:function(){let t=$(y).position().left+$(y).width();t=t>window.innerWidth-450?window.innerWidth-450:t;let e=$(y).position().top+$(y).height();e=e>window.innerHeight-(500+window.taskbar_height+window.toolbar_height)?window.innerHeight-(500+window.taskbar_height+window.toolbar_height):e,(0,n.A)($(y).attr("data-name"),$(y).attr("data-path"),$(y).attr("data-uid"),t,e,450,500)}})}return(0,l.A)({parent_element:$(e.appendTo).hasClass("desktop")?void 0:e.appendTo,items:a}),!1})),$(A).on("input keypress focus",(function(){const t=$(A).val();if($(".item-name-shadow").html(html_encode(t).replaceAll(" "," ")),""!==t){const t=$(".item-name-shadow").width(),e=$(".item-name-shadow").height();$(A).width(t+4),$(A).height(e+2)}})),e.sort_container_after_append&&sort_items(e.appendTo,$(y).closest(".item-container").attr("data-sort_by"),$(y).closest(".item-container").attr("data-sort_order")),e.editable&&activate_item_name_editor(y)}},8:(t,e,a)=>{"use strict";a.d(e,{A:()=>i});const i=function(t){if(t.parent_element&&$(t.parent_element).hasClass("has-open-popover"))return;$(".window-active .window-app-iframe").css("pointer-events","none"),global_element_id++,t.content=t.content??"";let e="";e+=`
    `,e+=t.content,e+="
    ",$("body").append(e);const a=document.getElementById(`popover-${global_element_id}`);let i,n;function o(){const e=t.width??$(a).width();i=t.center_horizontally?window.innerWidth/2-e/2-15:"bottom"===t.position||"top"===t.position?t.left??$(t.snapToElement).offset().left-e/2+10:t.left??$(t.snapToElement).offset().left+5;const o=t.height??$(a).height();n=t.center_horizontally?t.top??window.innerHeight-(taskbar_height+o+10):t.top??$(t.snapToElement).offset().top+$(t.snapToElement).height()+5,$(a).css({left:i+"px",top:n+"px"})}return $(a).show(0,(function(e){t.onAppend&&"function"==typeof t.onAppend&&t.onAppend(a)})),t.parent_element&&$(t.parent_element).addClass("has-open-popover"),$(a).on("remove",(function(){t.parent_element&&$(t.parent_element).removeClass("has-open-popover")})),o(),$(window).on("resize",(function(){o()})),$(a).delay(100).show(0).css({left:i+"px",top:n+"px"}),a}},404:(t,e,a)=>{"use strict";a.d(e,{A:()=>o});var i=a(453);let n=1;const o=function(t){let e="";n++,t.sortable=t.sortable??!0,t.open_windows_count=t.open_windows_count??0,t.lock_keep_in_taskbar=t.lock_keep_in_taskbar??!1,t.append_to_taskbar=t.append_to_taskbar??!0;const a=global_element_id++;e+=`
    `;let o=t.icon?t.icon:window.icons["app.svg"];"explorer"===t.app&&(o=window.icons["folders.svg"]),e+='
    ',e+=``,e+="
    ","apps"!==t.app&&(e+=''),e+="
    ",t.append_to_taskbar?$(".taskbar").append(e):$("body").prepend(e);const s=document.querySelector(`#taskbar-item-${n}`);return $(s).show(50),$(s).on("click",(function(){$(s).hasClass("has-open-contextmenu")||void 0!==t.onClick&&!1!==t.onClick(s)||$(`.window[data-app="${t.app}"]`).showWindow()})),$(s).on("contextmenu taphold",(function(e){if(t.sortable&&$(".taskbar").sortable("destroy"),e.preventDefault(),e.stopPropagation(),t.disable_context_menu)return;if($(s).hasClass("has-open-contextmenu"))return;const a=[],n=parseInt($(s).attr("data-open-windows"));$(`.window[data-app="${t.app}"]`).each((function(){a.push({html:$(this).find(".window-head-title").html(),val:$(this).attr("data-id"),onClick:function(t){$(`.window[data-id="${t.value}"]`).showWindow()}})})),a.length>0&&a.push("-"),t.app&&a.push({html:"New Window",val:$(this).attr("data-id"),onClick:function(){launch_app({name:t.app,maximized:isMobile.phone||isMobile.tablet})}}),"trash"===t.app&&"Trash"===t.name&&(a.push("-"),a.push({html:"Empty Trash",val:$(this).attr("data-id"),onClick:async function(){empty_trash()}})),t.keep_in_taskbar&&!t.lock_keep_in_taskbar?a.push({html:"Remove from Taskbar",val:$(this).attr("data-id"),onClick:function(){$(s).attr("data-keep-in-taskbar","false"),"0"===$(s).attr("data-open-windows")&&remove_taskbar_item(s),update_taskbar(),t.keep_in_taskbar=!1}}):t.keep_in_taskbar||a.push({html:"Keep in Taskbar",val:$(this).attr("data-id"),onClick:function(){$(s).attr("data-keep-in-taskbar","true"),update_taskbar(),t.keep_in_taskbar=!0}}),n>0&&(a.push("-"),a.push({html:"Show All Windows",onClick:function(){n>0&&$(s).trigger("click")}}),a.push({html:"Hide All Windows",onClick:function(){n>0&&$(`.window[data-app="${t.app}"]`).hideWindow()}}),a.push({html:"Close All Windows",onClick:function(){$(`.window[data-app="${t.app}"]`).close()}}));const o=s.getBoundingClientRect();return(0,i.A)({parent_element:s,position:{top:o.top-15,left:o.left+5},items:a}),!1})),$(s).tooltip({items:".taskbar:not(.children-have-open-contextmenu) .taskbar-item",position:{my:"center bottom-20",at:"center top",using:function(t,e){$(this).css(t),$("
    ").addClass("arrow").addClass(e.vertical).addClass(e.horizontal).appendTo(this)}}}),$(s).droppable({accept:".item",tolerance:"pointer",drop:async function(e,a){if($(e.target).closest(".window").attr("data-id")!==$(mouseover_window).attr("data-id"))return;if(e.ctrlKey&&path.dirname($(a.draggable).attr("data-path"))===window.trash_path)return;const i=[];i.push(a.draggable);const n=document.getElementsByClassName("item-selected-clone");for(let t=0;t0&&i.attr("data-id")!==$(mouseover_window).attr("data-id")||$(a.draggable).hasClass("item")&&((t.is_dir||t.app)&&($(s).addClass("active"),$(s).tooltip().mouseover(),$(".ui-draggable-dragging .item-name, .item-selected-clone .item-name").css("opacity",.1),$(".item-container").addClass("item-container-transparent-border")),$(".item-container").droppable("disable"))},out:function(e,a){$(a.draggable).hasClass("item")&&((t.is_dir||t.app)&&($(s).removeClass("active"),$(s).tooltip("close"),$(".ui-draggable-dragging .item-name, .item-selected-clone .item-name").css("opacity","initial"),$(".item-container").removeClass("item-container-transparent-border")),$(".item-container").droppable("enable"))}}),s}},17:(t,e,a)=>{"use strict";a.d(e,{A:()=>u});var i=a(103),n=a(453),o=a(889),s=a(404),d=a(146),r=a(93),l=a(795);const c=document.getElementsByTagName("body")[0];async function p(t){const e=global_element_id++;last_window_zindex++,t.dominant=t.dominant??!1,(t.is_openFileDialog||t.is_saveFileDialog||t.is_directoryPicker)&&(t.dominant=!0),t.dominant||window.window_counter++,window_stack.push(e);let a=!1;const m="calc(15% + "+(window.window_counter-1)%10*20+"px)";if(t.allowed_file_types=t.allowed_file_types??"",t.app=t.app??"",t.allow_context_menu=t.allow_context_menu??!0,t.allow_native_ctxmenu=t.allow_native_ctxmenu??!1,t.allow_user_select=t.allow_user_select??!1,t.backdrop=t.backdrop??!1,t.body_css=t.body_css??{},t.border_radius=t.border_radius??void 0,t.draggable_body=t.draggable_body??!1,t.element_uuid=t.element_uuid??uuidv4(),t.center=t.center??!1,t.close_on_backdrop_click=t.close_on_backdrop_click??!0,t.disable_parent_window=t.disable_parent_window??!1,t.has_head=t.has_head??!0,t.height=t.height??380,t.icon=t.icon??null,t.iframe_msg_uid=t.iframe_msg_uid??null,t.is_droppable=t.is_droppable??!0,t.is_draggable=t.is_draggable??!0,t.is_dir=t.is_dir??!1,t.is_minimized=t.is_minimized??!1,t.is_maximized=t.is_maximized??!1,t.is_openFileDialog=t.is_openFileDialog??!1,t.is_resizable=t.is_resizable??!0,t.is_fullpage&&(t.is_resizable=!1),!is_embedded&&!window.is_fullpage_mode||t.parent_uuid||!1===t.stay_on_top||(t.stay_on_top=!0),t.stay_on_top=t.stay_on_top??!1,t.is_saveFileDialog=t.is_saveFileDialog??!1,t.show_minimize_button=t.show_minimize_button??!0,t.on_close=t.on_close??void 0,t.parent_uuid=t.parent_uuid??null,t.selectable_body=t.selectable_body??!0,t.show_in_taskbar=t.show_in_taskbar??!0,t.show_maximize_button=t.show_maximize_button??!0,t.single_instance=t.single_instance??!1,t.sort_by=t.sort_by??"name",t.sort_order=t.sort_order??"asc",t.title=t.title??null,t.top=t.top??m,t.type=t.type??null,t.update_window_url=t.update_window_url??!1,t.layout=t.layout??"icons",t.width=t.width??680,t.window_css=t.window_css??{},t.window_class=void 0!==t.window_class?" "+t.window_class:"",t.single_instance&&""!==t.app&&$(`.window[data-app="${html_encode(t.app)}"]`).length)return void $(`.window[data-app="${html_encode(t.app)}"]`).focusWindow();t.dominant||t.center?!t.dominant&&t.center?t.left=t.left??window.innerWidth/2-t.width/2+"px":t.dominant?t.left=window.innerWidth/2-t.width/2+"px":t.left=t.left??window.innerWidth/2-t.width/2+"px":t.left=t.left??window.innerWidth/2-t.width/2+(window.window_counter-1)%10*30+"px",t.dominant||t.center?!t.dominant&&t.center?t.top=t.top??window.innerHeight/2-t.height/2+"px":t.dominant?t.top=.15*window.innerHeight:isMobile.phone&&(t.top=100):t.top=t.top??window.innerHeight/2-t.height/2+(window.window_counter-1)%10*30+"px",isMobile.phone?(t.left=0,t.top=window.toolbar_height+"px",t.width="100%",t.height="calc(100% - "+window.toolbar_height+"px)"):(t.width+="px",t.height+="px"),t.cover_page&&(t.left=0,t.top=0,t.width="100%",t.height="100%");let u="",h=t.stay_on_top?99999999+last_window_zindex+1+" !important":last_window_zindex;if(u+=`
    `,u+='
    ',u+='
    BUSY
    ',u+="
    ",t.has_head&&(u+='
    ',u+='
    ',t.icon&&(u+=''),u+=``,u+="
    ",t.is_resizable&&t.show_minimize_button&&!is_embedded&&(u+=``),t.is_resizable&&t.show_maximize_button&&(u+=``),u+=``,u+="
    "),t.is_dir&&!isMobile.phone&&(u+=`
    `,u+='

    Favorites

    ',u+=`
    Home
    `,u+=`
    Documents
    `,u+=`
    Pictures
    `,u+=`
    Desktop
    `,u+=`
    Videos
    `,u+="
    "),t.is_dir&&(u+='
    ',u+='
    ',u+=``,u+=``,u+=``,u+="
    ",u+=`
    ${navbar_path(t.path,window.user.username)}
    `,u+=``,u+=``,u+="
    "),u+=`
    `,t.iframe_url||t.iframe_srcdoc?u+=``:void 0!==t.body_content&&(u+=t.body_content),t.is_dir&&(u+=window.explore_table_headers(),u+='
    This folder is empty
    ',u+='
    ',u+='circle anim',u+='

    Loading...

    ',u+="
    "),u+="
    ",!t.is_dir||t.is_saveFileDialog||t.is_openFileDialog||t.is_directoryPicker||(u+='"),t.is_saveFileDialog?(u+='
    ',u+='
    ',u+=``,u+='',u+='`,d+="",d+='
    ',d+='Re-send Confirmation Code',t.logout_in_footer&&(d+=" • ",d+='Log Out'),d+="
    ",d+="
    ";const r=await(0,i.A)({title:null,backdrop:t.backdrop??!1,icon:null,uid:null,is_dir:!1,body_content:d,draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_draggable:t.is_draggable??!0,is_droppable:!1,is_resizable:!1,stay_on_top:t.stay_on_top??!1,allow_native_ctxmenu:!0,allow_user_select:!0,backdrop:!0,width:390,dominant:!0,onAppend:function(t){$(t).find(".digit-input").first().focus()},window_class:"window-item-properties",window_css:{height:"initial"},body_css:{padding:"30px",width:"initial",height:"initial","background-color":"rgb(247 251 255)","backdrop-filter":"blur(3px)"}});$(r).find(".digit-input").first().focus(),$(r).find(".email-confirm-btn").on("click submit",(function(t){t.preventDefault(),t.stopPropagation(),$(r).find(".email-confirm-btn").prop("disabled",!0),$(r).find(".error").hide(),o||(o=!0,$(r).find(".email-confirm-btn").html('circle anim'),setTimeout((()=>{$.ajax({url:api_origin+"/confirm-email",type:"POST",data:JSON.stringify({code:a}),async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:function(t){t.email_confirmed?($(r).close(),refresh_user_data(window.auth_token),e(!0)):($(r).find(".error").html("Invalid confirmation code."),$(r).find(".error").fadeIn(),$(r).find(".digit-input").val(""),$(r).find(".digit-input").first().focus(),$(r).find(".email-confirm-btn").prop("disabled",!1),$(r).find(".email-confirm-btn").html(s))},error:function(t){$(r).find(".error").html(t.responseJSON.error),$(r).find(".error").fadeIn(),$(r).find(".digit-input").val(""),$(r).find(".digit-input").first().focus(),$(r).find(".email-confirm-btn").prop("disabled",!1),$(r).find(".email-confirm-btn").html(s)},complete:function(){o=!1}})}),1e3))})),$(r).find(".send-conf-email").on("click",(function(t){$.ajax({url:api_origin+"/send-confirm-email",type:"POST",async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:async function(t){await(0,n.A)({message:`A new confirmation code has been sent to ${window.user.email}.`,body_icon:window.icons["c-check.svg"],stay_on_top:!0,backdrop:!0}),$(r).find(".digit-input").first().focus()},complete:function(){}})})),$(r).find(".conf-email-log-out").on("click",(function(t){logout(),$(r).close()}));const l=document.querySelector("[data-number-code-form]"),c=[...l.querySelectorAll("[data-number-code-input]")];l.addEventListener("input",(({target:t})=>{if(!t.value.length)return t.value=null;const e=t.value.length;let i=Number(t.dataset.numberCodeInput);if(2===e){const e=t.value.split("");t.value=e[0]}else if(e>1){const e=t.value.split("");e.forEach(((t,e)=>{const a=i+e;a>=c.length||(c[a].value=t)})),i+=e.length-2}const n=i+1;n{const{code:e,target:a}=t,i=Number(a.dataset.numberCodeInput),n=i-1,o=i+1,s=n>=0,d=o<=c.length-1;switch(e){case"ArrowLeft":case"ArrowUp":s&&c[n].focus(),t.preventDefault();break;case"ArrowRight":case"ArrowDown":d&&c[o].focus(),t.preventDefault();break;case"Backspace":!t.target.value.length&&s&&(c[n].value=null,c[n].focus())}}))}))}},795:(t,e,a)=>{"use strict";a.d(e,{A:()=>n});var i=a(17);const n=async function(t,e,a,n,o,s,d){let r="";r+='
    ',r+='
    ',r+='
    General
    ',r+='
    Versions
    ',r+="
    ",r+='
    ',r+='',r+='',r+='',r+='',r+='',r+='',r+='',r+='',r+='',r+='',r+='',r+='',r+='",r+='',r+="
    Name
    Path
    Original Name
    Original Path
    Shortcut to
    UID
    Type
    Size
    Modified
    Created
    Versions
    Associated Websites',r+="
    Access Granted To
    ",r+="
    ",r+='
    ',r+='
    ',r+="
    ",r+="
    ",r+="
    ";const l=await(0,i.A)({title:`${t} properties`,app:a+"-account",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:'
    General
    Versions
    Name
    Path
    Original Name
    Original Path
    Shortcut to
    UID
    Type
    Size
    Modified
    Created
    Versions
    Associated Websites
    Access Granted To
    ',draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!0,allow_user_select:!0,left:n,top:o,width:s,height:d,onAppend:function(t){},width:450,window_class:"window-item-properties",window_css:{},body_css:{padding:"10px",width:"initial",height:"calc(100% - 50px)","background-color":"rgb(241 242 246)","backdrop-filter":"blur(3px)","content-box":"content-box"}});$(l).find(".item-props-tab-btn").click((function(t){$(l).find(".item-props-tab-btn").removeClass("item-props-tab-selected"),$(this).addClass("item-props-tab-selected"),$(l).find(".item-props-tab-content").removeClass("item-props-tab-content-selected"),$(l).find(`.item-props-tab-content[data-tab="${$(this).attr("data-tab")}"]`).addClass("item-props-tab-content-selected")})),puter.fs.stat({uid:a,returnSubdomains:!0,returnPermissions:!0,returnVersions:!0,returnSize:!0,success:function(t){if(t.is_dir&&$(l).find('[data-tab="versions"]').hide(),$(l).find(".item-prop-val-name").html(t.name),$(l).find(".item-prop-val-path").html(e),t.metadata)try{let e=JSON.parse(t.metadata);e.original_name&&($(l).find(".item-prop-val-original-name").html(e.original_name),$(l).find(".item-prop-original-name").show()),e.original_path&&($(l).find(".item-prop-val-original-path").html(e.original_path),$(l).find(".item-prop-original-path").show())}catch(t){}t.shortcut_to&&t.shortcut_to_path&&$(l).find(".item-prop-val-shortcut-to").html(t.shortcut_to_path),$(l).find(".item-prop-val-uid").html(t.id),$(l).find(".item-prop-val-type").html(t.is_dir?"Directory":null===t.type?"-":t.type),$(l).find(".item-prop-val-size").html(null===t.size||void 0===t.size?"-":byte_format(t.size)),$(l).find(".item-prop-val-modified").html(0===t.modified?"-":timeago.format(1e3*t.modified)),$(l).find(".item-prop-val-created").html(0===t.created?"-":timeago.format(1e3*t.created)),t.subdomains&&t.subdomains.length>0?t.subdomains.forEach((t=>{$(l).find(".item-prop-val-websites").append(`

    ${t.address} (disassociate)

    `)})):$(l).find(".item-prop-val-websites").append("-"),t.versions&&t.versions.length>0?t.versions.reverse().forEach((t=>{$(l).find(".item-props-version-list").append(`
    ${t.user?t.user.username:""} • ${timeago.format(1e3*t.timestamp)}

    ${t.id}

    `)})):$(l).find(".item-props-version-list").append("-"),$(l).find(".item-prop-val-permissions").append(`

    ${void 0===t.owner.email||null===t.owner.email?t.owner.username:t.owner.email} (owner)

    `),t.permissions&&t.permissions.length>0?t.permissions.forEach((t=>{let e="";e+=`

    ${t.email??t.username} `,e+=`(remove)`,$(l).find(".item-prop-val-permissions").append(e)})):$(l).find(".item-prop-val-permissions").append("-"),$(l).find(".disassociate-website-link").on("click",(function(t){puter.hosting.update($(t.target).attr("data-subdomain"),null).then((()=>{$(l).find(`.item-prop-website-entry[data-uuid="${$(t.target).attr("data-uuid")}"]`).remove(),0===$(l).find(".item-prop-website-entry").length&&($(l).find(".item-prop-val-websites").html("-"),$(`.item[data-uid="${a}"]`).find(".item-has-website-badge").fadeOut(200))}))})),$(l).find(".remove-permission-link").on("click",(function(t){const i=$(this).attr("data-perm-uid");$.ajax({url:api_origin+"/remove-perm",type:"POST",async:!0,contentType:"application/json",data:JSON.stringify({uid:i}),headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:async function(t){$(l).find(`.item-prop-perm-entry[data-perm-uid="${i}"]`).remove(),0===$(l).find(".item-prop-perm-entry").length&&($(l).find(".item-prop-val-permissions").html("-"),$(`.item[data-uid="${a}"]`).find(".item-is-shared").fadeOut(200),$(`.item[data-path^="${e}/"]`).find(".item-is-shared").fadeOut(200))},complete:function(){}})}))}})}},146:(t,e,a)=>{"use strict";a.d(e,{A:()=>s});var i=a(17),n=a(585),o=a(103);const s=async function(t){return(t=t??{}).reload_on_success=t.reload_on_success??!1,t.has_head=t.has_head??!0,t.send_confirmation_code=t.send_confirmation_code??!1,new Promise((async e=>{const a=window.uuidv4();let s="";s+='

    ',t.has_head||!1===t.show_close_button||(s+='
    ×
    '),s+='
    ',s+='

    Log In

    ',s+='",s+="
    ",(void 0===t.show_signup_button||t.show_signup_button)&&(s+='
    ',s+='',s+="
    "),s+="
    ";const d=await(0,i.A)({title:null,app:"login",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:s,draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_draggable:t.is_draggable??!0,is_droppable:!1,is_resizable:!1,stay_on_top:!1,allow_native_ctxmenu:!0,allow_user_select:!0,...t.window_options,width:350,dominant:!0,on_close:()=>{e(!1)},onAppend:function(t){$(t).find(".email_or_username").get(0).focus({preventScroll:!0})},window_class:"window-login",window_css:{height:"initial"},body_css:{width:"initial",padding:"0","background-color":"rgb(255 255 255)","backdrop-filter":"blur(3px)",display:"flex","flex-direction":"column","justify-content":"center","align-items":"center"}});$(d).find(".forgot-password-link").on("click",(function(t){!function(t){new Promise((async e=>{t=t??{};let a="";a+='
    ',a+='

    Recover Password

    ',a+='
    ',a+='

    ',a+='
    ',a+="",a+='',a+='',a+="
    ",a+="
    ";const n=await(0,i.A)({title:null,backdrop:t.backdrop??!1,icon:null,uid:null,is_dir:!1,body_content:'

    Recover Password

    ',draggable_body:!1,has_head:t.has_head??!0,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_draggable:t.is_draggable??!0,is_droppable:!1,is_resizable:!1,stay_on_top:t.stay_on_top??!1,allow_native_ctxmenu:!0,allow_user_select:!0,width:350,dominant:!0,...t.window_options,onAppend:function(t){$(t).find(".pass-recovery-username-or-email").first().focus()},window_class:"window-item-properties",window_css:{height:"initial"},body_css:{padding:"10px",width:"initial",height:"initial","background-color":"rgba(231, 238, 245)","backdrop-filter":"blur(3px)"}});$(n).find(".pass-recovery-form").on("submit",(function(t){return t.preventDefault(),t.stopPropagation(),!1})),$(n).find(".send-recovery-email").on("click",(function(t){let e,a,i=$(n).find(".pass-recovery-username-or-email").val();is_email(i)?e=i:a=i,$.ajax({url:api_origin+"/send-pass-recovery-email",type:"POST",async:!0,contentType:"application/json",data:JSON.stringify({email:e,username:a}),statusCode:{401:function(){logout()}},success:async function(t){$(n).close(),await(0,o.A)({message:t.message,body_icon:window.icons["c-check.svg"],stay_on_top:!0,backdrop:!0,window_options:{backdrop:!0,close_on_backdrop_click:!1}})},error:function(t){$(n).find(".error").html(t.responseText),$(n).find(".error").fadeIn()},complete:function(){}})}))}))}({window_options:{backdrop:!0,close_on_backdrop_click:!1}})})),$(d).find(".login-btn").on("click",(function(a){const i=$(d).find(".email_or_username").val(),n=$(d).find(".password").val();let o;o=is_email(i)?JSON.stringify({email:i,password:n}):JSON.stringify({username:i,password:n}),$(d).find(".login-error-msg").hide();let s={};window.custom_headers&&(s=window.custom_headers),$.ajax({url:gui_origin+"/login",type:"POST",async:!1,headers:s,contentType:"application/json",data:o,success:function(a){update_auth_data(a.token,a.user),t.reload_on_success?(window.onbeforeunload=null,window.location.replace("/")):e(!0),$(d).close()},error:function(t){$(d).find(".login-error-msg").html(t.responseText),$(d).find(".login-error-msg").fadeIn()}})})),$(d).find(".login-form").on("submit",(function(t){return t.preventDefault(),t.stopPropagation(),!1})),$(d).find(".signup-c2a-clickable").on("click",(async function(a){$(d).close(),await(0,n.A)({referrer:t.referrer,show_close_button:t.show_close_button,reload_on_success:t.reload_on_success,window_options:t.window_options,send_confirmation_code:t.send_confirmation_code})&&e(!0)}))}))}},493:(t,e,a)=>{"use strict";a.d(e,{A:()=>s});var i=a(17),n=a(453),o=a(103);$(document).on("click",".mywebsites-dir-path",(function(t){t=t.target,(0,i.A)({path:$(t).attr("data-path"),title:$(t).attr("data-name"),icon:window.icons["folder.svg"],uid:$(t).attr("data-uuid"),is_dir:!0,app:"explorer"})})),$(document).on("click",".mywebsites-site-setting",(function(t){const e=t.target.getBoundingClientRect();(0,n.A)({parent_element:t.target,position:{top:e.top+25,left:e.left-193},items:[{html:"Release Address",onClick:async function(){"Yes, Release It"===await(0,o.A)({message:"Are you sure you want to release this address?",buttons:[{label:"Yes, Release It",type:"primary"},{label:"Cancel"}]})&&$.ajax({url:api_origin+"/delete-site",type:"POST",data:JSON.stringify({site_uuid:$(t.target).attr("data-site-uuid")}),async:!1,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:function(){$(`.mywebsites-card[data-uuid="${$(t.target).attr("data-site-uuid")}"]`).fadeOut()}})}}]})})),$(document).on("click",".mywebsites-dis-dir",(function(t){puter.hosting.delete($(t.target).attr("data-dir-uuid"),$(t.target).attr("data-site-uuid"),(function(){$(`.mywebsites-no-dir-notice[data-site-uuid="${$(t.target).attr("data-site-uuid")}"]`).show(),$(`.mywebsites-dir-path[data-uuid="${$(t.target).attr("data-dir-uuid")}"]`).remove(),$(`.item[data-uid="${$(t.target).attr("data-dir-uuid")}"]`).find(".item-has-website-badge").fadeOut(300),$(t.target).hide()}))}));const s=async function(t){let e="";e+="
    ",e+="
    ";const a=await(0,i.A)({title:"My Websites",app:"my-websites",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:"
    ",draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!0,allow_user_select:!0,width:400,dominant:!0,onAppend:function(t){},window_css:{},body_css:{padding:"10px",width:"initial","background-color":"rgba(231, 238, 245)","backdrop-filter":"blur(3px)","padding-bottom":0,height:"351px","box-sizing":"border-box"}});let n=Date.now(),o=setTimeout((function(){$(a).find(".window-body").html('

    Loading...

    ')}),1e3);puter.hosting.list().then((function(t){setTimeout((function(){if(clearTimeout(o),t.length>0){let e="";for(let a=0;a`,e+=`${t[a].subdomain}.puter.site`,e+=``,t[a].root_dir&&(e+=`

    `,e+=``,e+=`${t[a].root_dir.path}`,e+="

    ",e+='

    ',e+=``,e+=`Disassociate Folder`,e+="

    "),e+=`

    No directory associated with this address.

    `,e+="
    ";$(a).find(".window-body").html(e)}else $(a).find(".window-body").html('

    You haven\'t published any websites!

    ')}),Date.now()-n<1e3?0:2e3)}))}},93:(t,e,a)=>{"use strict";a.d(e,{A:()=>o});var i=a(17),n=a(493);$(document).on("click",".manage-your-websites-link",(async function(t){(0,n.A)()}));const o=async function(t,e,a){let n="";n+='
    ',n+='
    ',n+=``,n+=`

    ${e} has been published to:

    `,n+=`

    `,n+='',n+="
    ",n+='
    ',n+='
    ',n+='
    ',n+='',n+=`
    https://.${window.hosting_domain}
    `,n+="
    ",n+=``,n+='',n+="
    ",n+="
    ";const o=await(0,i.A)({title:"Publish Website",icon:null,uid:null,is_dir:!1,body_content:n,draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!0,allow_user_select:!0,width:450,dominant:!0,onAppend:function(t){$(t).find(".publish-website-subdomain").val(generate_identifier()),$(t).find(".publish-website-subdomain").get(0).focus({preventScroll:!0})},window_class:"window-publishWebsite",window_css:{height:"initial"},body_css:{width:"initial",height:"100%","background-color":"rgb(245 247 249)","backdrop-filter":"blur(3px)"}});$(o).find(".publish-btn").on("click",(function(e){let i=$(o).find(".publish-website-subdomain").val();$(o).find(".publish-btn").prop("disabled",!0),puter.hosting.create(i,a).then((e=>{$(o).find(".window-publishWebsite-form").hide(100,(function(){let e="https://"+i+"."+window.hosting_domain+"/";$(o).find(".publishWebsite-published-link").attr("href",e),$(o).find(".publishWebsite-published-link").text(e),$(o).find(".window-publishWebsite-success").show(100),$(`.item[data-uid="${t}"] .item-has-website-badge`).show()})),$(`.item[data-path^="${a}"]`).each((function(){$(this).find(".item-has-website-url-badge").show(),$(this).attr("data-website_url",url+$(this).attr("data-path").substring(a.length))})),update_sites_cache()})).catch((t=>{$(o).find(".publish-website-error-msg").html(t.message+("subdomain_limit_reached"===t.code?' Manage Your Subdomains':"")),$(o).find(".publish-website-error-msg").fadeIn(),$(o).find(".publish-btn").prop("disabled",!1)}))})),$(o).find(".publish-window-ok-btn").on("click",(function(){$(o).close()}))}},171:(t,e,a)=>{"use strict";a.d(e,{A:()=>n});var i=a(17);const n=async function(t){return(t=t??{}).reload_on_success=t.reload_on_success??!1,new Promise((async e=>{let a=t.permission.split(":"),n=a[1];a[2];let o=(s=n,[{name:"puter-chat-completion",human_name:"AI Chat Completion",description:"This app wants to generate text using AI. This may incur costs on your behalf."},{name:"puter-image-generation",human_name:"AI Image Generation",description:"This app wants to generate images using AI. This may incur costs on your behalf."},{name:"puter-kvstore",human_name:"Puter Storage",description:"This app wants to securely store data in your Puter account. This app will not be able to access your personal data or data stored by other apps."}].find((t=>t.name===s)));var s;if(void 0===o)return void e(!1);let d="";d+="
    ",d+='
    ',d+=`

    "${html_encode(t.app_uid??t.origin)}" would Like to use ${html_encode(o.human_name)}

    `,d+=`

    ${html_encode(o.description)}

    `,d+='',d+='',d+="
    ",d+="
    ";const r=await(0,i.A)({title:null,app:"request-authorization",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:d,draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_draggable:!0,is_droppable:!1,is_resizable:!1,stay_on_top:!1,allow_native_ctxmenu:!0,allow_user_select:!0,...t.window_options,width:350,dominant:!0,on_close:()=>{e(!1)},onAppend:function(t){},window_class:"window-login",window_css:{height:"initial"},body_css:{width:"initial",padding:"0","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});$(r).find(".app-auth-allow").on("click",(async function(a){$(this).addClass("disabled");try{await fetch(window.api_origin+"/auth/grant-user-app",{headers:{"Content-Type":"application/json",Authorization:"Bearer "+window.auth_token},body:JSON.stringify({app_uid:t.app_uid,origin:t.origin,permission:t.permission}),method:"POST"})}catch(t){console.error(t),e(t)}e(!0)})),$(r).find(".app-auth-dont-allow").on("click",(function(t){$(this).addClass("disabled"),$(r).close(),e(!1)}))}))}},817:(t,e,a)=>{"use strict";a.d(e,{A:()=>o});var i=a(17),n=a(177);const o=async function(t){const e=window.uuidv4();return(t=t??{}).reload_on_success=t.reload_on_success??!1,t.send_confirmation_code=t.send_confirmation_code??!1,new Promise((async a=>{let o="";o+="
    ",o+='",o+='",o+="
    ";const s=await(0,i.A)({title:null,icon:null,uid:null,app:"save-account",single_instance:!0,is_dir:!1,body_content:o,has_head:!0,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_draggable:!0,is_droppable:!1,is_resizable:!1,stay_on_top:!1,allow_native_ctxmenu:!0,allow_user_select:!0,width:350,dominant:!0,show_in_taskbar:!1,...t.window_options,onAppend:function(e){t.default_username?$(e).find(".email").get(0).focus({preventScroll:!0}):$(e).find(".username").get(0).focus({preventScroll:!0})},window_class:"window-save-account",window_css:{height:"initial"},on_close:()=>{a(!1)},body_css:{width:"initial","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});$(s).find(".signup-btn").on("click",(function(e){let i=$(s).find(".username").val(),o=$(s).find(".email").val(),d=$(s).find(".password").val();$(s).find(".signup-btn").prop("disabled",!0),$.ajax({url:api_origin+"/save_account",type:"POST",async:!0,contentType:"application/json",data:JSON.stringify({username:i,email:o,password:d,referrer:t.referrer,send_confirmation_code:t.send_confirmation_code}),headers:{Authorization:"Bearer "+auth_token},success:async function(t){if(update_auth_data(t.token,t.user),t.user.email_confirmation_required){let t=await(0,n.A)({stay_on_top:!0,has_head:!0});a(t)}else a(!0);$(s).find(".save-account-form").hide(100,(()=>{$(s).find(".save-account-success").show(100)}))},error:function(t){$(s).find(".signup-error-msg").html(t.responseText),$(s).find(".signup-error-msg").fadeIn(),$(s).find(".signup-btn").prop("disabled",!1)}})})),$(s).find(".signup-form").on("submit",(function(t){return t.preventDefault(),t.stopPropagation(),!1})),$(s).find(".save-account-success-ok-btn").on("click",(()=>{$(s).close()})),$(s).find(".signup-c2a-clickable").parents(".window").close()}))}},585:(t,e,a)=>{"use strict";a.d(e,{A:()=>s});var i=a(17),n=a(146),o=a(177);const s=function(t){return(t=t??{}).reload_on_success=t.reload_on_success??!1,t.has_head=t.has_head??!0,t.send_confirmation_code=t.send_confirmation_code??!1,new Promise((async e=>{const a=window.uuidv4();let s="";s+='
    ',s+=``,t.has_head||!1===t.show_close_button||(s+='
    ×
    '),s+='
    ',s+='

    Create Free Account

    ',s+='",s+="
    ",s+='
    ',s+='',s+="
    ",s+="
    ";const d=await(0,i.A)({title:null,app:"signup",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:s,draggable_body:!1,has_head:!0,selectable_body:!1,allow_context_menu:!1,is_draggable:!1,is_droppable:!1,is_resizable:!1,stay_on_top:!1,allow_native_ctxmenu:!0,allow_user_select:!0,...t.window_options,dominant:!1,center:!0,onAppend:function(t){$(t).find(".username").get(0).focus({preventScroll:!0})},window_class:"window-signup",window_css:{height:"initial"},body_css:{width:"initial","background-color":"white","backdrop-filter":"blur(3px)",display:"flex","flex-direction":"column","justify-content":"center","align-items":"center",padding:"30px 10px 10px 10px"}});$(d).find(".login-c2a-clickable").on("click",(async function(a){$(".login-c2a-clickable").parents(".window").close(),await(0,n.A)({referrer:t.referrer,reload_on_success:t.reload_on_success,window_options:t.window_options,show_close_button:t.show_close_button,send_confirmation_code:t.send_confirmation_code})&&e(!0)})),$(d).find(".signup-btn").on("click",(function(a){let i=$(d).find(".username").val(),n=$(d).find(".email").val(),s=$(d).find(".password").val(),r=$(d).find(".p102xyzname").val();$(d).find(".signup-btn").prop("disabled",!0);let l={};window.custom_headers&&(l=window.custom_headers),$.ajax({url:gui_origin+"/signup",type:"POST",async:!0,headers:l,contentType:"application/json",data:JSON.stringify({username:i,referral_code:window.referral_code,email:n,password:s,referrer:t.referrer??window.referrerStr,send_confirmation_code:t.send_confirmation_code,p102xyzname:r}),success:async function(a){if(update_auth_data(a.token,a.user),t.reload_on_success)window.onbeforeunload=null,window.location.replace("/");else if(t.send_confirmation_code){$(d).close();let t=await(0,o.A)({stay_on_top:!0,has_head:!0});e(t)}else e(!0)},error:function(t){$(d).find(".signup-error-msg").html(t.responseText),$(d).find(".signup-error-msg").fadeIn(),$(d).find(".signup-btn").prop("disabled",!1)}})})),$(d).find(".signup-form").on("submit",(function(t){return t.preventDefault(),t.stopPropagation(),!1})),$(".signup-c2a-clickable").parents(".window").close()}))}},644:(t,e,a)=>{"use strict";a.d(e,{A:()=>i});const i=function(t){return new Promise(((e,a)=>{let i,n,o,s=window.progress_tracker[t.operation_id],d=s[t.item_upload_id],r=new XMLHttpRequest;return r.open("post",api_origin+"/download",!0),r.setRequestHeader("Authorization","Bearer "+auth_token),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.addEventListener("load",(function(e){if(200!==this.status)return t.error&&"function"==typeof t.error&&t.error(JSON.parse(this.responseText)),a(JSON.parse(this.responseText));i=JSON.parse(this.responseText)})),r.addEventListener("error",(function(e){return t.error&&"function"==typeof t.error&&t.error(e),a(e)})),r.send(JSON.stringify({url:t.url,operation_id:t.operation_id,socket_id:window.socket?window.socket.id:null,item_upload_id:t.item_upload_id,name:t.name,path:t.dest_path,shortcut_to:t.shortcut_to,dedupe_name:t.dedupe_name??!1,overwrite:t.overwrite??!1})),o=setInterval((()=>{operation_cancelled[t.operation_id]&&(r.abort(),clearInterval(o),clearInterval(n))}),100),n=setInterval((function(){let a=1;d.total&&(a=(d.cloud_uploaded+d.downloaded)/d.total);let r=((s[0].cloud_uploaded+s[0].downloaded)/s[0].total*100).toFixed(0);r=r>100?100:r,$(`[data-download-operation-id="${t.operation_id}"]`).find(".download-progress-bar").css("width",r+"%"),(a>=1||0===a)&&i&&(setTimeout((function(){clearInterval(n),clearInterval(o),t.success&&"function"==typeof t.success&&t.success(i),e(i)}),t.return_timeout??500),clearInterval(n))}),200),r}))}},935:(t,e,a)=>{"use strict";a.d(e,{A:()=>i});const i=function(){const t=_.size(active_uploads);if(1!==t||isNaN(Object.values(active_uploads)[0])){if(t>1){let e=0;for(const[t,a]of Object.entries(active_uploads))e+=Math.round(a);const a=Math.round(e/t);isNaN(a)||(document.title=a+"% Uploading")}}else document.title=Math.round(Object.values(active_uploads)[0])+"% Uploading"}},496:(t,e,a)=>{"use strict";a.d(e,{A:()=>i});const i=function(t){$(':not([data-path=""]),:not([data-item-path=""])').each(((e,a)=>{const i=$(a),n=i.attr("data-path"),o=i.attr("data-item-path"),s=i.attr("data-shortcut_to_path");n&&"null"!==n&&"undefined"!==n&&(n==="/"+window.user.username?i.attr("data-path","/"+t):n.startsWith("/"+window.user.username+"/")&&i.attr("data-path",n.replace("/"+window.user.username+"/","/"+t+"/")),i.hasClass("window-navbar-path-dirname")&&n==="/"+window.user.username?i.text(t):i.hasClass("window-navbar-path-input")&&(n==="/"+window.user.username?i.val("/"+t):n.startsWith("/"+window.user.username+"/")&&i.val(n.replace("/"+window.user.username+"/","/"+t+"/")))),s&&""!==s&&"null"!==s&&"undefined"!==s&&(s==="/"+window.user.username?i.attr("data-shortcut_to_path","/"+t):s.startsWith("/"+window.user.username+"/")&&i.attr("data-shortcut_to_path",s.replace("/"+window.user.username+"/","/"+t+"/"))),o&&"null"!==o&&"undefined"!==o&&(o==="/"+window.user.username?i.attr("data-item-path","/"+t):o.startsWith("/"+window.user.username+"/")&&i.attr("data-item-path",o.replace("/"+window.user.username+"/","/"+t+"/")))})),$(".window").each(((t,e)=>{})),window.desktop_path="/"+t+"/Desktop",window.trash_path="/"+t+"/Trash",window.appdata_path="/"+t+"/AppData",window.docs_path="/"+t+"/Documents",window.pictures_path="/"+t+"/Pictures",window.videos_path="/"+t+"/Videos",window.desktop_path="/"+t+"/Desktop",window.home_path="/"+t}},889:(t,e,a)=>{"use strict";a.d(e,{A:()=>d});const i=47;function n(t){return t===i}function o(t,e,a,n){let o="",s=0,d=-1,r=0,l=0;for(let c=0;c<=t.length;++c){if(c2){const t=o.lastIndexOf(a);-1===t?(o="",s=0):(o=o.slice(0,t),s=o.length-1-o.lastIndexOf(o,a)),d=c,r=0;continue}if(0!==o.length){o="",s=0,d=c,r=0;continue}}e&&(o+=o.length>0?`${a}..`:"..",s=2)}else o.length>0?o+=`${a}${t.slice(d+1,c)}`:o=t.slice(d+1,c),s=c-d-1;d=c,r=0}else 46===l&&-1!==r?++r:r=-1}return o}const s={resolve(...t){let e="",a=!1;for(let n=t.length-1;n>=-1&&!a;n--){const o=n>=0?t[n]:"/";0!==o.length&&(e=`${o}/${e}`,a=o.charCodeAt(0)===i)}return e=o(e,!a,"/",n),a?`/${e}`:e.length>0?e:"."},normalize(t){if(0===t.length)return".";const e=t.charCodeAt(0)===i,a=t.charCodeAt(t.length-1)===i;return 0===(t=o(t,!e,"/",n)).length?e?"/":a?"./":".":(a&&(t+="/"),e?`/${t}`:t)},isAbsolute:t=>t.length>0&&t.charCodeAt(0)===i,join(...t){if(0===t.length)return".";let e;for(let a=0;a0&&(void 0===e?e=i:e+=`/${i}`)}return void 0===e?".":s.normalize(e)},relative(t,e){if(t===e)return"";if((t=s.resolve(t))===(e=s.resolve(e)))return"";const a=t.length,n=a-1,o=e.length-1,d=nd){if(e.charCodeAt(1+l)===i)return e.slice(1+l+1);if(0===l)return e.slice(1+l)}else n>d&&(t.charCodeAt(1+l)===i?r=l:0===l&&(r=0));let c="";for(l=1+r+1;l<=a;++l)l!==a&&t.charCodeAt(l)!==i||(c+=0===c.length?"..":"/..");return`${c}${e.slice(1+r)}`},toNamespacedPath:t=>t,dirname(t){if(0===t.length)return".";const e=t.charCodeAt(0)===i;let a=-1,n=!0;for(let e=t.length-1;e>=1;--e)if(t.charCodeAt(e)===i){if(!n){a=e;break}}else n=!1;return-1===a?e?"/":".":e&&1===a?"//":t.slice(0,a)},basename(t,e){let a=0,n=-1,o=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e===t)return"";let s=e.length-1,d=-1;for(let r=t.length-1;r>=0;--r){const l=t.charCodeAt(r);if(l===i){if(!o){a=r+1;break}}else-1===d&&(o=!1,d=r+1),s>=0&&(l===e.charCodeAt(s)?-1==--s&&(n=r):(s=-1,n=d))}return a===n?n=d:-1===n&&(n=t.length),t.slice(a,n)}for(let e=t.length-1;e>=0;--e)if(t.charCodeAt(e)===i){if(!o){a=e+1;break}}else-1===n&&(o=!1,n=e+1);return-1===n?"":t.slice(a,n)},extname(t){let e=-1,a=0,n=-1,o=!0,s=0;for(let d=t.length-1;d>=0;--d){const r=t.charCodeAt(d);if(r!==i)-1===n&&(o=!1,n=d+1),46===r?-1===e?e=d:1!==s&&(s=1):-1!==e&&(s=-1);else if(!o){a=d+1;break}}return-1===e||-1===n||0===s||1===s&&e===n-1&&e===a+1?"":t.slice(e,n)},format:function(t,e){validateObject(e,"pathObject");const a=e.dir||e.root,i=e.base||`${e.name||""}${e.ext||""}`;return a?a===e.root?`${a}${i}`:`${a}${t}${i}`:i}.bind(null,"/"),parse(t){const e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;const a=t.charCodeAt(0)===i;let n;a?(e.root="/",n=1):n=0;let o=-1,s=0,d=-1,r=!0,l=t.length-1,c=0;for(;l>=n;--l){const e=t.charCodeAt(l);if(e!==i)-1===d&&(r=!1,d=l+1),46===e?-1===o?o=l:1!==c&&(c=1):-1!==o&&(c=-1);else if(!r){s=l+1;break}}if(-1!==d){const i=0===s&&a?1:s;-1===o||0===c||1===c&&o===d-1&&o===s+1?e.base=e.name=t.slice(i,d):(e.name=t.slice(i,o),e.base=t.slice(i,d),e.ext=t.slice(o,d))}return s>0?e.dir=t.slice(0,s-1):a&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null},d=s}},e={};function a(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,a),o.exports}a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=a(889),e=a(17),i=a(817);var n=a(453),o=a(124),s=a(103);var d=a(493);var r=a(496);const l=async function(){const t=window.uuidv4();let a="";a+='
    ',a+='
    ',a+='
    ',a+='
    ',a+=``,a+=``,a+="
    ",a+='',a+="
    ";const i=await(0,e.A)({title:"Change Username",app:"change-username",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:a,draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,width:350,height:"auto",dominant:!0,show_in_taskbar:!1,onAppend:function(t){$(t).find(".new-username").get(0)?.focus({preventScroll:!0})},window_class:"window-publishWebsite",body_css:{width:"initial",height:"100%","background-color":"rgb(245 247 249)","backdrop-filter":"blur(3px)"}});$(i).find(".change-username-btn").on("click",(function(t){$(i).find(".form-success-msg, .form-success-msg").hide();const e=$(i).find(".new-username").val();if(!e)return $(i).find(".form-error-msg").html("All fields are required."),void $(i).find(".form-error-msg").fadeIn();$(i).find(".form-error-msg").hide(),$(i).find(".change-username-btn").addClass("disabled"),$(i).find(".new-username").attr("disabled",!0),$.ajax({url:api_origin+"/change_username",type:"POST",async:!0,headers:{Authorization:"Bearer "+auth_token},contentType:"application/json",data:JSON.stringify({new_username:e}),success:function(t){$(i).find(".form-success-msg").html("Username updated successfully."),$(i).find(".form-success-msg").fadeIn(),$(i).find("input").val(""),(0,r.A)(e),window.user.username=e,$(i).find(".change-username-btn").removeClass("disabled"),$(i).find(".new-username").attr("disabled",!1)},error:function(t){$(i).find(".form-error-msg").html(html_encode(t.responseJSON?.message)),$(i).find(".form-error-msg").fadeIn(),$(i).find(".change-username-btn").removeClass("disabled"),$(i).find(".new-username").attr("disabled",!1)}})}))};var c=a(146);var p=a(8);var m=a(404);window.make_taskbar_sortable=function(){$(".taskbar").sortable({axis:"x",items:".taskbar-item-sortable:not(.has-open-contextmenu)",cancel:".has-open-contextmenu",placeholder:"taskbar-item-sortable-placeholder",helper:"clone",distance:5,revert:10,receive:function(t,e){if(!$(e.item).hasClass("taskbar-item")&&0!==$(`.taskbar-item[data-app="${$(e.item).attr("data-app-name")}"]`).length)return $(this).sortable("cancel"),void $(".taskbar .start-app").remove()},update:function(t,e){if($(e.item).hasClass("taskbar-item"))"true"===$(e.item).attr("data-keep-in-taskbar")&&update_taskbar();else{if(0!==$(`.taskbar-item[data-app="${$(e.item).attr("data-app-name")}"]`).length)return $(this).sortable("cancel"),void $(".taskbar .start-app").remove();let t=(0,m.A)({icon:$(e.item).attr("data-app-icon"),app:$(e.item).attr("data-app-name"),name:$(e.item).attr("data-app-title"),append_to_taskbar:!1,keep_in_taskbar:!0,onClick:function(){if(0!==parseInt($(`.taskbar-item[data-app="${$(e.item).attr("data-app-name")}"]`).attr("data-open-windows")))return!1;launch_app({name:$(e.item).attr("data-app-name")})}}),a=$(t).detach();$(a).insertAfter(e.item),$(a).show(),$(e.item).removeItems(),update_taskbar()}}})};$(document).on("contextmenu taphold",".taskbar",(function(t){if("taphold"!==t.type||isMobile.phone||isMobile.tablet)return t.preventDefault(),t.stopPropagation(),(0,n.A)({parent_element:$(".taskbar"),items:[{html:"Show open windows",onClick:function(){$(".window").showWindow()}},{html:"Show the desktop",onClick:function(){$(".window").hideWindow()}}]}),!1})),$(document).on("click",".qr-btn",(async function(t){!async function(t){new Promise((async a=>{t=t??{};let i="";i+='
    ×
    ',i+='
    ',i+='

    Scan the code below to log into this session from other devices

    ',i+="
    ";const n=await(0,e.A)({title:"Instant Login!",app:"instant-login",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:'
    ×

    Scan the code below to log into this session from other devices

    ',draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,backdrop:!0,width:350,height:"auto",dominant:!0,show_in_taskbar:!1,draggable_body:!0,onAppend:function(t){},window_class:"window-qr",body_css:{width:"initial",height:"100%","background-color":"rgb(245 247 249)","backdrop-filter":"blur(3px)"}});new QRCode($(n).find(".otp-qr-code").get(0),{text:window.gui_origin+"?auth_token="+window.auth_token,width:155,height:155,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H})}))}()})),$(document).on("click",".user-options-menu-btn",(async function(t){const a=this.getBoundingClientRect();if($('.context-menu[data-id="user-options-menu"]').length>0)return;let o=[];if(window.user.is_temp&&(o.push({html:"Save Session",icon:'',icon_active:'',onClick:async function(){(0,i.A)({send_confirmation_code:!1,default_username:window.user.username})}}),o.push("-")),window.logged_in_users.length>0){let t=window.logged_in_users;t.sort((function(t,e){return t.uuid===window.user.uuid?-1:e.uuid==window.user.uuid?1:0})),t.forEach((t=>{o.push({html:t.username,icon:t.username===user.username?"✓":"",onClick:async function(e){t.username!==user.username&&(update_auth_data(t.auth_token,t),location.reload())}})})),o.push("-"),o.push({html:"Add existing account",onClick:async function(t){await(0,c.A)({reload_on_success:!0,send_confirmation_code:!1,window_options:{has_head:!0}})}}),o.push("-")}(0,n.A)({id:"user-options-menu",parent_element:this,position:{top:a.top+28,left:a.left+a.width-15},items:[...o,{html:"My Websites",onClick:async function(){(0,d.A)()}},{html:"Change Username",onClick:async function(){l()}},{html:"Change Password",onClick:async function(){!async function(){const t=window.uuidv4();let a="";a+='
    ',a+='
    ',a+='
    ',a+='
    ',a+=``,a+=``,a+="
    ",a+='
    ',a+=``,a+=``,a+="
    ",a+='
    ',a+=``,a+=``,a+="
    ",a+='',a+="
    ";const i=await(0,e.A)({title:"Change Password",app:"change-passowrd",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:a,draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,width:350,height:"auto",dominant:!0,show_in_taskbar:!1,onAppend:function(t){$(t).find(".current-password").get(0).focus({preventScroll:!0})},window_class:"window-publishWebsite",body_css:{width:"initial",height:"100%","background-color":"rgb(245 247 249)","backdrop-filter":"blur(3px)"}});$(i).find(".change-password-btn").on("click",(function(t){const e=$(i).find(".current-password").val(),a=$(i).find(".new-password").val(),n=$(i).find(".confirm-new-password").val();return""===e||""===a||""===n?($(i).find(".form-error-msg").html("All fields are required."),void $(i).find(".form-error-msg").fadeIn()):a!==n?($(i).find(".form-error-msg").html("`New Password` and `Confirm New Password` do not match."),void $(i).find(".form-error-msg").fadeIn()):($(i).find(".form-error-msg").hide(),void $.ajax({url:api_origin+"/passwd",type:"POST",async:!0,headers:{Authorization:"Bearer "+auth_token},contentType:"application/json",data:JSON.stringify({old_pass:e,new_pass:a}),success:function(t){$(i).find(".form-success-msg").html("Password changed successfully."),$(i).find(".form-success-msg").fadeIn(),$(i).find("input").val("")},error:function(t){$(i).find(".form-error-msg").html(t.responseText),$(i).find(".form-error-msg").fadeIn()}}))}))}()}},{html:"Contact Us",onClick:async function(){!async function(t){new Promise((async a=>{t=t??{};let i="";i+='
    ',i+='",i+='",i+="
    ";const n=await(0,e.A)({title:"Contact Us",app:"feedback",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:i,draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,width:350,height:"auto",dominant:!0,show_in_taskbar:!1,onAppend:function(t){$(t).find(".feedback-message").get(0).focus({preventScroll:!0})},window_class:"window-feedback",body_css:{width:"initial",height:"100%","background-color":"rgb(245 247 249)","backdrop-filter":"blur(3px)"}});$(n).find(".send-feedback-btn").on("click",(function(t){const e=$(n).find(".feedback-message").val();e&&$(this).prop("disabled",!0),$.ajax({url:api_origin+"/contactUs",type:"POST",async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},data:JSON.stringify({message:e}),success:async function(t){$(n).find(".feedback-form").hide(),$(n).find(".feedback-sent-success").show(100)}})}))}))}()}},"-",{html:"Log Out",onClick:async function(){$(".window-app").length>0?"Close Windows and Log Out"===await(0,s.A)({message:"

    You have open apps. Are you sure you want to log out?

    ",buttons:[{label:"Close Windows and Log Out",type:"primary"},{label:"Cancel"}]})&&logout():logout()}}]})})),$(document).on("click",".fullscreen-btn",(async function(t){if(is_fullscreen())document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen();else{var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}})),$(document).on("click",".close-launch-popover",(function(){$(".launch-popover").closest(".popover").fadeOut(200,(function(){$(".launch-popover").closest(".popover").remove()}))})),$(document).on("click",".toolbar-puter-logo",(function(){launch_app({name:"about",window_options:{single_instance:!0}})})),$(document).on("click",".user-options-create-account-btn",(async function(t){(0,i.A)({send_confirmation_code:!1,default_username:window.user.username})})),$(document).on("click",".refer-btn",(async function(t){!async function(t){let a="",i="Copy Link";const n=`${gui_origin}/?r=${user.referral_code}`;a+="
    ",a+='
    ×
    ',a+=``,a+='

    Get 1 GB for every friend who creates and confirms an account on Puter. Your friend will get 1 GB too!

    ',a+='',a+='',a+=``,a+=``,a+="
    ";const o=await(0,e.A)({title:"Refer a friend!",icon:null,uid:null,is_dir:!1,body_content:a,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_draggable:!0,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!0,allow_user_select:!0,onAppend:function(t){},width:500,dominant:!0,window_css:{height:"initial"},body_css:{padding:"10px",width:"initial","max-height":"calc(100vh - 200px)","background-color":"rgb(241 246 251)","backdrop-filter":"blur(3px)",padding:"10px 20px 20px 20px",height:"initial"}});$(o).find(".window-body .downloadable-link").val(n),$(o).find(".window-body .share-copy-link-on-social").on("click",(function(t){const e=socialLink({url:n,title:"Get 1 GB of free storage on Puter.com!",description:"Get 1 GB of free storage on Puter.com!"});let a="";a+='
    ',a+='

    Share to

    ',a+=``,a+=``,a+=``,a+=``,a+=``,a+=``,a+="
    ",(0,p.A)({content:a,snapToElement:this,parent_element:this,height:100,position:"bottom"})})),$(o).find(".window-body .copy-downloadable-link").on("click",(async function(t){var e=this;if(navigator.clipboard){const t=$(o).find(".window-body .downloadable-link").val();await navigator.clipboard.writeText(t)}else $(o).find(".window-body .downloadable-link").select(),document.execCommand("copy");$(this).html("Copied!"),setTimeout((function(){$(e).html(i)}),1e3)}))}()})),$(document).on("click",".start-app",(async function(t){launch_app({name:$(this).attr("data-app-name")}),$(".popover").fadeOut(200,(function(){$(".popover").remove()}))})),$(document).on("click",".user-options-login-btn",(async function(t){const e=await(0,s.A)({message:"Save session before exiting!

    You are in a temporary session and logging into another account will erase all data in your current session.

    ",buttons:[{label:"Save session",value:"save-session",type:"primary"},{label:"Log into another account anyway",value:"login"},{label:"Cancel"}]});"save-session"===e?await(0,i.A)({send_confirmation_code:!1})&&(0,c.A)({show_signup_button:!1,reload_on_success:!0}):"login"===e&&(0,c.A)({show_signup_button:!1,reload_on_success:!0,window_options:{backdrop:!0,close_on_backdrop_click:!1}})})),$(document).on("click mousedown",".launch-search, .launch-popover",(function(t){$(this).focus(),t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()})),$(document).on("focus",".launch-search",(function(t){$(".launch-app-selected").removeClass("launch-app-selected"),$(".launch-popover").scrollTop(0)})),$(document).on("change keyup keypress keydown paste",".launch-search",(function(t){const e=$(this).val().toLowerCase();""===e?($(".launch-search-clear").hide(),$(".start-app-card").show(),$(".launch-apps-recent").show(),$(".start-section-heading").show()):($(".launch-apps-recent").hide(),$(".start-section-heading").hide(),$(".launch-search-clear").show(),launch_apps.recommended.forEach((t=>{t.title.toLowerCase().includes(e.toLowerCase())?$(`.start-app-card[data-name="${t.name}"]`).show():$(`.start-app-card[data-name="${t.name}"]`).hide()})))})),$(document).on("click",".launch-search-clear",(function(t){$(".launch-search").val(""),$(".launch-search").trigger("change"),$(".launch-search").focus()})),document.addEventListener("fullscreenchange",(t=>{document.fullscreenElement?($(".fullscreen-btn").css("background-image",`url(${window.icons["shrink.svg"]})`),$(".fullscreen-btn").attr("title","Exit Full Screen"),$("#clock").show()):($(".fullscreen-btn").css("background-image",`url(${window.icons["fullscreen.svg"]})`),$(".fullscreen-btn").attr("title","Enter Full Screen"),$("#clock").hide())})),window.set_desktop_background=function(t){if(t.fit){let e=t.fit;"cover"===e||"contain"===e?($("body").css("background-size",e),$("body").css("background-repeat","no-repeat"),$("body").css("background-position","center center")):"center"===e?($("body").css("background-size","auto"),$("body").css("background-repeat","no-repeat"),$("body").css("background-position","center center")):"repeat"===e&&($("body").css("background-size","auto"),$("body").css("background-repeat","repeat")),window.desktop_bg_fit=e}t.url?($("body").css("background-image",`url(${t.url})`),window.desktop_bg_url=t.url,window.desktop_bg_color=void 0):t.color&&($("body").css({"background-image":"none","background-color":t.color}),window.desktop_bg_color=t.color,window.desktop_bg_url=void 0)},window.update_taskbar=function(){let t=[];$('.taskbar-item-sortable[data-keep-in-taskbar="true"]').each((function(e){t.push({name:$(this).attr("data-app"),type:"app"})})),$.ajax({url:api_origin+"/update-taskbar-items",type:"POST",data:JSON.stringify({items:t}),async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token}})},window.remove_taskbar_item=function(t){$(t).find("*").fadeOut(100,(function(){})),$(t).animate({width:0},200,(function(){$(t).remove()}))},window.enter_fullpage_mode=t=>{$(".taskbar").hide(),$(t).find(".window-head").hide(),$("body").addClass("fullpage-mode"),$(t).css({width:"100%",height:"100%",top:toolbar_height+"px",left:0,"border-radius":0})},window.exit_fullpage_mode=t=>{$("body").removeClass("fullpage-mode"),window.taskbar_height=window.default_taskbar_height,$(".taskbar").css("height",window.taskbar_height),$(".taskbar").show(),refresh_item_container($(".desktop.item-container"),{fadeInItems:!0}),$(t).removeAttr("data-is_fullpage"),t&&(reset_window_size_and_position(t),$(t).find(".window-head").show()),$(".desktop").css("height",`calc(100vh - ${window.taskbar_height+window.toolbar_height}px)`),$(".show-desktop-btn").hide(),refresh_desktop_background()},window.reset_window_size_and_position=t=>{$(t).css({width:680,height:380,"border-radius":window_border_radius,top:"calc(50% - 190px)",left:"calc(50% - 340px)"})};const u=async function(a){let s="";window.socket=io(gui_origin+"/",{query:{auth_token}}),window.socket.on("error",(t=>{console.error("GUI Socket Error:",t)})),window.socket.on("connect",(function(){console.log("GUI Socket: Connected",window.socket.id)})),window.socket.on("reconnect",(function(){console.log("GUI Socket: Reconnected",window.socket.id)})),window.socket.on("disconnect",(()=>{console.log("GUI Socket: Disconnected")})),window.socket.on("reconnect",(t=>{console.log("GUI Socket: Reconnection",t)})),window.socket.on("reconnect_attempt",(t=>{console.log("GUI Socket: Reconnection Attemps",t)})),window.socket.on("reconnect_error",(t=>{console.log("GUI Socket: Reconnection Error",t)})),window.socket.on("reconnect_failed",(()=>{console.log("GUI Socket: Reconnection Failed")})),window.socket.on("error",(t=>{console.error("GUI Socket Error:",t)})),socket.on("upload.progress",(t=>{window.progress_tracker[t.operation_id]&&(window.progress_tracker[t.operation_id].cloud_uploaded+=t.loaded_diff,window.progress_tracker[t.operation_id][t.item_upload_id]&&(window.progress_tracker[t.operation_id][t.item_upload_id].cloud_uploaded=t.loaded))})),socket.on("download.progress",(t=>{window.progress_tracker[t.operation_id]&&window.progress_tracker[t.operation_id][t.item_upload_id]&&(window.progress_tracker[t.operation_id][t.item_upload_id].downloaded=t.loaded,window.progress_tracker[t.operation_id][t.item_upload_id].total=t.total)})),socket.on("trash.is_empty",(async t=>{$(`.item[data-path="${html_encode(trash_path)}" i]`).find(".item-icon > img").attr("src",t.is_empty?window.icons["trash.svg"]:window.icons["trash-full.svg"]),$(`.window[data-path="${html_encode(trash_path)}" i]`).find(".window-head-icon").attr("src",t.is_empty?window.icons["trash.svg"]:window.icons["trash-full.svg"]),t.is_empty&&$(`.window[data-path="${html_encode(trash_path)}" i]`).find(".item-container").empty()})),socket.on("app.opened",(async t=>{t.original_client_socket_id!==window.socket.id&&(launch_apps.recent.unshift(t),launch_apps.recent=_.uniqBy(launch_apps.recent,"name"),launch_apps.recent=launch_apps.recent.slice(0,window.launch_recent_apps_count))})),socket.on("item.removed",(async t=>{t.original_client_socket_id!==window.socket.id&&(t.descendants_only||$(`.item[data-path='${t.path}']`).fadeOut(150,(function(){$(`.window[data-path^="${t.path}/"]`).close()})))})),socket.on("item.updated",(async t=>{if(t.original_client_socket_id===window.socket.id)return;$(`.item[data-uid='${html_encode(t.uid)}'] .item-name`).html(html_encode(truncate_filename(t.name,TRUNCATE_LENGTH)).replaceAll(" "," "));const e=t.is_dir?window.icons["folder.svg"]:(await item_icon(t)).image;$(`.item[data-uid='${t.uid}']`).find(".item-icon-thumb").attr("src",e),$(`.item[data-uid='${t.uid}']`).find(".item-icon-icon").attr("src",e),$(`.item[data-uid='${t.uid}']`).attr("data-name",html_encode(t.name)),$(`.window-${t.uid}`).attr("data-name",html_encode(t.name)),$(`.item[data-uid='${t.uid}']`).attr("title",html_encode(t.name)),$(`.window-${a.uid}`).attr("title",html_encode(t.name)),$(`.item[data-uid='${t.uid}'] .item-name-editor`).val(html_encode(t.name)),$(`.item[data-uid='${t.uid}'] .item-name`).attr("title",html_encode(t.name));const i=t.path;$(`.item[data-uid='${t.uid}']`).attr("data-path",i),$(`.window-${t.uid}`).attr("data-path",i),$(`[data-path="${html_encode(t.old_path)}" i]`).each((function(){$(this).attr("data-path",i),$(this).hasClass("window-navbar-path-dirname")&&$(this).text(t.name)})),$(`[data-path^="${html_encode(t.old_path)+"/"}"]`).each((function(){const e=_.replace($(this).attr("data-path"),t.old_path+"/",i+"/");$(this).attr("data-path",e)})),$(`.window-${t.uid}`).each((function(){update_window_path(this,i)})),$(`.window-${t.uid} .window-head-title`).text(t.name),$(`.item[data-uid='${t.uid}']`).parent(".item-container").each((function(){sort_items(this,$(this).closest(".item-container").attr("data-sort_by"),$(this).closest(".item-container").attr("data-sort_order"))}))})),socket.on("item.moved",(async e=>{let a=e;if(sendItemChangeEventToWatchingApps(a.uid,{event:"moved",uid:a.uid,name:a.name}),e.original_client_socket_id===window.socket.id)return;let i=t.A.dirname(a.path),n=a.metadata;a.path=a.path,$(`.item[data-shortcut_to_path="${html_encode(e.old_path)}" i]`).attr("data-shortcut_to_path",html_encode(a.path)),$(`.item[data-uid='${a.uid}']`).fadeOut(150,(function(){let t=$(`.item[data-uid='${a.uid}']`).closest(".window");$(this).removeItems(),$(t).each((function(t){update_explorer_footer_item_count(this),update_explorer_footer_selected_items_count(this)}))})),i===trash_path?($(`.window[data-path="${html_encode(e.old_path)}" i]`).close(),$(`.window[data-path^="${html_encode(e.old_path)}/"]`).close()):$(`.window[data-path^="${html_encode(e.old_path)}/"], .window[data-path="${html_encode(e.old_path)}" i]`).each((function(){update_window_path(this,$(this).attr("data-path").replace(e.old_path,a.path))})),i===trash_path&&($(`.item[data-uid="${a.uid}"]`).find(".item-is-shared").fadeOut(300),a.is_dir&&($(`.mywebsites-dir-path[data-uuid="${a.uid}"]`).remove(),$(`.item[data-uid="${a.uid}"]`).find(".item-has-website-badge").fadeOut(300))),void 0!==a.overwritten_uid&&$(`.item[data-uid=${a.overwritten_uid}]`).removeItems(),a.name=n&&n.original_name?n.original_name:a.name,(0,o.A)({appendTo:$(`.item-container[data-path='${html_encode(i)}' i]`),immutable:a.immutable,uid:a.uid,path:a.path,icon:await item_icon(a),name:i===trash_path?n.original_name:a.name,is_dir:a.is_dir,size:a.size,type:a.type,modified:a.modified,is_selected:!1,is_shared:i!==trash_path&&a.is_shared,is_shortcut:a.is_shortcut,shortcut_to:a.shortcut_to,shortcut_to_path:a.shortcut_to_path,metadata:JSON.stringify(a.metadata)??""}),a.parent_dirs_created&&a.parent_dirs_created.length>0&&a.parent_dirs_created.forEach((async e=>{let a=$(`.item-container[data-path='${html_encode(t.A.dirname(e.path))}' i]`);a.length>0&&0===$(`.item[data-path="${html_encode(e.path)}" i]`).length&&(0,o.A)({appendTo:a,immutable:!1,uid:e.uid,path:e.path,icon:await item_icon(e),name:e.name,size:e.size,type:e.type,modified:e.modified,is_dir:!0,is_selected:!1,is_shared:e.is_shared,has_website:!1}),sort_items(a,$(a).attr("data-sort_by"),$(a).attr("data-sort_order"))})),$(`.item-container[data-path='${html_encode(i)}' i]`).each((function(){sort_items(this,$(this).attr("data-sort_by"),$(this).attr("data-sort_order"))}))})),socket.on("user.email_confirmed",(t=>{t.original_client_socket_id!==window.socket.id&&refresh_user_data(window.auth_token)})),socket.on("item.renamed",(async t=>{if(sendItemChangeEventToWatchingApps(t.uid,{event:"rename",uid:t.uid,new_name:t.name}),t.original_client_socket_id===window.socket.id)return;$(`.item[data-uid='${html_encode(t.uid)}'] .item-name`).html(html_encode(truncate_filename(t.name,TRUNCATE_LENGTH)).replaceAll(" "," "));const e=t.is_dir?window.icons["folder.svg"]:(await item_icon(t)).image;$(`.item[data-uid='${t.uid}']`).find(".item-icon-icon").attr("src",e),$(`.item[data-uid='${t.uid}']`).attr("data-name",html_encode(t.name)),$(`.window-${t.uid}`).attr("data-name",html_encode(t.name)),$(`.item[data-uid='${t.uid}']`).attr("title",html_encode(t.name)),$(`.window-${a.uid}`).attr("title",html_encode(t.name)),$(`.item[data-uid='${t.uid}'] .item-name-editor`).val(html_encode(t.name)),$(`.item[data-uid='${t.uid}'] .item-name`).attr("title",html_encode(t.name));const i=t.path;$(`.item[data-uid='${t.uid}']`).attr("data-path",i),$(`.window-${t.uid}`).attr("data-path",i),$(`[data-path="${html_encode(t.old_path)}" i]`).each((function(){$(this).attr("data-path",i),$(this).hasClass("window-navbar-path-dirname")&&$(this).text(t.name)})),$(`[data-path^="${html_encode(t.old_path)+"/"}"]`).each((function(){const e=_.replace($(this).attr("data-path"),t.old_path+"/",i+"/");$(this).attr("data-path",e)})),$(`.window-${t.uid}`).each((function(){update_window_path(this,i)})),$(`.window-${t.uid} .window-head-title`).text(t.name),$(`.item[data-uid='${t.uid}']`).parent(".item-container").each((function(){sort_items(this,$(this).closest(".item-container").attr("data-sort_by"),$(this).closest(".item-container").attr("data-sort_order"))}))})),socket.on("item.added",(async t=>{if(!_.isEmpty(t)&&(sendItemChangeEventToWatchingApps(t.uid,{event:"write",uid:t.uid,new_size:t.size,modified:t.modified}),t.original_client_socket_id!==window.socket.id))if(t.overwritten_uid){$(`.item[data-uid='${t.overwritten_uid}']`).attr({"data-immutable":t.immutable,"data-path":t.path,"data-name":t.name,"data-size":t.size,"data-modified":t.modified,"data-is_shared":t.is_shared,"data-type":t.type});const e=t.is_dir?window.icons["folder.svg"]:(await item_icon(t)).image;$(`.item[data-uid="${t.overwritten_uid}"]`).find(".item-icon > img").attr("src",e),$(`.item-container[data-path='${html_encode(t.dirpath)}' i]`).each((function(){sort_items(this,$(this).attr("data-sort_by"),$(this).attr("data-sort_order"))}))}else(0,o.A)({appendTo:$(`.item-container[data-path='${html_encode(t.dirpath)}' i]`),uid:t.uid,immutable:t.immutable,associated_app_name:t.associated_app?.name,path:t.path,icon:await item_icon(t),name:t.name,size:t.size,type:t.type,modified:t.modified,is_dir:t.is_dir,is_shared:t.is_shared,is_shortcut:t.is_shortcut,associated_app_name:t.associated_app?.name,shortcut_to:t.shortcut_to,shortcut_to_path:t.shortcut_to_path}),$(`.item-container[data-path='${html_encode(t.dirpath)}' i]`).each((function(){sort_items(this,$(this).attr("data-sort_by"),$(this).attr("data-sort_order"))}))})),s+='
    \n \n \n \n
    ',s+='
    ',s+=`
    `,s+="
    ",getItem({key:"window_sidebar_width",success:async function(t){let e=parseInt(t.value);!isNaN(e)&&e>0&&(window.window_sidebar_width=e)}}),url_query_params.has("ref")&&window.history.pushState(null,document.title,"/"),$("body").append(s),$(".desktop").css("height",`calc(100vh - ${window.taskbar_height+window.toolbar_height}px)`),async function(t){global_element_id++,(t=t??{}).content=t.content??"",$.ajax({url:api_origin+"/get-launch-apps",type:"GET",async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},success:function(t){window.launch_apps=t}});let e="";if(e+=`
    `,$(".desktop").append(e),(0,m.A)({icon:window.icons["start.svg"],name:"Start",sortable:!1,keep_in_taskbar:!0,disable_context_menu:!0,onClick:async function(t){if($(t).hasClass("has-open-popover"))return;let e=(0,p.A)({content:'
    ',snapToElement:t,parent_element:t,width:500,height:500,center_horizontally:!0});launch_apps&&launch_apps.recent&&0!==launch_apps.recent.length||(launch_apps=await $.ajax({url:api_origin+"/get-launch-apps",type:"GET",async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token}}));let a="";if(a+='
    ',a+=``,a+=``,a+="
    ",launch_apps.recent.length>0){a+='

    Recent

    ',a+='
    ';for(let t=0;t`,a+=`
    `,a+=``,a+=`${html_encode(e.title)}`,a+="
    ",a+="
    "}a+="
    "}if(launch_apps.recommended.length>0){a+=`

    Recommended

    `,a+='"}a+="
    "}$(e).find(".launch-popover").append(a),isMobile.phone||$(e).find(".launch-search").focus(),$(e).find(".start-app").draggable({appendTo:"body",helper:"clone",revert:"invalid",connectToSortable:".taskbar",zIndex:parseInt($(e).css("z-index"))+1,scroll:!1,distance:5,revertDuration:100,helper:"clone",cursorAt:{left:18,top:20},start:function(t,e){},drag:function(t,e){},stop:function(){}})}}),(0,m.A)({icon:window.icons["folders.svg"],app:"explorer",name:"Explorer",sortable:!1,keep_in_taskbar:!0,lock_keep_in_taskbar:!0,onClick:function(){if(0!==parseInt($('.taskbar-item[data-app="explorer"]').attr("data-open-windows")))return!1;launch_app({name:"explorer",path:window.home_path})}}),window.user.taskbar_items&&window.user.taskbar_items.length>0)for(let t=0;t0||(a.dataTransfer?.items?.length>0&&upload_items(a.dataTransfer.items,desktop_path),a.stopPropagation(),a.preventDefault()),!1}}),$(d).droppable({accept:".item",tolerance:"intersect",drop:function(e,a){if(void 0!==mouseover_window)return;if(!$(a.draggable).hasClass("item"))return;if(t.A.dirname($(a.draggable).attr("data-path"))===desktop_path&&!e.ctrlKey)return;if(e.ctrlKey&&t.A.dirname($(a.draggable).attr("data-path"))===window.trash_path)return;$(d).children(".item-selected").removeClass("item-selected");const i=[];i.push(a.draggable);const n=document.getElementsByClassName("item-selected-clone");for(let t=0;t0),onClick:function(){"copy"===clipboard_op?copy_clipboard_items(desktop_path,d):"move"===clipboard_op&&move_clipboard_items(d)}},{html:"Upload Here",onClick:function(){init_upload_using_dialog(d)}},"-",{html:"Change Desktop Background…",onClick:function(){!async function(){new Promise((async t=>{let a="";const i=$("body").attr("style");let n=window.desktop_bg_url,o=window.desktop_bg_color,s=window.desktop_bg_fit;a+='
    ',a+="",a+='",a+='
    ',a+="",a+='',a+='',a+='",a+="
    ",a+='
    ',a+="",a+='
    ',a+='
    ',a+='
    ',a+='
    ',a+='
    ',a+='
    ',a+='
    ',a+='
    ',a+='
    ',a+=`
    `,a+="
    ",a+="
    ",a+='
    ',a+='',a+='',a+="
    ",a+="
    ";const d=await(0,e.A)({title:"Change Desktop Background…",icon:null,uid:null,is_dir:!1,body_content:a,draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!0,allow_user_select:!0,onAppend:function(t){$(t).find(".access-recipient").focus()},window_class:"window-give-access",width:350,window_css:{height:"initial"},body_css:{width:"initial",height:"100%","background-color":"rgb(245 247 249)","backdrop-filter":"blur(3px)"}});void 0!==window.desktop_bg_url&&null!==window.desktop_bg_url?($(d).find(".desktop-bg-settings-wrapper").hide(),$(d).find(".desktop-bg-settings-picture").show(),$(d).find(".desktop-bg-type").val("picture")):void 0!==window.desktop_bg_color&&null!==window.desktop_bg_color?($(d).find(".desktop-bg-settings-wrapper").hide(),$(d).find(".desktop-bg-settings-color").show(),$(d).find(".desktop-bg-type").val("color")):($(d).find(".desktop-bg-settings-wrapper").hide(),$(d).find(".desktop-bg-settings-picture").show(),$(d).find(".desktop-bg-type").val("picture")),$(d).find(".desktop-bg-color-block:not(.desktop-bg-color-block-palette").on("click",(async function(t){window.set_desktop_background({color:$(this).attr("data-color")})})),$(d).find(".desktop-bg-color-block-palette input").on("change",(async function(t){window.set_desktop_background({color:$(this).val()})})),$(d).on("file_opened",(function(t){let e=Array.isArray(t.detail)?t.detail[0]:t.detail;const a=$(d).find(".desktop-bg-fit").val();n=e.read_url,s=a,o=void 0,window.set_desktop_background({url:n,fit:s})})),$(d).find(".desktop-bg-fit").on("change",(function(t){const e=$(this).val();s=e,window.set_desktop_background({fit:e})})),$(d).find(".desktop-bg-type").on("change",(function(t){const e=$(this).val();"picture"===e?($(d).find(".desktop-bg-settings-wrapper").hide(),$(d).find(".desktop-bg-settings-picture").show()):"color"===e&&($(d).find(".desktop-bg-settings-wrapper").hide(),$(d).find(".desktop-bg-settings-color").show())})),$(d).find(".apply").on("click",(async function(e){try{$.ajax({url:api_origin+"/set-desktop-bg",type:"POST",data:JSON.stringify({url:window.desktop_bg_url,color:window.desktop_bg_color,fit:window.desktop_bg_fit}),async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}}}),$(d).close(),t(!0)}catch(t){}})),$(d).find(".browse").on("click",(function(){(0,e.A)({path:"/"+window.user.username+"/Desktop",parent_uuid:$(d).attr("data-element_uuid"),allowed_file_types:["image/*"],show_maximize_button:!1,show_minimize_button:!1,title:"Open",is_dir:!0,is_openFileDialog:!0,selectable_body:!1})})),$(d).find(".cancel").on("click",(function(){$("body").attr("style",i),$(d).close(),t(!0)}))}))}()}}]}))})),is_embedded||window.is_fullpage_mode||(refresh_item_container(d,{fadeInItems:!0}),window.launch_download_from_url()),!isMobile.phone&&!isMobile.tablet){let t=[];const e=new SelectionArea({selectionContainerClass:".selection-area-container",container:".desktop",selectables:[".desktop.item-container > .item"],startareas:[".desktop"],boundaries:[".desktop"],behaviour:{overlap:"drop",intersect:"touch",startThreshold:10,scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:0,y:0}}},features:{touch:!0,range:!0,singleTap:{allow:!0,intersect:"native"}}});e.on("beforestart",(({event:e})=>(t=[],$(e.target).hasClass("item-container")))).on("beforedrag",(t=>{})).on("start",(({store:t,event:a})=>{if(!a.ctrlKey&&!a.metaKey){for(const e of t.stored)e.classList.remove("item-selected");e.clearSelection()}})).on("move",(({store:{changed:{added:e,removed:a}},event:i})=>{for(const a of e)(i.ctrlKey||i.metaKey)&&$(a).hasClass("item-selected")?(a.classList.remove("item-selected"),t.push(a)):a.classList.add("item-selected");for(const e of a)e.classList.remove("item-selected"),t.includes(e)&&$(e).not(".item-disabled").addClass("item-selected")})).on("stop",(t=>{}))}let r="";if(r+=`
    `,r+=``,r+=`",window.is_fullpage_mode&&(r+='Open Desktop'),user.referral_code&&(r+=`
    `),isMobile.phone||(r+=`
    `),is_embedded||(r+=`
    `),r+=`
    `,s+=`${window.user.username}`,r+="
    ",r+="
    ",$(r).insertBefore(d),$(".window-container").css("top",window.toolbar_height),url_query_params.has("app")){if("explorer"===url_query_params.get("app")){let a=home_path;url_query_params.has("path")&&(a=url_query_params.get("path")),(0,e.A)({path:a,title:t.A.basename(a),icon:await item_icon({is_dir:!0,path:a}),is_dir:!0,app:"explorer"})}}else if(window.app_launched_from_url){let t=new URLSearchParams(window.location.search);t.has("c")||launch_app({name:app_launched_from_url,readURL:t.get("readURL"),maximized:t.get("maximized"),is_fullpage:window.is_fullpage_mode,window_options:{stay_on_top:!1}})}$(d).on("mousedown touchstart",(function(t){("taphold"!==t.type||isMobile.phone||isMobile.tablet)&&($(".window-app-iframe").css("pointer-events","none"),$(".window").find(".item-selected").addClass("item-blurred"),$(".desktop").find(".item-blurred").removeClass("item-blurred"))})),$(d).on("click",(function(t){$(".window-active").removeClass("window-active")})),setInterval((function(){var t=new Date,e=t.getHours()>=12?" PM":" AM";let a=t.getHours()%12;a=a||12,a=1==a.toString().length?0+a.toString():a;var i=t.getMinutes().toString();i=1==i.length?0+i:i;var n=t.getSeconds().toString();n=1==n.length?0+n:n;var o=(t.getMonth()+1).toString();o=1==o.length?0+o:o;var s=t.getDate().toString(),d=o+"/"+(s=1==s.length?0+s:s)+"/"+t.getFullYear();d=d+" - "+a+":"+i+":"+n+" "+e,$("#clock").html(d),$("#clock").css("line-height",taskbar_height+"px")}),1e3),window.show_referral_notice&&!user.email_confirmed&&getItem({key:"shown_referral_notice",success:async function(t){t||(setTimeout((()=>{!async function(t){let a="";a+="
    ",a+='
    ×
    ',a+=``,a+='

    You have been referred to Puter by a friend!

    ',a+='

    Create an account and confirm your email address to receive 1 GB of free storage. Your friend will get 1 GB of free storage too.

    ',a+='',a+="
    ";const n=await(0,e.A)({title:"Refer a friend!",icon:null,uid:null,is_dir:!1,body_content:a,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_draggable:!0,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!0,allow_user_select:!0,onAppend:function(t){},width:400,dominant:!0,window_css:{height:"initial"},body_css:{padding:"10px",width:"initial","max-height":"calc(100vh - 200px)","background-color":"rgb(241 246 251)","backdrop-filter":"blur(3px)",padding:"10px 20px 20px 20px",height:"initial"}});$(n).find(".create-account-ref-btn").on("click",(function(t){(0,i.A)(),$(n).close()}))}()}),1e3),setItem({key:"shown_referral_notice",value:!0}))}})};var h=a(585);var w=a(177);const g=async function(t){return(t=t??{}).reload_on_success=t.reload_on_success??!0,new Promise((async a=>{let i="";i+='
    ',i+='
    Signing in...
    ',i+='
    ',i+=`

    Sign in with Puter

    `;for(let t=0;t${e.username}
    `}i+="
    ",i+='
    ',i+="";const n=await(0,e.A)({title:"Session List!",app:"session-list",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:i,has_head:!1,selectable_body:!1,draggable_body:t.draggable_body??!0,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,width:350,height:"auto",dominant:!0,show_in_taskbar:!1,update_window_url:!1,cover_page:t.cover_page??!1,onAppend:function(t){},window_class:"window-session-list",body_css:{width:"initial",height:"100%","background-color":"rgb(245 247 249)","backdrop-filter":"blur(3px)",display:"flex","flex-direction":"column","justify-content":"center"}});$(n).find(".login-c2a-session-list").on("click",(async function(e){const i=await(0,c.A)({referrer:t.referrer,reload_on_success:t.reload_on_success,window_options:t.window_options,cover_page:t.cover_page??!1,has_head:t.has_head,send_confirmation_code:t.send_confirmation_code,window_options:{has_head:!1,cover_page:t.cover_page??!1}});i&&(t.reload_on_success?(window.onbeforeunload=null,location.reload()):a(i))})),$(n).find(".signup-c2a-session-list").on("click",(async function(e){$(".signup-c2a-clickable").parents(".window").close();const i=await(0,h.A)({referrer:t.referrer,reload_on_success:t.reload_on_success,window_options:t.window_options,send_confirmation_code:t.send_confirmation_code,window_options:{has_head:!1,cover_page:t.cover_page??!1}});i&&(t.reload_on_success?(window.onbeforeunload=null,location.reload()):a(i))})),$(n).find(".session-entry").on("click",(function(e){$(n).find(".loading").css({display:"flex"}),setTimeout((()=>{let e,i=$(this).attr("data-uuid");for(let t=0;t'),$("head").append(''),window.url_query_params=new URLSearchParams(window.location.search);const o=window.location.pathname.split("/").filter((t=>t));let d;if("app"===o[0]?.toLocaleLowerCase()&&o[1]&&(window.app_launched_from_url=o[1]),"action"===o[0]?.toLocaleLowerCase()&&o[1]&&(d=o[1].toLowerCase()),!url_query_params.has("puter.fullpage")||"false"!==url_query_params.get("puter.fullpage")&&"0"!==url_query_params.get("puter.fullpage")?!url_query_params.has("puter.fullpage")||"true"!==url_query_params.get("puter.fullpage")&&"1"!==url_query_params.get("puter.fullpage")||(window.taskbar_height=0,window.is_fullpage_mode=!0):window.is_fullpage_mode=!1,url_query_params.has("embedded_in_popup")&&("true"===url_query_params.get("embedded_in_popup")||"1"===url_query_params.get("embedded_in_popup"))){if(window.embedded_in_popup=!0,$("body").addClass("embedded-in-popup"),window.openerOrigin=document.referrer,!document.referrer)try{openerOrigin=await new Promise(((t,e)=>{if(!window.opener)return void e(new Error("No window.opener available"));const a=e=>{"originResponse"===e.data.msg&&(window.removeEventListener("message",a),t(e.origin))};window.addEventListener("message",a,!1),window.opener.postMessage({msg:"requestOrigin"},"*"),setTimeout((()=>{window.removeEventListener("message",a),e(new Error("Response timed out"))}),5e3)}))}catch(t){throw new Error("No referrer found")}window.referrerStr=openerOrigin,"sign-in"!==d||is_auth()?"sign-in"===d&&is_auth()&&await g({reload_on_success:!1,draggable_body:!1,has_head:!1,cover_page:!0})&&await getUserAppToken(openerOrigin):await(0,h.A)({reload_on_success:!1,send_confirmation_code:!1,show_close_button:!1,window_options:{has_head:!1,cover_page:!0}})&&await getUserAppToken(openerOrigin)}if(url_query_params.has("r")&&(window.referral_code=url_query_params.get("r"),window.history.pushState(null,document.title,"/"),window.first_visit_ever&&(window.show_referral_notice=!0)),"request-permission"===d){let t=url_query_params.get("app_uid"),e=openerOrigin??url_query_params.get("origin"),a=url_query_params.get("permission"),i=await(0,f.A)({app_uid:t,origin:e,permission:a});(embedded_in_popup?window.opener:window.parent).postMessage({msg:"permissionGranted",granted:i},e)}else if("set-new-password"===d){let t=url_query_params.get("user"),a=url_query_params.get("token");await async function(t){return new Promise((async a=>{t=t??{};const i=window.uuidv4();let n="";n+='
    ',n+='
    ',n+='
    ',n+='
    ',n+=``,n+=``,n+="
    ",n+='
    ',n+=``,n+=``,n+="
    ",n+='',n+="
    ";const o=await(0,e.A)({title:"Set New Password",app:"change-passowrd",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:n,draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,width:350,height:"auto",dominant:!0,show_in_taskbar:!1,onAppend:function(t){$(t).find(".new-password").get(0)?.focus({preventScroll:!0})},window_class:"window-publishWebsite",body_css:{width:"initial",height:"100%","background-color":"rgb(245 247 249)","backdrop-filter":"blur(3px)"}});$(o).find(".change-password-btn").on("click",(function(e){const a=$(o).find(".new-password").val(),i=$(o).find(".confirm-new-password").val();return""===a||""===i?($(o).find(".form-error-msg").html("All fields are required."),void $(o).find(".form-error-msg").fadeIn()):a!==i?($(o).find(".form-error-msg").html("`New Password` and `Confirm New Password` do not match."),void $(o).find(".form-error-msg").fadeIn()):($(o).find(".form-error-msg").hide(),void $.ajax({url:api_origin+"/set-pass-using-token",type:"POST",async:!0,contentType:"application/json",data:JSON.stringify({password:a,token:t.token,user_id:t.user}),success:async function(t){$(o).close(),await(0,s.A)({message:"Password changed successfully.",body_icon:window.icons["c-check.svg"],stay_on_top:!0,backdrop:!0,buttons:[{label:"Proceed to Login",type:"primary"}],window_options:{backdrop:!0,close_on_backdrop_click:!1}}),await(0,c.A)({reload_on_success:!0,window_options:{has_head:!1}})},error:function(t){$(o).find(".form-error-msg").html(t.responseText),$(o).find(".form-error-msg").fadeIn()}}))}))}))}({user:t,token:a})}else"change-username"===d?await l():"login"===d?await(0,c.A)():"signup"===d&&await(0,h.A)();if(window.embedded_in_popup&&openerOrigin){let t=await checkUserSiteRelationship(openerOrigin);window.userAppToken=t.token,logged_in_users.length>0&&(!userAppToken||url_query_params.get("request_auth"))&&await g({reload_on_success:!1,draggable_body:!1,has_head:!1,cover_page:!0}),"show-open-file-picker"!==d&&"show-save-file-picker"!==d&&"show-directory-picker"!==d||userAppToken||!1===await async function(t){return new Promise((async t=>{let a="";a+='
    \n \n

    This website uses Puter to bring you safe, secure, and private AI and Cloud features.

    \n
    \n \n \n
    \n

    Powered by Puter.js

    \n

    By clicking \'Continue\' you agree to Puter\'s Terms of Service and Privacy Policy.

    \n
    ';const i=await(0,e.A)({title:"Upload",icon:window.icons["app-icon-uploader.svg"],uid:null,is_dir:!1,body_content:'
    \n \n

    This website uses Puter to bring you safe, secure, and private AI and Cloud features.

    \n
    \n \n \n
    \n

    Powered by Puter.js

    \n

    By clicking \'Continue\' you agree to Puter\'s Terms of Service and Privacy Policy.

    \n
    ',draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,window_class:"window-puter-dialog window-cover-page",width:"100%",top:"0",dominant:!0,window_css:{height:"100%",width:"100%",top:"0 !important",left:"0 !important"},body_css:{padding:"22px",width:"initial","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});$(i).find("#launch-auth-popup").on("click submit",(function(e){$(i).close(),t(!0)})),$(i).find("#launch-auth-popup-cancel").on("click submit",(function(e){$(i).close(),t(!1)}))}))}()&&(is_auth()||(window.first_visit_ever=!1,localStorage.removeItem("has_visited_before",!0)),window.close(),window.open("","_self").close())}else if(url_query_params.has("auth_token")){let t=url_query_params.get("auth_token");try{a=await puter.os.user()}catch(t){if(401===t.status)return void logout()}if(a){if(a.requires_email_confirmation){let t;do{t=await(0,w.A)({stay_on_top:!0,has_head:!1})}while(!t)}window.first_visit_ever=!1,async function(t){new Promise((async a=>{let i="";i+='";const n=await(0,e.A)({title:"Instant Login!",app:"change-passowrd",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:i,draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,width:350,height:"auto",dominant:!0,show_in_taskbar:!1,backdrop:!0,stay_on_top:!0,onAppend:function(t){},window_class:"window-login-progress",body_css:{width:"initial",height:"100%","background-color":"rgb(245 247 249)","backdrop-filter":"blur(3px)"}});setTimeout((()=>{$(n).close()}),3e3)}))}({user_info:a}),update_auth_data(t,a)}window.history.pushState(null,document.title,"/")}if(is_auth()){if(!a)try{a=await puter.os.user()}catch(t){if(401===t.status)return void logout()}if(a){if(a.requires_email_confirmation){let t;do{t=await(0,w.A)({stay_on_top:!0,has_head:!1})}while(!t)}if(update_auth_data(window.auth_token,a),window.embedded_in_popup){let a,i=url_query_params.get("msg_id");try{let t=await getUserAppToken(new URL(openerOrigin).origin);window.host_app_uid=t.app_uid,window.opener.postMessage({msg:"puter.token",success:!0,token:t.token,app_uid:t.app_uid,username:user.username,msg_id:i},openerOrigin),d&&"sign-in"!==d||(window.close(),window.open("","_self").close())}catch(t){window.opener.postMessage({msg:"puter.token",success:!1,token:null,msg_id:i},openerOrigin),window.close(),window.open("","_self").close()}if(openerOrigin&&(a=await getAppUIDFromOrigin(openerOrigin),window.host_app_uid=a),"show-open-file-picker"===d){let t=url_query_params.get("options");t=JSON.parse(t??"{}"),(0,e.A)({allowed_file_types:t?.accept,selectable_body:t?.multiple,path:"/"+window.user.username+"/Desktop",return_to_parent_window:!0,show_maximize_button:!1,show_minimize_button:!1,title:"Open",is_dir:!0,is_openFileDialog:!0,is_resizable:!1,has_head:!1,cover_page:!0,iframe_msg_uid:i,center:!0,initiating_app_uuid:a,on_close:function(){window.opener.postMessage({msg:"fileOpenCanceled",original_msg_id:i},"*")}})}else if("show-directory-picker"===d)(0,e.A)({path:"/"+window.user.username+"/Desktop",return_to_parent_window:!0,show_maximize_button:!1,show_minimize_button:!1,title:"Open",is_dir:!0,is_directoryPicker:!0,is_resizable:!1,has_head:!1,cover_page:!0,iframe_msg_uid:i,center:!0,initiating_app_uuid:a,on_close:function(){window.opener.postMessage({msg:"directoryOpenCanceled",original_msg_id:i},"*")}});else if("show-save-file-picker"===d){let n=url_query_params.get("allowed_file_types");window.opener.postMessage({msg:"sendMeFileData"},"*"),window.addEventListener("message",(async o=>{"showSaveFilePickerPopup"===o.data.msg&&(0,e.A)({allowed_file_types:n,path:"/"+window.user.username+"/Desktop",return_to_parent_window:!0,show_maximize_button:!1,show_minimize_button:!1,title:"Save",is_dir:!0,is_saveFileDialog:!0,is_resizable:!1,has_head:!1,cover_page:!0,iframe_msg_uid:i,center:!0,initiating_app_uuid:a,on_close:function(){window.opener.postMessage({msg:"fileSaveCanceled",original_msg_id:i},"*")},onSaveFileDialogSave:async function(e,n){$(n).find(".window-disable-mask, .busy-indicator").show();let d=Date.now(),r=!1,l=new File([o.data.content],t.A.basename(e)),c=!0;for(;c;){r&&(c=!1);try{const t=await puter.fs.write(e,l,{dedupeName:!1,overwrite:r});let n=await puter.fs.sign(a,{uid:t.uid,action:"write"});n=n.items,c=!1,window.opener.postMessage({msg:"fileSaved",original_msg_id:i,filename:t.name,saved_file:{name:n.fsentry_name,readURL:n.read_url,writeURL:n.write_url,metadataURL:n.metadata_url,type:n.type,uid:n.uid,path:"~/"+t.path.split("/").slice(2).join("/")}},"*"),window.close(),window.open("","_self").close()}catch(t){if("item_with_same_name_exists"!==t.code)return console.log(t),await(0,s.A)({message:t.message??"Upload failed.",parent_uuid:$(n).attr("data-element_uuid")}),void $(n).find(".window-disable-mask, .busy-indicator").hide();{const e=await(0,s.A)({message:`${html_encode(t.entry_name)} already exists.`,buttons:[{label:"Replace",value:"replace",type:"primary"},{label:"Cancel",value:"cancel"}],parent_uuid:$(n).attr("data-element_uuid")});if("replace"===e)r=!0;else if("cancel"===e)return void $(n).find(".window-disable-mask, .busy-indicator").hide()}}}let p=Date.now()-d;p>=busy_indicator_hide_delay?$(n).close():setTimeout((()=>{$(n).close()}),Math.abs(busy_indicator_hide_delay-p))}})}))}}else puter.fs.stat(desktop_path,(async function(t){u({desktop_fsentry:t})}));update_sites_cache()}}if(window.is_fullpage_mode||window.embedded_in_popup||refresh_desktop_background(),is_auth()||first_visit_ever){if(!is_auth()&&first_visit_ever){let t;try{t=new URL(window.location.href).pathname}catch(t){console.log(t)}t=window.openerOrigin??t,window.referrerStr=t,url_query_params.has("ref")&&(t||(t="/"),t+="?ref="+html_encode(url_query_params.get("ref")));let e={};window.custom_headers&&(e=window.custom_headers),$.ajax({url:gui_origin+"/signup",type:"POST",async:!0,headers:e,contentType:"application/json",data:JSON.stringify({referrer:t,referral_code:window.referral_code,is_temp:!0}),success:async function(t){update_auth_data(t.token,t.user),document.dispatchEvent(new Event("login",{bubbles:!0}))},error:function(t){$("#signup-error-msg").html(t.responseText),$("#signup-error-msg").fadeIn(),$(".signup-btn").prop("disabled",!1)}})}}else logged_in_users.length>0?g():await(0,c.A)({reload_on_success:!0,send_confirmation_code:!1,window_options:{has_head:!1}});feature_flags.prompt_user_when_navigation_away_from_puter&&(window.onbeforeunload=function(){if($('.window:not(.window[data-app="explorer"])').length>0)return!0}),$(document).on("login",(async a=>{if($(".window").close(),window.embedded_in_popup){let a,i=url_query_params.get("msg_id");try{let t=await getUserAppToken(new URL(openerOrigin).origin);window.host_app_uid=t.app_uid,window.opener.postMessage({msg:"puter.token",success:!0,msg_id:i,token:t.token,username:user.username,app_uid:t.app_uid},openerOrigin),d&&"sign-in"!==d||(window.close(),window.open("","_self").close())}catch(t){window.opener.postMessage({msg:"puter.token",msg_id:i,success:!1,token:null},openerOrigin),window.close(),window.open("","_self").close()}if(openerOrigin&&(a=await getAppUIDFromOrigin(openerOrigin),window.host_app_uid=a),"show-open-file-picker"===d){let t=url_query_params.get("options");t=JSON.parse(t??"{}"),(0,e.A)({allowed_file_types:t?.accept,selectable_body:t?.multiple,path:"/"+window.user.username+"/Desktop",return_to_parent_window:!0,show_maximize_button:!1,show_minimize_button:!1,title:"Open",is_dir:!0,is_openFileDialog:!0,is_resizable:!1,has_head:!1,cover_page:!0,iframe_msg_uid:i,center:!0,initiating_app_uuid:a,on_close:function(){window.opener.postMessage({msg:"fileOpenCanceled",original_msg_id:i},"*")}})}else if("show-directory-picker"===d)(0,e.A)({path:"/"+window.user.username+"/Desktop",return_to_parent_window:!0,show_maximize_button:!1,show_minimize_button:!1,title:"Open",is_dir:!0,is_directoryPicker:!0,is_resizable:!1,has_head:!1,cover_page:!0,iframe_msg_uid:i,center:!0,initiating_app_uuid:a,on_close:function(){window.opener.postMessage({msg:"directoryOpenCanceled",original_msg_id:i},"*")}});else if("show-save-file-picker"===d){let n=url_query_params.get("allowed_file_types");window.opener.postMessage({msg:"sendMeFileData"},"*"),window.addEventListener("message",(async o=>{"showSaveFilePickerPopup"===o.data.msg&&(0,e.A)({allowed_file_types:n,path:"/"+window.user.username+"/Desktop",return_to_parent_window:!0,show_maximize_button:!1,show_minimize_button:!1,title:"Save",is_dir:!0,is_saveFileDialog:!0,is_resizable:!1,has_head:!1,cover_page:!0,iframe_msg_uid:i,center:!0,initiating_app_uuid:a,on_close:function(){window.opener.postMessage({msg:"fileSaveCanceled",original_msg_id:i},"*")},onSaveFileDialogSave:async function(e,n){$(n).find(".window-disable-mask, .busy-indicator").show();let d=Date.now(),r=!1,l=new File([o.data.content],t.A.basename(e)),c=!0;for(;c;){r&&(c=!1);try{const t=await puter.fs.write(e,l,{dedupeName:!1,overwrite:r});let n=await puter.fs.sign(a,{uid:t.uid,action:"write"});n=n.items,c=!1,window.opener.postMessage({msg:"fileSaved",original_msg_id:i,filename:t.name,saved_file:{name:n.fsentry_name,readURL:n.read_url,writeURL:n.write_url,metadataURL:n.metadata_url,type:n.type,uid:n.uid,path:"~/"+t.path.split("/").slice(2).join("/")}},"*"),window.close(),window.open("","_self").close()}catch(t){if("item_with_same_name_exists"!==t.code)return console.log(t),await(0,s.A)({message:t.message??"Upload failed.",parent_uuid:$(n).attr("data-element_uuid")}),void $(n).find(".window-disable-mask, .busy-indicator").hide();{const e=await(0,s.A)({message:`${html_encode(t.entry_name)} already exists.`,buttons:[{label:"Replace",value:"replace",type:"primary"},{label:"Cancel",value:"cancel"}],parent_uuid:$(n).attr("data-element_uuid")});if("replace"===e)r=!0;else if("cancel"===e)return void $(n).find(".window-disable-mask, .busy-indicator").hide()}}}let p=Date.now()-d;p>=busy_indicator_hide_delay?$(n).close():setTimeout((()=>{$(n).close()}),Math.abs(busy_indicator_hide_delay-p))}})}))}}else puter.fs.stat(desktop_path,(function(t){u({desktop_fsentry:t})}))})),$(".popover, .context-menu").on("remove",(function(){$(".window-active .window-app-iframe").css("pointer-events","all")})),$(document).bind("mousedown touchstart",(function(t){if((t=>{if("touchstart"==t.type){var e=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];window.last_touch_x=e.pageX,window.last_touch_y=e.pageY}else"mousedown"==t.type&&(window.last_touch_x=t.clientX,window.last_touch_y=t.clientY)})(t),"touchstart"!==t.type||isMobile.phone||isMobile.tablet){if(!$(t.target).hasClass("item-container")||t.ctrlKey||t.metaKey||($(t.target).children(".item-selected").removeClass("item-selected"),update_explorer_footer_selected_items_count(t.target)),0===$(t.target).parents(".context-menu").length){const t=$(".context-menu");t.fadeOut(200,(function(){t.remove()}))}if($(t.target).hasClass("start-app")||$(t.target).hasClass("launch-search")||$(t.target).hasClass("launch-search-clear")||0!==$(t.target).closest(".start-app").length||isMobile.phone||isMobile.table||$(t.target).hasClass("popover")||0!==$(t.target).parents(".popover").length||$(".popover").fadeOut(200,(function(){$(".popover").remove()})),$(".ui-tooltip").remove(),$(t.target).hasClass("item-name-editor")||$(".item-name-editor-active").blur(),$(t.target).hasClass("item-container"))active_item_container=t.target;else{let e=$(t.target).closest(".item-container");if(e.length>0)active_item_container=e.get(0);else{let e=$(t.target).find(".item-container");e.length>0&&(active_item_container=e.get(0))}}active_element=t.target}})),$(document).bind("keydown",(async function(t){const e=document.activeElement;if(37===t.which||38===t.which||39===t.which||40===t.which){if($(".launch-popover").length>0){if(0===$(".launch-popover .start-app-card.launch-app-selected").length&&40===t.which)return $(".launch-popover .start-app-card:visible").first().addClass("launch-app-selected"),$(".launch-popover .launch-search").blur(),!1;if(!$(".launch-popover .launch-search").is(":focus")||37!==t.which&&39!==t.which){let e,a=$(".launch-popover .start-app-card.launch-app-selected").get(0),i=$(".launch-popover .start-app-card:visible").index(a),n=Math.floor(i/5),o=i%5,s=Math.ceil($(".launch-popover .start-app-card:visible").length/5),d=5,r=i,l=n,c=o;if(38===t.which){if(0===n)return $(".launch-popover .launch-search").focus(),$(".launch-popover .start-app-card.launch-app-selected").removeClass("launch-app-selected"),$(".launch-popover .launch-search").val($(".launch-popover .launch-search").val()),!1;l=n-1,l<0&&(l=s-1)}else 40===t.which?(l=n+1,l>=s&&(l=0)):37===t.which?(c=o-1,c<0&&(c=d-1)):39===t.which&&(c=o+1,c>=d&&(c=0));r=l*d+c,e=$(".launch-popover .start-app-card:visible").get(r),$(a).removeClass("launch-app-selected"),$(e).addClass("launch-app-selected");let p=$(".launch-popover").get(0),m=$(".launch-popover").height(),u=p.getBoundingClientRect().top,h=u+m,w=e.getBoundingClientRect().top,_=e.getBoundingClientRect().bottom;if(!(w>=u&&_<=u+m)){const t=w-u,e=_-h;Math.abs(t)0){if(0===$(".context-menu-active .context-menu-item-active").length&&40===t.which){let t=$(".context-menu-active .context-menu-item").get(0);return select_ctxmenu_item(t),!1}if(0===$(".context-menu-active .context-menu-item-active").length&&38===t.which){let t=$(".context-menu .context-menu-item").get($(".context-menu .context-menu-item").length-1);return select_ctxmenu_item(t),!1}if($(".context-menu-active .context-menu-item-active").length>0&&40===t.which){let t=$(".context-menu-active .context-menu-item-active").get(0),e=$(".context-menu-active .context-menu-item").index(t)+1,a=$(".context-menu-active .context-menu-item").get(e);for(;$(a).hasClass("context-menu-item-disabled");)e+=1,a=$(".context-menu-active .context-menu-item").get(e);return select_ctxmenu_item(a),!1}if($(".context-menu-active .context-menu-item-active").length>0&&38===t.which){let t=$(".context-menu-active .context-menu-item-active").get(0),e=$(".context-menu-active .context-menu-item").index(t)-1,a=$(".context-menu-active .context-menu-item").get(e);for(;$(a).hasClass("context-menu-item-disabled");)e-=1,a=$(".context-menu-active .context-menu-item").get(e);return select_ctxmenu_item(a),!1}if($(".context-menu-active .context-menu-item-active").length>0&&39===t.which){const t=$(".context-menu-active .context-menu-item-active").get(0);return $(t).trigger("mouseover"),!0===$(t).hasClass("context-menu-item-submenu")&&($(t).removeClass("context-menu-item-active"),$(t).addClass("context-menu-item-active-blurred"),select_ctxmenu_item($('.context-menu[data-is-submenu="true"] .context-menu-item').get(0))),!1}if($('.context-menu-active[data-is-submenu="true"]').length>0&&37===t.which){let t=$('.context-menu-active[data-is-submenu="true"]').data("parent-id"),e=$('.context-menu[data-element-id="'+t+'"]');$('.context-menu-active[data-is-submenu="true"]').remove(),$(e).addClass("context-menu-active");let a=$(".context-menu-active .context-menu-item-active-blurred").get(0);return $(a).removeClass("context-menu-item-active-blurred"),$(a).addClass("context-menu-item-active"),!1}if($(".context-menu-active .context-menu-item-active").length>0&&13===t.which){let t=$(".context-menu-active .context-menu-item-active").get(0);return $(t).trigger("click"),!1}}else if(!($(e).is("input")||$(e).is("textarea")||37!==t.which&&38!==t.which&&39!==t.which&&40!==t.which)){let e,a=110,i=110;if(0===$(active_item_container).find(".item-selected").length)return e=$(active_item_container).find(".item").get(0),active_element=e,$(active_item_container).find(".item-selected").removeClass("item-selected"),$(e).addClass("item-selected"),!1;e=1===$(active_item_container).find(".item-selected").length&&t.shiftKey?$(active_item_container).find(".item-selected").get(0):$(active_item_container).find(".item-selected").length>1&&t.shiftKey?$(active_element).hasClass("item")?active_element:$(active_element).closest(".item").get(0):1===$(active_item_container).find(".item-selected").length?$(active_item_container).find(".item-selected").get(0):$(active_element).hasClass("item")?active_element:$(active_element).closest(".item").get(0),(t.ctrlKey||t.metaKey)&&(t.preventDefault(),t.stopPropagation());let n,o,s=$(e).hasClass("item")?e.getBoundingClientRect():$(e).closest(".item").get(0).getBoundingClientRect(),d=s.left+a/2,r=s.top+i/2,l=0,c=0;37===t.which?(n=d-a>0?d-a:0,o=r,l=a/2):38===t.which?(n=d,o=r-i>0?r-i:0,c=i/2*-1):39===t.which?(n=d+a,o=r,l=a/2*-1):40===t.which&&(n=d,o=r+i,c=i/2);let p,m=document.elementsFromPoint(n,o);for(let t=0;t0){if("Delete"===await(0,s.A)({message:"Are you sure you want to permanently delete these items?",buttons:[{label:"Delete",type:"primary"},{label:"Cancel"}]})){for(let e=0;e img").attr("src",window.icons["trash.svg"]),$(`.item[data-path="${html_encode(trash_path)}" i]`).find(".item-icon > img").attr("src",window.icons["trash.svg"]),$(`.window[data-path="${html_encode(trash_path)}"]`).find(".window-head-icon").attr("src",window.icons["trash.svg"]))}}else t=$(active_element).closest(".item-container").find(".item-selected"),t.length>0&&move_items(t,trash_path)}if(!(t.ctrlKey||t.metaKey||$(e).is("input")||$(e).is("textarea")||0!==$(".context-menu").length)){""!==keypress_item_seach_term&&clearTimeout(keypress_item_seach_buffer_timeout),keypress_item_seach_buffer_timeout=setTimeout((()=>{keypress_item_seach_term=""}),700),keypress_item_seach_term+=t.key.toLocaleLowerCase();let e=[];const a=$(active_item_container).find(".item-selected").not(".item-disabled").first();if(1===a.length&&$(a).attr("data-name").toLowerCase().startsWith(keypress_item_seach_term))return!1;let i=$(active_item_container).find(".item").not(".item-disabled");for(let t=0;t0){if(a.length>0&&e.length>1){let t;for(let i=0;i0){""!==keypress_item_seach_term&&clearTimeout(keypress_item_seach_buffer_timeout),keypress_item_seach_buffer_timeout=setTimeout((()=>{keypress_item_seach_term=""}),700),keypress_item_seach_term+=t.key.toLocaleLowerCase();let e=[];const a=$(".context-menu").find(".context-menu-item-active").first();if(1===a.length&&$(a).text().toLowerCase().startsWith(keypress_item_seach_term))return!1;let i=$(".context-menu-active").find(".context-menu-item");for(let t=0;t0){if(a.length>0&&e.length>1){let t;for(let i=0;i0&&(clipboard=[],clipboard_op="copy",t.each((function(){$(this).attr("data-path")!==trash_path&&clipboard.push({path:$(this).attr("data-path"),uid:$(this).attr("data-uid"),metadata:$(this).attr("data-metadata")})})))),!1}if((t.ctrlKey||t.metaKey)&&88===t.which&&!$(e).is("input")&&!$(e).is("textarea")){let t,e=$(active_element).closest(".item-container");return 0===e.length&&(e=$(active_element).find(".item-container")),null!==e&&(t=$(e).find(".item-selected"),t.length>0&&(clipboard=[],clipboard_op="move",t.each((function(){clipboard.push($(this).attr("data-path"))})))),!1}if(13===t.which&&!$(e).is("input")&&!$(e).is("textarea")&&Date.now()-last_enter_pressed_to_rename_ts>200&&"keydown"===t.type){let e;if(t.preventDefault(),t.stopPropagation(),$(".launch-app-selected").length>0)return $(".launch-popover").fadeOut(200,(function(){launch_app({name:$(".launch-app-selected").attr("data-name")}),$(".launch-popover").remove()})),!1;if($(".context-menu-active .context-menu-item-active").length>0&&13===t.which){let t=$(".context-menu-active .context-menu-item-active").get(0);if($(t).removeClass("context-menu-item-active"),$(t).addClass("context-menu-item-active-blurred"),$(t).trigger("mouseover"),$(t).trigger("click"),$('.context-menu[data-is-submenu="true"]').length>0){let t=$('.context-menu[data-is-submenu="true"] .context-menu-item').get(0);select_ctxmenu_item(t)}return!1}return!!active_item_container&&(e=$(active_item_container).find(".item-selected"),e.length>0&&e.each((function(){open_item({item:this,new_window:t.metaKey||t.ctrlKey})})),!1)}if((t.ctrlKey||t.metaKey)&&86===t.which&&!$(e).is("input")&&!$(e).is("textarea")){let t,e;if(0===clipboard.length)return;let a=determine_active_container_parent();if(a){if(e=a,t=$(a).attr("data-path"),(t===trash_path||t.startsWith(trash_path+"/"))&&"move"!==clipboard_op)return;"copy"===clipboard_op?copy_clipboard_items(t):"move"===clipboard_op&&move_clipboard_items(e,t)}return!1}})),$(document).on("click",".remove-permission-link",(async function(t){const e=$(this).attr("data-perm-uid");$.ajax({url:api_origin+"/remove-perm",type:"POST",async:!0,contentType:"application/json",data:JSON.stringify({uid:e}),headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:async function(t){$(`[data-perm-uid="${e}"]`).hide("slide",{direction:"right"},300,(function(t){$(this).remove()}))},complete:function(){}})})),$(document).mousemove((function(t){mouseX=t.clientX,mouseY=t.clientY,mouseX<150&&mouseY=150&&mouseYdesktop_height-150?current_active_snap_zone="sw":mouseX>desktop_width-20&&mouseY>=150&&mouseYdesktop_width-150&&mouseYdesktop_width-20&&mouseY<150?current_active_snap_zone="ne":mouseX>desktop_width-20&&mouseY>=desktop_height-150?current_active_snap_zone="se":mouseY=150&&mouseX0){let t=0;for(let i=0;in.x&&mouseXn.y&&mouseY=t&&(a=e[i],t=parseInt($(e[i]).css("z-index")))}}window.mouseover_window=a;var i=document.getElementsByClassName("item-container");let n;if(i.length>0){let t=0;for(let e=0;ea.x&&mouseXa.y&&mouseY=t&&(n=i[e],t=a)}}}window.mouseover_item_container=n})),$(document).on("mousedown",(function(t){$(t.target).hasClass("taskbar")||$(t.target).closest(".taskbar").length>0||void 0!==mouseover_window&&$(mouseover_window).focusWindow(t)})),$(document).on("mouseenter",".long-hover",(function(){let t=this;t.long_hover_timeout=setTimeout((()=>{$(t).trigger("long-hover")}),600)})),$(document).on("mouseleave",".long-hover",(function(){clearTimeout(this.long_hover_timeout)})),$(document).on("paste",(function(t){let e=(t=t.originalEvent??t).clipboardData||window.clipboardData,a=e.items||e.files;if(!$(t.target).is("input")&&!$(t.target).is("textarea")&&a instanceof DataTransferItemList){if(a?.length>0){let t=determine_active_container_parent();t&&upload_items(a,$(t).attr("data-path"))}return t.stopPropagation(),t.preventDefault(),!1}})),document.addEventListener("visibilitychange",(t=>{"visible"!==document.visibilityState?(window.doc_title_before_blur=document.title,_.isEmpty(window.active_uploads)||(0,b.A)()):window.active_uploads&&(document.title=window.doc_title_before_blur??"Puter")})),$(document).on("logout",(async function(t){if(window.user&&window.user.is_temp){const t=await(0,s.A)({message:"Save account before logging out!

    You are using a temporary account and logging out will erase all your data.

    ",buttons:[{label:"Save Account",type:"primary"},{label:"Log Out",type:"danger"},{label:"Cancel"}]});if("Save Account"===t)await(0,i.A)({send_confirmation_code:!1,default_username:window.user.username})&&logout();else{if("Log Out"!==t)return;logout()}}try{await $.ajax({url:gui_origin+"/logout",type:"POST",async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){}}})}catch(t){}for(let t=0;t{"use strict";var t=a(889);function e(){this._types=Object.create(null),this._extensions=Object.create(null);for(let t=0;t`,e+="
    ",e+='circle anim',e+='
    ',e+='Copying ',e+='',e+="
    ",e+='
    ',e+='
    ',e+="
    ",e+="
    ",e+="";const a=await(0,d.A)({title:"Copying",icon:window.icons["app-icon-copying.svg"],uid:null,is_dir:!1,body_content:e,draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,window_class:"window-copy-progress",width:450,dominant:!0,window_css:{height:"initial"},body_css:{padding:"22px",width:"initial","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});return $(a).find(".copy-cancel-btn").on("click",(function(e){operation_cancelled[t.operation_id]=!0,$(a).close()})),a};var p=a(644),m=a(496),u=a(935);const h=t=>{let e;return e=null===t?"file.svg":t.startsWith("text/plain")?"file-text.svg":t.startsWith("text/html")?"file-html.svg":t.startsWith("text/markdown")?"file-md.svg":t.startsWith("text/xml")?"file-xml.svg":t.startsWith("application/json")?"file-json.svg":t.startsWith("application/javascript")?"file-js.svg":t.startsWith("application/pdf")?"file-pdf.svg":t.startsWith("application/xml")?"file-xml.svg":t.startsWith("application/x-httpd-php")?"file-php.svg":t.startsWith("application/zip")?"file-zip.svg":t.startsWith("text/css")?"file-css.svg":t.startsWith("font/ttf")?"file-ttf.svg":t.startsWith("font/otf")?"file-otf.svg":t.startsWith("text/csv")?"file-csv.svg":t.startsWith("image/svg")?"file-svg.svg":t.startsWith("image/vnd.adobe.photoshop")?"file-psd.svg":t.startsWith("image")?"file-image.svg":t.startsWith("audio/")?"file-audio.svg":t.startsWith("video")?"file-video.svg":"file.svg",window.icons[e]},w=async function(t){let e="";return e+='circle anim',e+=`

    ${(t=t??{}).defaultText??"Preparing..."}

    `,await(0,d.A)({title:"Instant Login!",app:"instant-login",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:e,draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,backdrop:!1,width:460,height:"auto",dominant:!0,show_in_taskbar:!1,draggable_body:!0,onAppend:function(t){},window_class:"window-qr",body_css:{width:"initial",height:"100px","background-color":"rgb(245 247 249)","backdrop-filter":"blur(3px)",display:"flex","flex-direction":"row","justify-content":"center","align-items":"center"}})};function g(t){return encodeURIComponent(t).replace(/[!'()*]/g,(function(t){return"%"+t.charCodeAt(0).toString(16)}))}async function f(t,e=""){let a=[];const i=await puter.fs.readdir(t);for(const n of i){const i=`${t}/${n.name}`;if(n.is_dir){const t=await f(i,`${e}${n.name}/`);a=a.concat(t)}else a.push({path:i,relativePath:`${e}${n.name}`})}return a}window.is_auth=()=>null!==localStorage.getItem("auth_token")&&null!==auth_token,window.suggest_apps_for_fsentry=async t=>await $.ajax({url:api_origin+"/suggest_apps",type:"POST",contentType:"application/json",data:JSON.stringify({uid:t.uid??void 0,path:t.path??void 0}),headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:function(e){t.onSuccess&&"function"==typeof t.onSuccess&&t.onSuccess(e)}}),window.byte_format=t=>{if(0===t)return"0 Byte";const e=parseInt(Math.floor(Math.log(t)/Math.log(1024)));return(t/Math.pow(1024,e)).toFixed(2)+" "+["Bytes","KB","MB","GB","TB"][e]},window.uuidv4=()=>([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))),window.is_email=t=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase()),window.truncate_filename=(e,a)=>{const i=t.A.extname("/"+e);return e.length-15>a?""!==i?e.substring(0,a)+"…"+e.slice(-1*(i.length+2)):e.substring(0,a)+"…":e},window.scrollParentToChild=(t,e)=>{var a=t.getBoundingClientRect(),i=t.clientHeight,n=(t.clientWidth,e.getBoundingClientRect());if(!(n.top>=a.top&&n.bottom<=a.top+i)){const e=n.top-a.top,i=n.bottom-a.bottom;Math.abs(e)1)||"/"!==p&&void 0!==p||"/"!==u&&void 0!==u?n+="([^/]*)":(n+="((?:[^/]*(?:/|$))*)",l++):n+=".*";break;default:n+=a}return r&&~r.indexOf("g")||(n="^"+n+"$"),new RegExp(n,r)},window.validate_fsentry_name=function(t){if(t){if(isString(t)){if(t.includes("/"))throw{message:"Name cannot contain the '/' character."};if("."===t)throw{message:"Name can not be the '.' character."};if(".."===t)throw{message:"Name can not be the '..' character."};if(t.length>window.max_item_name_length)throw{message:`Name can not be longer than ${config.max_item_name_length} characters`};return!0}throw{message:"Name can only be a string."}}throw{message:"Name cannot be empty."}},window.generate_identifier=function(){const t=["helpful","sensible","loyal","honest","clever","capable","calm","smart","genius","bright","charming","creative","diligent","elegant","fancy","colorful","avid","active","gentle","happy","intelligent","jolly","kind","lively","merry","nice","optimistic","polite","quiet","relaxed","silly","victorious","witty","young","zealous","strong","brave","agile","bold"],e=["street","roof","floor","tv","idea","morning","game","wheel","shoe","bag","clock","pencil","pen","magnet","chair","table","house","dog","room","book","car","cat","tree","flower","bird","fish","sun","moon","star","cloud","rain","snow","wind","mountain","river","lake","sea","ocean","island","bridge","road","train","plane","ship","bicycle","horse","elephant","lion","tiger","bear","zebra","giraffe","monkey","snake","rabbit","duck","goose","penguin","frog","crab","shrimp","whale","octopus","spider","ant","bee","butterfly","dragonfly","ladybug","snail","camel","kangaroo","koala","panda","piglet","sheep","wolf","fox","deer","mouse","seal","chicken","cow","dinosaur","puppy","kitten","circle","square","garden","otter","bunny","meerkat","harp"];return t[Math.floor(Math.random()*t.length)]+"-"+e[Math.floor(Math.random()*e.length)]+"-"+Math.floor(1e4*Math.random())},window.isString=function(t){return"string"==typeof t||t instanceof String},window.check_fsentry_against_allowed_file_types_string=function(t,e){if(!e||""===e.trim())return!0;let a=e.split(",");if(a.length>0)for(let t=0;t0){i=!1;for(let e=0;e{let e;try{e=await puter.os.user()}catch(t){}e&&update_auth_data(t,e)},window.update_auth_data=(t,e)=>{if(window.auth_token=t,localStorage.setItem("auth_token",t),window.user?.username!==e.username&&(0,m.A)(e.username),window.user=e,localStorage.setItem("user",JSON.stringify(window.user)),puter.setAuthToken(t,api_origin),window.user){let t=!1;for(let e=0;e{document.dispatchEvent(new Event("logout",{bubbles:!0}))},window.is_fullscreen=()=>document.fullscreenElement&&null!==document.fullscreenElement||document.webkitIsFullScreen&&null!==document.webkitIsFullScreen||document.webkitFullscreenElement&&null!==document.webkitFullscreenElement||document.mozFullScreenElement&&null!==document.mozFullScreenElement||document.msFullscreenElement&&null!==document.msFullscreenElement,window.get_apps=async(t,e)=>{if(Array.isArray(t)&&(t=t.join("|")),"explorer"===t)return[];let a=await $.ajax({url:api_origin+"/apps/"+t,type:"GET",async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},success:function(t){}});if(1===a.length&&(a=a[0]),!e||"function"!=typeof e)return a;e(a)},window.sendItemChangeEventToWatchingApps=function(t,e){window.watchItems[t]&&window.watchItems[t].forEach((a=>{const i=$(`.window[data-element_uuid="${a}"]`).find(".window-app-iframe");i&&i.length>0?i.get(0)?.contentWindow.postMessage({msg:"itemChanged",data:e},"*"):window.watchItems[t].splice(window.watchItems[t].indexOf(a),1)}))},window.item_icon=async t=>{if(t.path?.startsWith(trash_path+"/")&&t.metadata)try{let e=JSON.parse(t.metadata);t.name=e&&e.original_name?e.original_name:t.name}catch(t){}if(t.thumbnail)return{image:t.thumbnail,type:"thumb"};if(t.associated_app&&t.associated_app?.name)return t.associated_app.icon?{image:t.associated_app.icon,type:"icon"}:{image:window.icons["app.svg"],type:"icon"};if(t.shortcut_to_path&&t.shortcut_to_path===trash_path){let t=$(`.item[data-path="${html_encode(trash_path)}" i] .item-icon-icon`).attr("src");if(!t){let e=await puter.fs.stat(trash_path);t=void 0!==e.is_empty&&!0===e.is_empty?window.icons["trash.svg"]:window.icons["trash-full.svg"]}return{image:t,type:"icon"}}return t.is_dir?t.path===docs_path?{image:window.icons["folder-documents.svg"],type:"icon"}:t.path===pictures_path?{image:window.icons["folder-pictures.svg"],type:"icon"}:t.path===home_path?{image:window.icons["folder-home.svg"],type:"icon"}:t.path===videos_path?{image:window.icons["folder-videos.svg"],type:"icon"}:t.path===desktop_path?{image:window.icons["folder-desktop.svg"],type:"icon"}:{image:window.icons["folder.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".doc")?{image:window.icons["file-doc.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".docx")?{image:window.icons["file-docx.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".exe")?{image:window.icons["file-exe.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".gz")?{image:window.icons["file-gzip.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".jar")?{image:window.icons["file-jar.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".java")?{image:window.icons["file-java.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".jsp")?{image:window.icons["file-jsp.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".log")?{image:window.icons["file-log.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".mp3")?{image:window.icons["file-mp3.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".rb")?{image:window.icons["file-ruby.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".rss")?{image:window.icons["file-rss.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".rtf")?{image:window.icons["file-rtf.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".sketch")?{image:window.icons["file-sketch.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".sql")?{image:window.icons["file-sql.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".tif")?{image:window.icons["file-tif.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".tiff")?{image:window.icons["file-tiff.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".wav")?{image:window.icons["file-wav.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".cpp")?{image:window.icons["file-cpp.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".pptx")?{image:window.icons["file-pptx.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".psd")?{image:window.icons["file-psd.svg"],type:"icon"}:t.name.toLowerCase().endsWith(".xlsx")?{image:window.icons["file-xlsx.svg"],type:"icon"}:t.type?{image:h(t.type),type:"icon"}:{image:h(n.getType(t.name)),type:"icon"}},window.show_save_account_notice_if_needed=function(t){getItem({key:"save_account_notice_shown",success:async function(e){!e&&window.user?.is_temp&&(setItem({key:"save_account_notice_shown",value:!0}),setTimeout((async()=>{const e=await(0,o.A)({message:t??"Congrats on storing data!

    Don't forget to save your session! You are in a temporary session. Save session to avoid accidentally losing your work.

    ",body_icon:window.icons["reminder.svg"],buttons:[{label:"Save session",value:"save-session",type:"primary"},{label:"I'll do it later",value:"remind-later"}],window_options:{backdrop:!0,close_on_backdrop_click:!1}});"save-session"===e?await(0,l.A)({send_confirmation_code:!1}):"login"===e&&(await(0,r.A)({show_signup_button:!1,reload_on_success:!0,send_confirmation_code:!1,window_options:{show_in_taskbar:!1,backdrop:!0,close_on_backdrop_click:!1}})||$(".toolbar").prepend(ht))}),desktop_loading_fade_delay+1e3))}})},window.launch_download_from_url=async function(){const t=new URLSearchParams(window.location.search);if(t.has("download")){let e,a=t.get("download"),i=t.get("name"),s=t.get("is_dir");a.startsWith("http://")||a.startsWith("https://")||(a="http://"+a);try{e=new URL(a)}catch(t){return void(0,o.A)("Invalid download URL.")}let r=e.hostname;i||(i=a.split("/").pop().split("#")[0].split("?")[0]);let l=n.getType(i);if(await async function(t){return new Promise((async e=>{let a="";a+="
    ",a+='
    ',a+='

    Do you want to download this file?

    ',a+='
    ',a+=``,a+="
    ",a+='
    ',a+=`

    Name: ${t.name??t.url}

    `,a+=`

    Type: ${"1"===t.is_dir||"true"===t.is_dir?"Folder":t.type??"Unknown File Type"}

    `,a+=`

    From: ${t.source}

    `,a+="
    ",a+="
    ",a+='',a+='',a+="
    ";const i=await(0,d.A)({title:"Upload",icon:window.icons["app-icon-uploader.svg"],uid:null,is_dir:!1,body_content:a,draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,window_class:"window-upload-progress",width:450,dominant:!0,window_css:{height:"initial"},body_css:{padding:"22px",width:"initial","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});$(i).find(".btn-download-confirm").on("click submit",(function(t){$(i).close(),e(!0)})),$(i).find(".btn-download-cancel").on("click submit",(function(t){$(i).close(),e(!1)}))}))}({url:a,name:i,source:r,type:l,is_dir:s})){let t=operation_id++;window.progress_tracker[t]=[],window.progress_tracker[t][0]={},window.progress_tracker[t][0].total=0,window.progress_tracker[t][0].ajax_uploaded=0,window.progress_tracker[t][0].cloud_uploaded=0;const e=await async function(t){let e="";e+=`
    `,e+="
    ",e+='circle anim',e+='
    ',e+=`Downloading ${t.item_name??""}`,e+="
    ",e+='
    ',e+='
    ',e+="
    ",e+='',e+="
    ",e+="
    ";const a=await(0,d.A)({title:"Upload",icon:window.icons["app-icon-uploader.svg"],uid:null,is_dir:!1,body_content:e,draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,window_class:"window-upload-progress",width:450,dominant:!0,window_css:{height:"initial"},body_css:{padding:"22px",width:"initial","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});return $(a).find(".download-cancel-btn").on("click",(function(){operation_cancelled[t.operation_id]=!0,$(a).close()})),a}({operation_id:t,item_name:i});await(0,p.A)({url:a,name:i,dest_path:desktop_path,auth_token,api_origin,dedupe_name:!0,overwrite:!1,operation_id:t,item_upload_id:0,success:function(t){$(e).close()},error:function(t){(0,o.A)(t&&t.message?t.message:"Download failed."),$(e).close()}}),window.history.pushState(null,document.title,"/")}}},window.refresh_item_container=function(e,a){a=a||{};let i=$(e).attr("data-path"),n=$(e).closest(".window"),o=$(n).find(".window-head-icon");const d=$(e).find(".explorer-loading-spinner");a.fadeInItems&&$(e).css("opacity","0"),$(e).find(".explorer-empty-message").hide(),$(d).hide();let r=(new Date).getTime(),l=setTimeout((function(){$(d).closest(".item-container").attr("data-path")===i&&($(d).show(),setTimeout((function(){$(d).find(".explorer-loading-spinner-msg").html("Taking a little longer than usual. Please wait...")}),3e3))}),1e3);puter.fs.stat(i,(function(t){n&&($(n).attr("data-uid",t.id),$(n).attr("data-sort_by",t.sort_by??"name"),$(n).attr("data-sort_order",t.sort_order??"asc"),$(n).attr("data-layout",t.layout??"icons"),$(n).attr("data-name",html_encode(t.name)),$(n).attr("data-path",html_encode(i)),$(n).find(".window-navbar-path-input").val(i),$(n).find(".window-navbar-path-input").attr("data-path",i)),$(e).attr("data-sort_by",t.sort_by??"name"),$(e).attr("data-sort_order",t.sort_order??"asc"),n&&n.length>0&&update_window_layout(n,t.layout),"details"===t.layout&&update_details_layout_sort_visuals(n,t.sort_by,t.sort_order)}));let c=$(n).attr("data-is_directoryPicker");c="true"===c||"1"===c;let p=$(n).attr("data-allowed_file_types"),m=$(n).attr("data-is_openFileDialog");m="true"===m||"1"===m,$(e).find(".item").removeItems(),puter.fs.readdir(i).then((u=>{$(e).attr("data-path")===i&&setTimeout((async function(){clearTimeout(l),$(d).hide(),0===u.length&&$(e).find(".explorer-empty-message").show(),i===trash_path&&o&&(u.length>0?$(o).attr("src",window.icons["trash-full.svg"]):$(o).attr("src",window.icons["trash.svg"]));for(let a=0;a1e3?1e3:1)}))},window.onpopstate=t=>{null!==t.state&&null!==t.state.window_id&&$(`.window[data-id="${t.state.window_id}"]`).focusWindow()},window.sort_items=(e,a,i)=>{"asc"!==i&&"desc"!==i&&(i="asc"),$(e).find('.item[data-sortable="true"]').detach().sort((function(e,n){return a&&"name"!==a?"size"===a?parseInt(e.dataset.size)parseInt(n.dataset.size)?"asc"===i?1:-1:0:"modified"===a?parseInt(e.dataset.modified)parseInt(n.dataset.modified)?"asc"===i?1:-1:0:"type"===a?t.A.extname(e.dataset.name.toLowerCase())t.A.extname(n.dataset.name.toLowerCase())?"asc"===i?1:-1:0:void 0:e.dataset.name.toLowerCase()n.dataset.name.toLowerCase()?"asc"===i?1:-1:0})).appendTo(e)},window.create_folder=async(t,e)=>{let a=t,i=operation_id++;operation_cancelled[i]=!1;let n,o=Date.now(),s=setTimeout((async()=>{n=await async function(t){let e="";e+=`
    `,e+="
    ",e+='circle anim',e+='
    ',e+='Taking a little longer than usual. Please wait...',e+="
    ",e+="
    ",e+="
    ";const a=await(0,d.A)({title:"Creating New Folder",icon:window.icons["app-icon-newfolder.svg"],uid:null,is_dir:!1,body_content:e,draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,window_class:"window-newfolder-progress",width:450,dominant:!0,window_css:{height:"initial"},body_css:{padding:"22px",width:"initial","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});return $(a).find(".newfolder-cancel-btn").on("click",(function(e){operation_cancelled[t.operation_id]=!0,$(a).close()})),a}({operation_id:i})}),500);try{await puter.fs.mkdir({path:a+"/New Folder",rename:!0,overwrite:!1,success:function(t){const i=$(e).find('.item[data-path="'+html_encode(a)+"/"+html_encode(t.name)+'"]');i.length>0&&activate_item_name_editor(i),clearTimeout(s);let d=Date.now()-o;n&&d>=copy_progress_hide_delay?$(n).close():n&&setTimeout((()=>{setTimeout((()=>{$(n).close()}),Math.abs(copy_progress_hide_delay-d))}))}})}catch(t){clearTimeout(s)}},window.create_file=async t=>{let e=t.dirname,a=t.append_to_element,i=t.name,n=t.content?[t.content]:[];try{puter.fs.upload(new File(n,i),e,{success:async function(t){const i=$(a).find('.item[data-path="'+html_encode(e)+"/"+html_encode(t.name)+'"]');i.length>0&&activate_item_name_editor(i)}})}catch(t){console.log(t)}},window.create_shortcut=async(e,a,i,n,o,s)=>{let d=i;const r=t.A.extname(e);e=t.A.basename(e,r)+" - Shortcut"+r;try{await puter.fs.upload(new File([],e),d,{overwrite:!1,shortcutTo:s??o,dedupeName:!0})}catch(t){console.log(t)}},window.copy_clipboard_items=async function(e,a){let i=operation_id++;operation_cancelled[i]=!1,$(a).children(".item-selected").removeClass("item-selected"),update_explorer_footer_selected_items_count($(a).closest(".window"));let n=!1;(async()=>{let a=Date.now(),s=await c({operation_id:i});for(let a=0;a${html_encode(t.entry_name)} already exists.`,buttons:[{label:"Replace",type:"primary"},...clipboard.length>1?[{label:"Replace all"}]:[],...clipboard.length>1?[{label:"Skip"}]:[{label:"Cancel"}]]});"Replace"===e?l=!0:"Replace all"===e?(l=!0,n=!0):"Skip"!==e&&"Cancel"!==e||(r=!1)}else t.message&&(0,o.A)(t.message),r=!1}}while(r)}let d=Date.now()-a;d>=copy_progress_hide_delay?$(s).close():setTimeout((()=>{setTimeout((()=>{$(s).close()}),Math.abs(copy_progress_hide_delay-d))}))})()},window.copy_items=function(e,a){let i=operation_id++,n=!1;(async()=>{let s=Date.now(),d=await c({operation_id:i});for(let s=0;s${html_encode(t.entry_name)} already exists.`,buttons:[{label:"Replace",type:"primary"},...e.length>1?[{label:"Replace all"}]:[],...e.length>1?[{label:"Skip"}]:[{label:"Cancel"}]]});"Replace"===a?c=!0:"Replace all"===a?(c=!0,n=!0):"Skip"!==a&&"Cancel"!==a||(l=!1)}else t.message?(0,o.A)(t.message):t&&(0,o.A)(t),l=!1}}while(l)}let r=Date.now()-s;r>=copy_progress_hide_delay?$(d).close():setTimeout((()=>{setTimeout((()=>{$(d).close()}),Math.abs(copy_progress_hide_delay-r))}))})()},window.delete_item=async function(t,e=!1){if("1"!==$(t).attr("data-immutable")){$(`.item[data-uid='${$(t).attr("data-uid")}']`).fadeOut(150,(function(){$(".window-"+$(t).attr("data-uid")).close(),$(`.window[data-path^="${$(t).attr("data-path")}/"]`).close()}));try{await puter.fs.delete({paths:$(t).attr("data-path"),descendantsOnly:e,recursive:!0}),$(`.item[data-uid='${$(t).attr("data-uid")}']`).fadeOut(150,(function(){let e=$(`.item[data-uid='${$(t).attr("data-uid")}']`).closest(".window");$(`.item[data-uid='${$(t).attr("data-uid")}']`).removeItems(),$(e).each((function(t){update_explorer_footer_item_count(this),update_explorer_footer_selected_items_count(this)})),$(`.item[data-shortcut_to_path="${html_encode($(t).attr("data-path"))}" i]`).attr("data-shortcut_to_path","")}))}catch(t){(0,o.A)(t.responseText)}}},window.move_clipboard_items=function(t,e){let a=void 0===e?$(t).attr("data-path"):e,i=[];if(clipboard.length>0){for(let t=0;t0&&move_items(i,a)}clipboard=[]},window.trigger_download=e=>{let a=[];for(let i=0;i0&&s)window_nav_history[n]=window_nav_history[n].slice(0,window_nav_history_current_position[n]+1),window_nav_history[n].push(l),window_nav_history_current_position[n]++,update_window_path(i,l);else{const a=l.toLowerCase(),i=r.toLowerCase();let n;try{n=await $.ajax({url:api_origin+"/open_item",type:"POST",contentType:"application/json",data:JSON.stringify({uid:i??void 0,path:a??void 0}),headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}}})}catch(t){}let s=n?.suggested_apps??await suggest_apps_for_fsentry({uid:i,path:a});if(0===s.length)return".zip"===t.A.extname(l)?void unzipItem(l):void("Download File"===await(0,o.A)("Found no suitable apps to open this file with. Would you like to download it instead?",[{label:"Download File",type:"primary"},{label:"Cancel"}])&&trigger_download([l]));launch_app({name:s[0].name,token:n.token,file_path:l,app_obj:s[0],window_title:t.A.basename(l),file_uid:i,maximized:e.maximized,file_signature:n.signature})}else{i.find(".window-disable-mask, .busy-indicator").show();let t=Date.now();try{let t=i.attr("data-parent_uuid"),e=$(`.window[data-element_uuid="${t}"]`).attr("data-app_uuid");i.attr("data-initiating_app_uuid");let a=await puter.fs.sign(window.host_app_uid??e,{uid:r,action:"write"});a=a.items,a.path="~/"+l.split("/").slice(2).join("/");const n=i.attr("data-parent_uuid");if("true"===i.attr("data-return_to_parent_window"))window.opener.postMessage({msg:"fileOpenPicked",original_msg_id:i.attr("data-iframe_msg_uid"),items:Array.isArray(a)?[...a]:[a],...!Array.isArray(a)&&a},"*"),window.close();else if(n){const t=$(`.window[data-element_uuid="${n}"]`).find(".window-app-iframe").get(0);if(t){let e={msg:"fileOpenPicked",original_msg_id:i.attr("data-iframe_msg_uid"),items:Array.isArray(a)?[...a]:[a],...!Array.isArray(a)&&a};t.contentWindow.postMessage(e,"*")}$(t).get(0)?.focus({preventScroll:!0});const e=new CustomEvent("file_opened",{detail:a});$(`.window[data-element_uuid="${n}"]`).get(0)?.dispatchEvent(e)}}catch(t){console.log(t)}let e=Date.now()-t;e>=busy_indicator_hide_delay?i.close():setTimeout((()=>{i.close()}),Math.abs(busy_indicator_hide_delay-e))}else i.find(".savefiledialog-filename").val($(a).attr("data-name")),i.find(".savefiledialog-save-btn").trigger("click")},window.new_context_menu_item=function(t,e){return{html:"New",items:[{html:"New Folder",icon:``,onClick:function(){create_folder(t,e)}},"-",{html:"Text Document",icon:``,onClick:async function(){create_file({dirname:t,append_to_element:e,name:"New File.txt"})}},{html:"HTML Document",icon:``,onClick:async function(){create_file({dirname:t,append_to_element:e,name:"New File.html"})}},{html:"JPG Image",icon:``,onClick:async function(){var a=document.createElement("canvas");a.width=800,a.height=600,a.toBlob((a=>{create_file({dirname:t,append_to_element:e,name:"New Image.jpg",content:a})}))}}]}},window.move_items=async function(e,a){let i=operation_id++;operation_cancelled[i]=!1;let n=!0;for(let t=0;t`,e+="
    ",e+='circle anim',e+='
    ',e+='Moving ',e+='',e+="
    ",e+='
    ',e+='
    ',e+="
    ",e+="
    ",e+="";const a=await(0,d.A)({title:"moveing",icon:window.icons["app-icon-moveing.svg"],uid:null,is_dir:!1,body_content:e,draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,window_class:"window-move-progress",width:450,dominant:!0,window_css:{height:"initial"},body_css:{padding:"22px",width:"initial","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});return $(a).find(".move-cancel-btn").on("click",(function(e){operation_cancelled[t.operation_id]=!0,$(a).close()})),a}({operation_id:i});for(let n=0;nMoving ${html_encode($(d).attr("data-name"))}

    Cannot move item to its current location.`);continue}let l=!1,p=r,m=!1;do{try{let e,n=$(d).attr("data-path"),u=$(d).attr("data-metadata");if(""===u||"null"===u||null===u)u={};else try{u=JSON.parse(u)}catch(t){}if(operation_cancelled[i])return;let h=!1;if(a===trash_path)e=$(d).attr("data-uid"),u={original_name:$(d).attr("data-name"),original_path:$(d).attr("data-path"),trashed_ts:Math.round(Date.now()/1e3)},window.socket&&window.socket.emit("trash.is_empty",{is_empty:!1}),$('[data-app="trash"]').find(".taskbar-icon > img").attr("src",window.icons["trash-full.svg"]),$(`.item[data-path="${html_encode(trash_path)}" i], .item[data-shortcut_to_path="${html_encode(trash_path)}" i]`).find(".item-icon > img").attr("src",window.icons["trash-full.svg"]),$(`.window[data-path="${html_encode(trash_path)}" i]`).find(".window-head-icon").attr("src",window.icons["trash-full.svg"]);else{if(a.startsWith(trash_path))return $(c).close(),void(0,o.A)("Cannot move items into a deleted folder.");void 0!==u.trashed_ts&&(h=!0,e=u.original_name,u={},m=!0,n=trash_path+"/"+e)}$(c).find(".move-from").html(n);let w=await puter.fs.move({source:$(d).attr("data-uid"),destination:a,overwrite:p||r,newName:e,createMissingParents:h,newMetadata:u,excludeSocketID:window.socket?.id}),_=w.moved;_.path=t.A.join(a,_.name),l=!1,$(`.item[data-shortcut_to_path="${html_encode($(d).attr("data-path"))}" i]`).attr("data-shortcut_to_path",_.path),$(`.item[data-uid='${$(d).attr("data-uid")}']`).fadeOut(150,(function(){let t=$(`.item[data-uid='${$(d).attr("data-uid")}']`).closest(".window");$(this).removeItems(),$(t).each((function(){update_explorer_footer_item_count(this),update_explorer_footer_selected_items_count(this)}))})),a===trash_path?($(`.window[data-path="${html_encode($(d).attr("data-path"))}" i]`).close(),$(`.window[data-path^="${html_encode($(d).attr("data-path"))}/"]`).close()):$(`.window[data-path^="${html_encode($(d).attr("data-path"))}/"], .window[data-path="${html_encode($(d).attr("data-path"))}" i]`).each((function(){update_window_path(this,$(this).attr("data-path").replace($(d).attr("data-path"),t.A.join(a,_.name)))})),a===trash_path&&($.ajax({url:api_origin+"/removepubtok",type:"POST",data:JSON.stringify({uid:$(d).attr("data-uid")}),async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:function(){}}),$.ajax({url:api_origin+"/remove-item-perms",type:"POST",data:JSON.stringify({uid:$(d).attr("data-uid")}),async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:function(){}}),$(`.item[data-uid="${$(d).attr("data-uid")}"]`).find(".item-is-shared").fadeOut(300),"1"===$(d).attr("data-is_dir")&&(puter.hosting.delete(dir_uuid),$(`.mywebsites-dir-path[data-uuid="${$(d).attr("data-uid")}"]`).remove(),$(`.item[data-uid="${$(d).attr("data-uid")}"]`).find(".item-has-website-badge").fadeOut(300),$.ajax({url:api_origin+"/removefr",type:"POST",data:JSON.stringify({dir_uid:$(d).attr("data-uid")}),async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:function(){}}))),w.overwritten?.id&&$(`.item[data-uid=${w.overwritten.id}]`).removeItems(),_.name=u?.original_name||_.name,(0,s.A)({appendTo:$(`.item-container[data-path="${html_encode(a)}" i]`),immutable:_.immutable,associated_app_name:_.associated_app?.name,uid:_.uid,path:_.path,icon:await item_icon(_),name:a===trash_path?$(d).attr("data-name"):_.name,is_dir:_.is_dir,size:_.size,type:_.type,modified:_.modified,is_selected:!1,is_shared:a!==trash_path&&_.is_shared,is_shortcut:_.is_shortcut,shortcut_to:_.shortcut_to,shortcut_to_path:_.shortcut_to_path,has_website:"1"===$(d).attr("data-has_website"),metadata:_.metadata??"",suggested_apps:_.suggested_apps}),w.parent_dirs_created?.forEach((async e=>{let a=$(`.item-container[data-path="${html_encode(t.A.dirname(e.path))}" i]`);a.length>0&&0===$(`.item[data-path="${html_encode(e.path)}" i]`).length&&(0,s.A)({appendTo:a,immutable:!1,uid:e.uid,path:e.path,icon:await item_icon(e),name:e.name,size:e.size,type:e.type,modified:e.modified,is_dir:!0,is_selected:!1,is_shared:e.is_shared,has_website:!1,suggested_apps:e.suggested_apps}),sort_items(a)})),$(`.item-container[data-path="${html_encode(a)}" i]`).each((function(){sort_items(this,$(this).attr("data-sort_by"),$(this).attr("data-sort_order"))}))}catch(t){if("item_with_same_name_exists"!==t.code){l=!1,$(d).show(0,(function(){(0,o.A)(`

    Moving ${html_encode($(d).attr("data-name"))}

    ${t.message??""}`)}));break}{l=!0;const a=await(0,o.A)({message:`${html_encode(t.entry_name)} already exists.`,buttons:[{label:"Replace",type:"primary"},...e.length>1?[{label:"Replace all"}]:[],...e.length>1?[{label:"Skip"}]:[{label:"Cancel"}]]});"Replace"===a?p=!0:"Replace all"===a?(p=!0,r=!0):"Skip"!==a&&"Cancel"!==a||(l=!1)}}}while(l);if(m){const t=await puter.fs.stat(trash_path);window.socket&&window.socket.emit("trash.is_empty",{is_empty:t.is_empty}),t.is_empty&&($('[data-app="trash"]').find(".taskbar-icon > img").attr("src",window.icons["trash.svg"]),$(`.item[data-path="${html_encode(trash_path)}" i]`).find(".item-icon > img").attr("src",window.icons["trash.svg"]),$(`.window[data-path="${html_encode(trash_path)}" i]`).find(".window-head-icon").attr("src",window.icons["trash.svg"]))}}let p=Date.now()-l;console.log(`moved ${e.length} item${e.length>1?"s":""} in ${p}ms`),setTimeout((()=>{$(c).close()}),copy_progress_hide_delay)},window.socialLink=function(t){const e=["url","title","image","desc","appid","redirecturl","via","hashtags","provider","language","userid","category","phonenumber","emailaddress","cemailaddress","bccemailaddress"];for(var a=0;a{t&&t.length>0?window.sites=t:window.sites=[]}))},window.init_upload_using_dialog=function(e,a=null){$("#upload-file-dialog").unbind("onchange"),$("#upload-file-dialog").unbind("change"),$("#upload-file-dialog").unbind("onChange"),a=null===a?$(e).attr("data-path"):t.A.resolve(a),$("#upload-file-dialog").trigger("click"),$("#upload-file-dialog").on("change",(async function(t){if(""!==$("#upload-file-dialog").val()){const t=$("#upload-file-dialog")[0].files;if(t.length>0){try{upload_items(t,a)}catch(t){(0,o.A)(t.message??t)}$("#upload-file-dialog").val("")}}}))},window.upload_items=async function(t,e){let a,i;puter.fs.upload(t,e,{init:async(t,e)=>{i=t,a=await async function(t){let e="";return e+=`
    `,e+="
    ",e+='circle anim',e+='
    ',e+='Preparing for upload...',e+="
    ",e+='
    ',e+='
    ',e+="
    ",e+='',e+="
    ",e+="
    ",await(0,d.A)({title:"Upload",icon:window.icons["app-icon-uploader.svg"],uid:null,is_dir:!1,body_content:e,draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,window_class:"window-upload-progress",width:450,dominant:!0,window_css:{height:"initial"},body_css:{padding:"22px",width:"initial","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}})}({operation_id:t}),$(a).find(".upload-cancel-btn").on("click",(function(t){$(a).close(),show_save_account_notice_if_needed(),e.abort()})),active_uploads[i]=0},start:async function(){$(a).find(".upload-progress-msg").html('Uploading (0%)')},progress:async function(t,e){$(`[data-upload-operation-id="${t}"]`).find(".upload-progress-bar").css("width",e+"%"),$(`[data-upload-operation-id="${t}"]`).find(".upload-progress-percent").html(e+"%"),active_uploads[i]=e,"visible"!==document.visibilityState&&(0,u.A)()},success:async function(t){setTimeout((()=>{setTimeout((()=>{$(a).close(),show_save_account_notice_if_needed()}),Math.abs(upload_progress_hide_delay))})),delete active_uploads[i]},error:async function(t){$(a).close(),delete active_uploads[i]},abort:async function(t){delete active_uploads[i]}})},window.empty_trash=async function(){if("no"===await(0,o.A)({message:"Are you sure you want to permanently delete the items in Trash?",buttons:[{label:"Yes",value:"yes",type:"primary"},{label:"No",value:"no"}]}))return;let t,e=Date.now(),a=uuidv4(),i=setTimeout((async()=>{t=await async function(t){let e="";e+=`
    `,e+="
    ",e+='circle anim',e+='
    ',e+='Emptying the Trash...',e+="
    ",e+="
    ",e+="
    ";const a=await(0,d.A)({title:"Creating New Folder",icon:window.icons["app-icon-newfolder.svg"],uid:null,is_dir:!1,body_content:e,draggable_body:!1,has_head:!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,is_resizable:!1,is_droppable:!1,init_center:!0,allow_native_ctxmenu:!1,allow_user_select:!1,window_class:"window-newfolder-progress",width:450,dominant:!0,window_css:{height:"initial"},body_css:{padding:"22px",width:"initial","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});return $(a).find(".newfolder-cancel-btn").on("click",(function(e){operation_cancelled[t.operation_id]=!0,$(a).close()})),a}({operation_id:a})}),500);await puter.fs.delete({paths:trash_path,descendantsOnly:!0,recursive:!0,success:async function(a){window.socket&&window.socket.emit("trash.is_empty",{is_empty:!0}),$('[data-app="trash"]').find(".taskbar-icon > img").attr("src",window.icons["trash.svg"]),$(`.item[data-path="${html_encode(trash_path)}" i], .item[data-shortcut_to_path="${html_encode(trash_path)}" i]`).find(".item-icon > img").attr("src",window.icons["trash.svg"]),$(`.window[data-path="${trash_path}"]`).find(".window-head-icon").attr("src",window.icons["trash.svg"]),$(`.item[data-path^="${trash_path}/"]`).removeItems(),update_explorer_footer_item_count($(`.window[data-path="${trash_path}"]`)),clearTimeout(i),setTimeout((()=>{$(t).close()}),Math.max(0,copy_progress_hide_delay-(Date.now()-e)))},error:async function(a){clearTimeout(i),setTimeout((()=>{$(t).close()}),Math.max(0,copy_progress_hide_delay-(Date.now()-e)))}})},window.copy_to_clipboard=async function(t){navigator.clipboard?await navigator.clipboard.writeText(t):document.execCommand("copy")},window.getUsage=()=>fetch(api_origin+"/drivers/usage",{headers:{"Content-Type":"application/json",Authorization:"Bearer "+auth_token},method:"GET"}).then((t=>{if(!t.ok)throw new Error("Network response was not ok");return t.json()})).then((t=>t)).catch((t=>{console.error("There has been a problem with your fetch operation:",t)})),window.determine_active_container_parent=function(){let t=$(active_element).closest(".item-container");return 0===t.length&&(t=$(active_element).find(".item-container")),0===t.length&&(t=$(active_element).closest(".window").find(".item-container")),0===t.length&&active_element&&$(active_element).hasClass("item-container")&&(t=$(active_element)),0===t.length&&active_item_container&&(t=active_item_container),t},window.getAppUIDFromOrigin=async function(t){try{const e=await fetch(window.api_origin+"/auth/app-uid-from-origin",{headers:{"Content-Type":"application/json",Authorization:"Bearer "+window.auth_token},body:JSON.stringify({origin:t}),method:"POST"});return(await e.json()).uid}catch(t){return console.error(t),null}},window.getUserAppToken=async function(t){try{const e=await fetch(window.api_origin+"/auth/get-user-app-token",{headers:{"Content-Type":"application/json",Authorization:"Bearer "+window.auth_token},body:JSON.stringify({origin:t}),method:"POST"});return await e.json()}catch(t){return console.error(t),null}},window.checkUserSiteRelationship=async function(t){try{const e=await fetch(window.api_origin+"/auth/check-app ",{headers:{"Content-Type":"application/json",Authorization:"Bearer "+window.auth_token},body:JSON.stringify({origin:t}),method:"POST"});return await e.json()}catch(t){return console.error(t),null}},window.zipItems=async function(e,a,i=!0){const n=new JSZip;e=Array.isArray(e)?e:[e];let o,s,d,r=Date.now();s=setTimeout((async()=>{o=await w()}),500);for(const a of e){let i=$(a).attr("data-path");if("1"===$(a).attr("data-is_dir")){$(o).find(".dir-dl-status").html(`Reading ${html_encode(i)}`);let a=await f(i);for(const s of a){let a;a=1===e.length?s.relativePath:t.A.basename(i)+"/"+s.relativePath,$(o).find(".dir-dl-status").html(`Zipping ${html_encode(a)}`);let d=await puter.fs.read(s.path);try{n.file(a,d,{binary:!0})}catch(t){console.error(t)}}}else{let e=await puter.fs.read(i);n.file(t.A.basename(i),e,{binary:!0})}}d=1===e.length?t.A.basename($(e[0]).attr("data-path")):"Archive",n.generateAsync({type:"blob"}).then((async function(t){if(i){const e=URL.createObjectURL(t),a=document.createElement("a");a.href=e,a.download=d,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(e)}else await puter.fs.write(a+"/"+d+".zip",t,{overwrite:!1,dedupeName:!0});clearTimeout(s),setTimeout((()=>{$(o).close()}),Math.max(0,copy_progress_hide_delay-(Date.now()-r)))})).catch((function(t){clearTimeout(s),setTimeout((()=>{$(o).close()}),Math.max(0,copy_progress_hide_delay-(Date.now()-r))),console.error("Error in zipping files: ",t)}))},window.extractSubdomain=function(t){return t.split("://")[1].split(".")[0]},window.sleep=function(t){return new Promise((e=>setTimeout(e,t)))},window.unzipItem=async function(e){let a,i,n=Date.now();i=setTimeout((async()=>{a=await w()}),500);const o=new JSZip;let s=e,d=puter.fs.read(s);o.loadAsync(d).then((async function(e){const o=await puter.fs.mkdir(t.A.dirname(s)+"/"+t.A.basename(s,".zip"),{dedupeName:!0});Object.keys(e.files).forEach((async function(t){console.log(t),t.endsWith("/")&&await puter.fs.mkdir(o.path+"/"+t,{createMissingParents:!0}),e.files[t].async("blob").then((async function(e){await puter.fs.write(o.path+"/"+t,e)})).catch((function(t){}))})),clearTimeout(i),setTimeout((()=>{$(a).close()}),Math.max(0,copy_progress_hide_delay-(Date.now()-n)))})).catch((function(t){clearTimeout(i),setTimeout((()=>{$(a).close()}),Math.max(0,copy_progress_hide_delay-(Date.now()-n)))}))}})(),(()=>{"use strict";var t=a(103),e=a(17),i=a(585),n=a(171),o=a(124);let s=new Set;const d=new Set(["Arial","Arial Black","Bahnschrift","Calibri","Cambria","Cambria Math","Candara","Comic Sans MS","Consolas","Constantia","Corbel","Courier New","Ebrima","Franklin Gothic Medium","Gabriola","Gadugi","Georgia","HoloLens MDL2 Assets","Impact","Ink Free","Javanese Text","Leelawadee UI","Lucida Console","Lucida Sans Unicode","Malgun Gothic","Marlett","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Sans Serif","Microsoft Tai Le","Microsoft YaHei","Microsoft Yi Baiti","MingLiU-ExtB","Mongolian Baiti","MS Gothic","MV Boli","Myanmar Text","Nirmala UI","Palatino Linotype","Segoe MDL2 Assets","Segoe Print","Segoe Script","Segoe UI","Segoe UI Historic","Segoe UI Emoji","Segoe UI Symbol","SimSun","Sitka","Sylfaen","Symbol","Tahoma","Times New Roman","Trebuchet MS","Verdana","Webdings","Wingdings","Yu Gothic","American Typewriter","Andale Mono","Arial","Arial Black","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Avenir","Avenir Next","Avenir Next Condensed","Baskerville","Big Caslon","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bradley Hand","Brush Script MT","Chalkboard","Chalkboard SE","Chalkduster","Charter","Cochin","Comic Sans MS","Copperplate","Courier","Courier New","Didot","DIN Alternate","DIN Condensed","Futura","Geneva","Georgia","Gill Sans","Helvetica","Helvetica Neue","Herculanum","Hoefler Text","Impact","Lucida Grande","Luminari","Marker Felt","Menlo","Microsoft Sans Serif","Monaco","Noteworthy","Optima","Palatino","Papyrus","Phosphate","Rockwell","Savoye LET","SignPainter","Skia","Snell Roundhand","Tahoma","Times","Times New Roman","Trattatello","Trebuchet MS","Verdana","Zapfino"].sort());(async()=>{await document.fonts.ready;for(const t of d.values())document.fonts.check(`12px "${t}"`)&&s.add(t)})();var r=a(644),l=a(889);window.addEventListener("message",(async a=>{if("app"!==(a.data?.env??"app"))return;if(void 0!==a.data.original_msg_id&&void 0!==appCallbackFunctions[a.data.original_msg_id])return appCallbackFunctions[a.data.original_msg_id](a.data),void delete appCallbackFunctions[a.data.original_msg_id];if(!a.data||!a.data.msg)return;if(!a.data.appInstanceID)return void console.log("appInstanceID is needed");const d=$(`.window[data-element_uuid="${a.data.appInstanceID}"]`),c=(d.attr("data-id"),d.find(".window-disable-mask")),p=$(`.window[data-element_uuid="${a.data.appInstanceID}"]`).find(".window-app-iframe").get(0),m=a.data.uuid,u=$(p).attr("data-app"),h=d.attr("data-app_uuid");if("READY"===a.data.msg)$(p).attr("data-appUsesSDK","true");else if("windowFocused"===a.data.msg)console.log("windowFocused");else if("ALERT"===a.data.msg&&void 0!==a.data.message){const e=await(0,t.A)({message:html_encode(a.data.message),buttons:a.data.buttons,type:a.data.options?.type,window_options:{parent_uuid:a.data.appInstanceID,disable_parent_window:!0}});p.contentWindow.postMessage({original_msg_id:m,msg:"alertResponded",response:e},"*")}else if("PROMPT"===a.data.msg&&void 0!==a.data.message){const t=await function(t){return arguments.length>0&&(isString(arguments[0])&&((t={}).message=arguments[0]),arguments[1]&&Array.isArray(arguments[1])&&(t.buttons=arguments[1])),new Promise((async a=>{t.buttons&&0!==t.buttons.length||(t.buttons=[{label:"Cancel",value:!1,type:"default"},{label:"OK",value:!0,type:"primary"}]);let i="";i+=`
    ${t.message}
    `,i+='
    ',i+=``,i+="
    ",t.buttons&&t.buttons.length>0&&(i+='
    ',i+='',i+='',i+="
    ");const n=await(0,e.A)({title:null,icon:null,uid:null,is_dir:!1,message:t.message,backdrop:t.backdrop??!1,is_resizable:!1,is_droppable:!1,has_head:!1,stay_on_top:t.stay_on_top??!1,selectable_body:!1,draggable_body:!0,allow_context_menu:!1,show_in_taskbar:!1,window_class:"window-alert",dominant:!0,body_content:i,width:450,parent_uuid:t.parent_uuid,onAppend:function(t){setTimeout((function(){$(t).find(".prompt-input").get(0).focus({preventScroll:!0})}),30)},...t.window_options,window_css:{height:"initial"},body_css:{width:"initial",padding:"20px","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});$(n).find(".button-primary").focus(),$(n).find(".prompt-resp-button").on("click",(async function(t){return t.preventDefault(),t.stopPropagation(),"true"===$(this).attr("data-value")?a($(n).find(".prompt-input").val()):a(!1),$(n).close(),!1})),$(n).find(".prompt-input").on("keyup",(async function(t){13===t.keyCode&&$(n).find(".prompt-resp-btn-ok").click()}))}))}({message:html_encode(a.data.message),placeholder:html_encode(a.data.placeholder),window_options:{parent_uuid:a.data.appInstanceID,disable_parent_window:!0}});p.contentWindow.postMessage({original_msg_id:m,msg:"promptResponded",response:t},"*")}else if("env"===a.data.msg)p.contentWindow.postMessage({original_msg_id:m},"*");else if("createWindow"===a.data.msg)a.data.options&&(0,e.A)({title:a.data.options.title,disable_parent_window:a.data.options.disable_parent_window,width:a.data.options.width,height:a.data.options.height,is_resizable:a.data.options.is_resizable,has_head:a.data.options.has_head,center:a.data.options.center,show_in_taskbar:a.data.options.show_in_taskbar,iframe_srcdoc:a.data.options.content,iframe_url:a.data.options.url,parent_uuid:a.data.appInstanceID});else{if("setItem"===a.data.msg&&a.data.key&&a.data.value)return await $.ajax({url:api_origin+"/setItem",type:"POST",data:JSON.stringify({app:h,key:a.data.key,value:a.data.value}),async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:function(t){}});if("getItem"===a.data.msg&&a.data.key)$.ajax({url:api_origin+"/getItem",type:"POST",data:JSON.stringify({key:a.data.key,app:h}),async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:function(t){p.contentWindow.postMessage({original_msg_id:m,msg:"getItemSucceeded",value:t?t.value:null},"*")}});else if("removeItem"===a.data.msg&&a.data.key)$.ajax({url:api_origin+"/removeItem",type:"POST",data:JSON.stringify({key:a.data.key,app:h}),async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:function(t){p.contentWindow.postMessage({original_msg_id:m},"*")}});else if("showOpenFilePicker"===a.data.msg){if(!is_auth()&&!await(0,i.A)({referrer:u}))return;d.addClass("window-disabled"),c.show(),c.css("z-index",parseInt(d.css("z-index"))+1),$(p).blur();let t="";a.data.options&&a.data.options.accept&&(t=a.data.options.accept);let n=!1;a.data.options&&a.data.options.multiple&&!0===a.data.options.multiple&&(n=!0),(0,e.A)({allowed_file_types:t,path:"/"+window.user.username+"/Desktop",parent_uuid:a.data.appInstanceID,show_maximize_button:!1,show_minimize_button:!1,title:"Open",is_dir:!0,is_openFileDialog:!0,selectable_body:n,iframe_msg_uid:m,initiating_app_uuid:h,center:!0})}else if("showDirectoryPicker"===a.data.msg){if(!is_auth()&&!await(0,i.A)({referrer:u}))return;d.addClass("window-disabled"),c.show(),c.css("z-index",parseInt(d.css("z-index"))+1),$(p).blur();let t="";a.data.options&&a.data.options.accept&&(t=a.data.options.accept);let n=!1;a.data.options&&a.data.options.multiple&&!0===a.data.options.multiple&&(n=!0),(0,e.A)({path:"/"+window.user.username+"/Desktop",parent_uuid:a.data.appInstanceID,show_maximize_button:!1,show_minimize_button:!1,title:"Open",is_dir:!0,is_directoryPicker:!0,selectable_body:n,iframe_msg_uid:m,center:!0,initiating_app_uuid:h})}else if("setWindowTitle"===a.data.msg&&void 0!==a.data.new_title){const t=$(`.window[data-element_uuid="${a.data.appInstanceID}"]`).get(0);$(t).find(".window-head-title").html(html_encode(a.data.new_title)),p.contentWindow.postMessage({original_msg_id:m},"*")}else if("watchItem"===a.data.msg&&void 0!==a.data.item_uid)window.watchItems[a.data.item_uid]||(window.watchItems[a.data.item_uid]=[]),window.watchItems[a.data.item_uid].push(a.data.appInstanceID);else if("openItem"===a.data.msg)$.ajax({url:a.data.metadataURL+"&return_suggested_apps=true&return_path=true",type:"GET",headers:{Authorization:"Bearer "+auth_token},success:async function(t){$.ajax({url:api_origin+"/open_item",type:"POST",contentType:"application/json",data:JSON.stringify({uid:t.uid??void 0,path:t.path??void 0}),headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}},success:function(e){setTimeout((function(){launch_app({name:t.name,file_path:t.path,app_obj:e.suggested_apps[0],window_title:t.name,file_uid:t.uid,file_signature:e.signature})}),800)}})}});else if("launchApp"===a.data.msg)launch_app({name:a.data.app_name??u,args:a.data.args??{}}),p.contentWindow.postMessage({original_msg_id:m},"*");else if("readAppDataFile"===a.data.msg&&void 0!==a.data.path){a.data.path=l.A.resolve(a.data.path);const t=l.A.join(appdata_path,h,a.data.path);puter.fs.sign(h,{path:t,action:"write"},(function(t){(t=t.items).signatures=t.signatures??[t],t.signatures.length>0&&t.signatures[0].path?(t.signatures[0].path="~/"+t.signatures[0].path.split("/").slice(2).join("/"),p.contentWindow.postMessage({msg:"readAppDataFileSucceeded",original_msg_id:m,item:t.signatures[0]},"*")):p.contentWindow.postMessage({msg:"readAppDataFileFailed",original_msg_id:m},"*")}))}else if("getAppData"===a.data.msg)appdata_signatures[h]&&p.contentWindow.postMessage({msg:"getAppDataSucceeded",original_msg_id:m,item:appdata_signatures[h]},"*"),puter.fs.mkdir({path:l.A.join(appdata_path,h),rename:!1,overwrite:!1,success:function(t){puter.fs.sign(h,{uid:t.uid,action:"write",success:function(t){t=t.items,appdata_signatures[h]=t,p.contentWindow.postMessage({msg:"getAppDataSucceeded",original_msg_id:m,item:t},"*")}})},error:function(t){(t.existing_fsentry||"path_exists"===t.code)&&puter.fs.sign(h,{uid:t.existing_fsentry.uid,action:"write",success:function(t){t=t.items,appdata_signatures[h]=t,p.contentWindow.postMessage({msg:"getAppDataSucceeded",original_msg_id:m,item:t},"*")}})}});else if("requestPermission"===a.data.msg){if(!is_auth()&&!await(0,i.A)({referrer:u}))return;void 0!==a.data.options&&"object"==typeof a.data.options||(a.data.options={}),a.data.options.window_options={},a.data.options.window_options.parent_uuid=a.data.appInstanceID,a.data.options.window_options.disable_parent_window=!0;let t=await(0,n.A)({origin:a.origin,permission:a.data.options.permission,window_options:a.data.options.window_options});p.contentWindow.postMessage({msg:"permissionGranted",granted:t,original_msg_id:m},"*"),$(p).get(0).focus({preventScroll:!0})}else if("showFontPicker"===a.data.msg){if(!is_auth()&&!await(0,i.A)({referrer:u}))return;a.data.options=a.data.options??{},a.data.options.window_options={},a.data.options.window_options.parent_uuid=a.data.appInstanceID;let t=await async function(t){return arguments.length>0&&isString(arguments[0])&&((t={}).default=arguments[0]),t=t||{},new Promise((async a=>{let i="";i+="
    ",i+='
    ',i+='
    ',s.forEach((e=>{i+=`

    ${e}

    `})),i+="
    ",i+='',i+="",i+="
    ",i+="
    ";const n=await(0,e.A)({title:"Select font…",app:"font-picker",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:i,draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_draggable:!0,is_droppable:!1,is_resizable:!1,stay_on_top:!1,allow_native_ctxmenu:!0,allow_user_select:!0,...t.window_options,width:350,dominant:!0,on_close:()=>{a(!1)},onAppend:function(t){let e=$(t).find(".font-selector-active");e.length>0&&scrollParentToChild($(t).find(".font-list").get(0),e.get(0))},window_class:"window-login",window_css:{height:"initial"},body_css:{width:"initial",padding:"0","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});$(n).find(".select-btn").on("click",(function(t){a({fontFamily:$(n).find(".font-selector-active").attr("data-font-family")}),$(n).close()})),$(n).find(".font-selector").on("click",(function(t){$(n).find(".font-selector").removeClass("font-selector-active"),$(this).addClass("font-selector-active")}))}))}(a.data.options);p.contentWindow.postMessage({msg:"fontPicked",original_msg_id:m,font:t},"*"),$(p).get(0).focus({preventScroll:!0})}else if("showColorPicker"===a.data.msg){if(!is_auth()&&!await(0,i.A)({referrer:u}))return;a.data.options=a.data.options??{},a.data.options.window_options={},a.data.options.window_options.parent_uuid=a.data.appInstanceID;let t=await async function(t){return arguments.length>0&&isString(arguments[0])&&((t={}).default=arguments[0]),t=t??{},new Promise((async a=>{let i,n="";n+="
    ",n+='
    ',n+='
    ',n+='
    ',n+="
    ",n+='',n+="",n+="
    ",n+="
    ";const o=await(0,e.A)({title:"Select color…",app:"color-picker",single_instance:!0,icon:null,uid:null,is_dir:!1,body_content:'
    ',draggable_body:!1,has_head:!0,selectable_body:!1,draggable_body:!1,allow_context_menu:!1,is_draggable:!0,is_droppable:!1,is_resizable:!1,stay_on_top:!1,allow_native_ctxmenu:!0,allow_user_select:!0,...t.window_options,width:350,dominant:!0,on_close:async()=>{a(!1)},onAppend:function(e){i=new iro.ColorPicker($(e).find(".picker").get(0),{layout:[{component:iro.ui.Box,options:{layoutDirection:"horizontal",width:265,height:265}},{component:iro.ui.Slider,options:{sliderType:"alpha",layoutDirection:"horizontal",height:265,width:265}},{component:iro.ui.Slider,options:{sliderType:"hue"}}],color:t.default??"#f00"})},window_class:"window-login",window_css:{height:"initial"},body_css:{width:"initial",padding:"0","background-color":"rgba(231, 238, 245, .95)","backdrop-filter":"blur(3px)"}});$(o).find(".select-btn").on("click",(function(t){a({color:i.color.hex8String}),$(o).close()})),$(o).find(".font-selector").on("click",(function(t){$(o).find(".font-selector").removeClass("font-selector-active"),$(this).addClass("font-selector-active")}))}))}(a.data.options);p.contentWindow.postMessage({msg:"colorPicked",original_msg_id:m,color:t?t.color:void 0},"*"),$(p).get(0).focus({preventScroll:!0})}else if("setWallpaper"===a.data.msg){if(!is_auth()&&!await(0,i.A)({referrer:u}))return;a.data.options||(a.data.options={});try{await $.ajax({url:api_origin+"/set-desktop-bg",type:"POST",data:JSON.stringify({url:a.data.readURL,fit:a.data.options.fit??"cover",color:a.data.options.color}),async:!0,contentType:"application/json",headers:{Authorization:"Bearer "+auth_token},statusCode:{401:function(){logout()}}}),window.set_desktop_background({url:a.data.readURL,fit:a.data.options.fit??"cover",color:a.data.options.color}),p.contentWindow.postMessage({msg:"wallpaperSet",original_msg_id:m},"*"),$(p).get(0).focus({preventScroll:!0})}catch(t){console.error(t)}}else if("showSaveFilePicker"===a.data.msg){if(!is_auth()&&!await(0,i.A)({referrer:u}))return;d.addClass("window-disabled"),c.show(),c.css("z-index",parseInt(d.css("z-index"))+1),$(p).blur(),await(0,e.A)({path:"/"+window.user.username+"/Desktop",parent_uuid:a.data.appInstanceID,show_maximize_button:!1,show_minimize_button:!1,title:"Save As…",is_dir:!0,is_saveFileDialog:!0,saveFileDialog_default_filename:a.data.suggestedName??"",selectable_body:!1,iframe_msg_uid:m,center:!0,initiating_app_uuid:h,onSaveFileDialogSave:async function(e,i){$(i).find(".window-disable-mask, .busy-indicator").show();let n=Date.now();if(a.data.url){let i=operation_id++;window.progress_tracker[i]=[],window.progress_tracker[i][0]={},window.progress_tracker[i][0].total=0,window.progress_tracker[i][0].ajax_uploaded=0,window.progress_tracker[i][0].cloud_uploaded=0;let n=!0;for(;n;)await(0,r.A)({url:a.data.url,name:l.A.basename(e),dest_path:l.A.dirname(e),auth_token,api_origin,dedupe_name:!1,overwrite:!1,operation_id:i,item_upload_id:0,success:function(t){},error:function(e){(0,t.A)(e&&e.message?e.message:"Download failed.")}}),n=!1}else{let n=!1,s=new File([a.data.content],l.A.basename(e)),d=!0;for(;d;){n&&(d=!1);try{const t=await puter.fs.write(e,s,{dedupeName:!1,overwrite:n});let a=await puter.fs.sign(h,{uid:t.uid,action:"write"});a=a.items,d=!1,p.contentWindow.postMessage({msg:"fileSaved",original_msg_id:m,filename:t.name,saved_file:{name:a.fsentry_name,readURL:a.read_url,writeURL:a.write_url,metadataURL:a.metadata_url,type:a.type,uid:a.uid,path:"~/"+t.path.split("/").slice(2).join("/")}},"*"),$(p).get(0).focus({preventScroll:!0}),$(`.item[data-uid="${t.uid}"]`).removeItems(),(0,o.A)({appendTo:$(`.item-container[data-path="${html_encode(l.A.dirname(e))}" i]`),immutable:t.immutable,associated_app_name:t.associated_app?.name,path:e,icon:await item_icon(t),name:l.A.basename(e),uid:t.uid,size:t.size,modified:t.modified,type:t.type,is_dir:!1,is_shared:t.is_shared,suggested_apps:t.suggested_apps}),$(`.item-container[data-path="${html_encode(l.A.dirname(e))}" i]`).each((function(){sort_items(this,$(this).attr("data-sort_by"),$(this).attr("data-sort_order"))})),$(i).close(),show_save_account_notice_if_needed()}catch(e){if("item_with_same_name_exists"!==e.code)return await(0,t.A)({message:e.message??"Upload failed.",parent_uuid:$(i).attr("data-element_uuid")}),void $(i).find(".window-disable-mask, .busy-indicator").hide();{const a=await(0,t.A)({message:`${html_encode(e.entry_name)} already exists.`,buttons:[{label:"Replace",value:"replace",type:"primary"},{label:"Cancel",value:"cancel"}],parent_uuid:$(i).attr("data-element_uuid")});if("replace"===a)n=!0;else if("cancel"===a)return void $(i).find(".window-disable-mask, .busy-indicator").hide()}}}}let s=Date.now()-n;s>=busy_indicator_hide_delay?$(i).close():setTimeout((()=>{$(i).close()}),Math.abs(busy_indicator_hide_delay-s))}})}else if("saveToPictures"===a.data.msg||"saveToDesktop"===a.data.msg||"saveToAppData"===a.data.msg||"saveToDocuments"===a.data.msg||"saveToVideos"===a.data.msg||"saveToAudio"===a.data.msg){let e,n=!1;if("saveToPictures"===a.data.msg?e=l.A.join(pictures_path,a.data.filename):"saveToDesktop"===a.data.msg?e=l.A.join(desktop_path,a.data.filename):"saveToDocuments"===a.data.msg?e=l.A.join(documents_path,a.data.filename):"saveToVideos"===a.data.msg?e=l.A.join(videos_path,a.data.filename):"saveToAudio"===a.data.msg?e=l.A.join(audio_path,a.data.filename):"saveToAppData"===a.data.msg&&(e=l.A.join(appdata_path,h,a.data.filename),n=!0),!is_auth()&&!await(0,i.A)({referrer:u}))return;let o=!0,s=!1;if(a.data.url){let i=operation_id++;window.progress_tracker[i]=[],window.progress_tracker[i][0]={},window.progress_tracker[i][0].total=0,window.progress_tracker[i][0].ajax_uploaded=0,window.progress_tracker[i][0].cloud_uploaded=0;let n=!0;for(;n;)await(0,r.A)({url:a.data.url,name:l.A.basename(e),dest_path:l.A.dirname(e),auth_token,api_origin,dedupe_name:!0,overwrite:!1,operation_id:i,item_upload_id:0,success:function(t){},error:function(e){(0,t.A)(e&&e.message?e.message:"Download failed.")}}),n=!1}else{let i=new File([a.data.content],l.A.basename(e));for(;o;){s&&(o=!1);try{const t=await puter.fs.write(e,i,{dedupeName:!0,overwrite:!1,createMissingAncestors:n});o=!1;let a=await puter.fs.sign(h,{uid:t.uid,action:"write"});a=a.items,p.contentWindow.postMessage({msg:"fileSaved",original_msg_id:m,filename:t.name,saved_file:{name:a.fsentry_name,readURL:a.read_url,writeURL:a.write_url,metadataURL:a.metadata_url,uid:a.uid,path:"~/"+t.path.split("/").slice(2).join("/")}},"*"),$(p).get(0).focus({preventScroll:!0})}catch(e){if("item_with_same_name_exists"!==e.code)break;{const i=await(0,t.A)({message:`${html_encode(e.entry_name)} already exists.`,buttons:[{label:"Replace",type:"primary"},{label:"Cancel"}],parent_uuid:a.data.appInstanceID});"Replace"===i?s=!0:"Cancel"===i&&(o=!1)}}}}}else"exit"===a.data.msg&&$(`.window[data-element_uuid="${a.data.appInstanceID}"]`).close({bypass_iframe_messaging:!0})}}))})(),(()=>{window.clipboard_op="",window.clipboard=[],window.window_nav_history={},window.window_nav_history_current_position={},window.progress_tracker=[],window.upload_item_global_id=0,window.download_progress=[],window.download_item_global_id=0,window.TRUNCATE_LENGTH=20,window.window_width_threshold_for_sidebar=500,window.mouseover_window=null,window.active_item_container=null,window.mouseX=0,window.mouseY=0;try{window.logged_in_users=JSON.parse(localStorage.getItem("logged_in_users"))}catch(t){window.logged_in_users=[]}null===window.logged_in_users&&(window.logged_in_users=[]),window.auth_token=localStorage.getItem("auth_token");try{window.user=JSON.parse(localStorage.getItem("user"))}catch(t){window.user=null}if(0===window.logged_in_users.length&&null!==window.user){let t=window.user;t.auth_token=window.auth_token,window.logged_in_users.push(t),localStorage.setItem("logged_in_users",window.logged_in_users)}window.last_window_zindex=1,window.first_visit_ever=null===localStorage.getItem("has_visited_before"),localStorage.setItem("has_visited_before",!0),void 0!==window.user&&null!==window.user&&(window.desktop_path="/"+window.user.username+"/Desktop",window.trash_path="/"+window.user.username+"/Trash",window.appdata_path="/"+window.user.username+"/AppData",window.documents_path="/"+window.user.username+"/Documents",window.pictures_path="/"+window.user.username+"/Photos",window.videos_path="/"+window.user.username+"/Videos",window.audio_path="/"+window.user.username+"/Audio",window.home_path="/"+window.user.username),window.root_dirname="Puter",window.window_stack=[],window.toolbar_height=30,window.default_taskbar_height=50,window.taskbar_height=window.default_taskbar_height,window.upload_progress_hide_delay=500,window.active_uploads={},window.copy_progress_hide_delay=1e3,window.busy_indicator_hide_delay=600,window.global_element_id=0,window.operation_id=0,window.operation_cancelled=[],window.last_enter_pressed_to_rename_ts=0,window.window_counter=0,window.keypress_item_seach_term="",window.keypress_item_seach_buffer_timeout=void 0,window.first_visit_animation=!1,window.show_twitter_link=!0,window.animate_window_opening=!0,window.animate_window_closing=!0,window.desktop_loading_fade_delay=window.first_visit_ever&&first_visit_animation?6e3:1e3,window.watchItems=[],window.appdata_signatures={},window.appCallbackFunctions=[],window.launch_apps=[],window.launch_apps.recent=[],window.launch_apps.recommended=[],window.location!==window.parent.location?(window.is_embedded=!0,window.taskbar_height=0):window.is_embedded=!1,window.desktop_height=window.innerHeight-window.toolbar_height-window.taskbar_height,window.desktop_width=window.innerWidth,$(window).on("resize",(function(){window.desktop_height=window.innerHeight-window.toolbar_height-window.taskbar_height,window.desktop_width=window.innerWidth})),window.active_element=null,window.launch_recent_apps_count=10,window.current_active_snap_zone=void 0,window.is_fullpage_mode=!1,window.window_border_radius=4,window.sites=[],window.feature_flags={create_shortcut:!0,prompt_user_when_navigation_away_from_puter:!1,download_directory:!0}})()})(); \ No newline at end of file diff --git a/dist/favicon.ico b/dist/favicon.ico new file mode 100644 index 00000000..fb6850b9 Binary files /dev/null and b/dist/favicon.ico differ diff --git a/dist/favicons/android-icon-144x144.png b/dist/favicons/android-icon-144x144.png new file mode 100644 index 00000000..d88ef895 Binary files /dev/null and b/dist/favicons/android-icon-144x144.png differ diff --git a/dist/favicons/android-icon-192x192.png b/dist/favicons/android-icon-192x192.png new file mode 100644 index 00000000..18c2afb5 Binary files /dev/null and b/dist/favicons/android-icon-192x192.png differ diff --git a/dist/favicons/android-icon-36x36.png b/dist/favicons/android-icon-36x36.png new file mode 100644 index 00000000..6ea7d639 Binary files /dev/null and b/dist/favicons/android-icon-36x36.png differ diff --git a/dist/favicons/android-icon-48x48.png b/dist/favicons/android-icon-48x48.png new file mode 100644 index 00000000..839af37e Binary files /dev/null and b/dist/favicons/android-icon-48x48.png differ diff --git a/dist/favicons/android-icon-72x72.png b/dist/favicons/android-icon-72x72.png new file mode 100644 index 00000000..39dea976 Binary files /dev/null and b/dist/favicons/android-icon-72x72.png differ diff --git a/dist/favicons/android-icon-96x96.png b/dist/favicons/android-icon-96x96.png new file mode 100644 index 00000000..a2c800a8 Binary files /dev/null and b/dist/favicons/android-icon-96x96.png differ diff --git a/dist/favicons/apple-icon-114x114.png b/dist/favicons/apple-icon-114x114.png new file mode 100644 index 00000000..f614ac1f Binary files /dev/null and b/dist/favicons/apple-icon-114x114.png differ diff --git a/dist/favicons/apple-icon-120x120.png b/dist/favicons/apple-icon-120x120.png new file mode 100644 index 00000000..974bf403 Binary files /dev/null and b/dist/favicons/apple-icon-120x120.png differ diff --git a/dist/favicons/apple-icon-144x144.png b/dist/favicons/apple-icon-144x144.png new file mode 100644 index 00000000..cfc5754d Binary files /dev/null and b/dist/favicons/apple-icon-144x144.png differ diff --git a/dist/favicons/apple-icon-152x152.png b/dist/favicons/apple-icon-152x152.png new file mode 100644 index 00000000..e75238c1 Binary files /dev/null and b/dist/favicons/apple-icon-152x152.png differ diff --git a/dist/favicons/apple-icon-180x180.png b/dist/favicons/apple-icon-180x180.png new file mode 100644 index 00000000..4018c4c8 Binary files /dev/null and b/dist/favicons/apple-icon-180x180.png differ diff --git a/dist/favicons/apple-icon-57x57.png b/dist/favicons/apple-icon-57x57.png new file mode 100644 index 00000000..5847a33d Binary files /dev/null and b/dist/favicons/apple-icon-57x57.png differ diff --git a/dist/favicons/apple-icon-60x60.png b/dist/favicons/apple-icon-60x60.png new file mode 100644 index 00000000..9b6da6c5 Binary files /dev/null and b/dist/favicons/apple-icon-60x60.png differ diff --git a/dist/favicons/apple-icon-72x72.png b/dist/favicons/apple-icon-72x72.png new file mode 100644 index 00000000..d37a8c39 Binary files /dev/null and b/dist/favicons/apple-icon-72x72.png differ diff --git a/dist/favicons/apple-icon-76x76.png b/dist/favicons/apple-icon-76x76.png new file mode 100644 index 00000000..84788d5d Binary files /dev/null and b/dist/favicons/apple-icon-76x76.png differ diff --git a/dist/favicons/apple-icon-precomposed.png b/dist/favicons/apple-icon-precomposed.png new file mode 100644 index 00000000..5eb45b11 Binary files /dev/null and b/dist/favicons/apple-icon-precomposed.png differ diff --git a/dist/favicons/apple-icon.png b/dist/favicons/apple-icon.png new file mode 100644 index 00000000..5eb45b11 Binary files /dev/null and b/dist/favicons/apple-icon.png differ diff --git a/dist/favicons/browserconfig.xml b/dist/favicons/browserconfig.xml new file mode 100644 index 00000000..c5541482 --- /dev/null +++ b/dist/favicons/browserconfig.xml @@ -0,0 +1,2 @@ + +#ffffff \ No newline at end of file diff --git a/dist/favicons/favicon-16x16.png b/dist/favicons/favicon-16x16.png new file mode 100644 index 00000000..5335cd1d Binary files /dev/null and b/dist/favicons/favicon-16x16.png differ diff --git a/dist/favicons/favicon-32x32.png b/dist/favicons/favicon-32x32.png new file mode 100644 index 00000000..a24dfc5a Binary files /dev/null and b/dist/favicons/favicon-32x32.png differ diff --git a/dist/favicons/favicon-96x96.png b/dist/favicons/favicon-96x96.png new file mode 100644 index 00000000..50907041 Binary files /dev/null and b/dist/favicons/favicon-96x96.png differ diff --git a/dist/favicons/favicon.ico b/dist/favicons/favicon.ico new file mode 100644 index 00000000..f0e2d698 Binary files /dev/null and b/dist/favicons/favicon.ico differ diff --git a/dist/favicons/manifest.json b/dist/favicons/manifest.json new file mode 100644 index 00000000..013d4a6a --- /dev/null +++ b/dist/favicons/manifest.json @@ -0,0 +1,41 @@ +{ + "name": "App", + "icons": [ + { + "src": "\/android-icon-36x36.png", + "sizes": "36x36", + "type": "image\/png", + "density": "0.75" + }, + { + "src": "\/android-icon-48x48.png", + "sizes": "48x48", + "type": "image\/png", + "density": "1.0" + }, + { + "src": "\/android-icon-72x72.png", + "sizes": "72x72", + "type": "image\/png", + "density": "1.5" + }, + { + "src": "\/android-icon-96x96.png", + "sizes": "96x96", + "type": "image\/png", + "density": "2.0" + }, + { + "src": "\/android-icon-144x144.png", + "sizes": "144x144", + "type": "image\/png", + "density": "3.0" + }, + { + "src": "\/android-icon-192x192.png", + "sizes": "192x192", + "type": "image\/png", + "density": "4.0" + } + ] +} \ No newline at end of file diff --git a/dist/favicons/ms-icon-144x144.png b/dist/favicons/ms-icon-144x144.png new file mode 100644 index 00000000..cfc5754d Binary files /dev/null and b/dist/favicons/ms-icon-144x144.png differ diff --git a/dist/favicons/ms-icon-150x150.png b/dist/favicons/ms-icon-150x150.png new file mode 100644 index 00000000..ca07e8ea Binary files /dev/null and b/dist/favicons/ms-icon-150x150.png differ diff --git a/dist/favicons/ms-icon-310x310.png b/dist/favicons/ms-icon-310x310.png new file mode 100644 index 00000000..3d60fdcd Binary files /dev/null and b/dist/favicons/ms-icon-310x310.png differ diff --git a/dist/favicons/ms-icon-70x70.png b/dist/favicons/ms-icon-70x70.png new file mode 100644 index 00000000..172a3ba6 Binary files /dev/null and b/dist/favicons/ms-icon-70x70.png differ diff --git a/dist/gui.js b/dist/gui.js new file mode 100644 index 00000000..b81eb9aa --- /dev/null +++ b/dist/gui.js @@ -0,0 +1,127 @@ +window.gui_env="prod"; + +window.puter_gui_enabled = true; +/** + * Initializes and configures the GUI (Graphical User Interface) settings based on the provided options. + * + * The function sets global variables in the window object for various settings such as origins and domain names. + * It also handles loading different resources depending on the environment (development or production). + * + * @param {Object} options - Configuration options to initialize the GUI. + * @param {string} [options.gui_origin='https://puter.com'] - The origin URL for the GUI. + * @param {string} [options.api_origin='https://api.puter.com'] - The origin URL for the API. + * @param {number} [options.max_item_name_length=500] - Maximum allowed length for an item name. + * @param {boolean} [options.require_email_verification_to_publish_website=true] - Flag to decide whether email verification is required to publish a website. + * + * @property {string} [options.app_domain] - Extracted domain name from gui_origin. It's derived automatically if not provided. + * @property {string} [window.gui_env] - The environment in which the GUI is running (e.g., "dev" or "prod"). + * + * @returns {Promise} Returns a promise that resolves when initialization and resource loading are complete. + * + * @example + * window.gui({ + * gui_origin: 'https://myapp.com', + * api_origin: 'https://myapi.com', + * max_item_name_length: 250 + * }); + */ + +window.gui = async function(options){ + options = options ?? {}; + // app_origin is deprecated, use gui_origin instead + window.gui_origin = options.gui_origin ?? options.app_origin ?? `https://puter.com`; + window.app_domain = options.app_domain ?? new URL(window.gui_origin).hostname; + window.hosting_domain = options.hosting_domain ?? 'puter.site'; + window.api_origin = options.api_origin ?? "https://api.puter.com"; + window.max_item_name_length = options.max_item_name_length ?? 500; + window.require_email_verification_to_publish_website = options.require_email_verification_to_publish_website ?? true; + + // Add Puter.JS + await loadScript('https://js.puter.com/v2/'); + + // DEV: Load the initgui.js file if we are in development mode + if(!window.gui_env || window.gui_env === "dev"){ + await loadScript('/initgui.js', {isModule: true}); + } + + // PROD: load the minified bundles if we are in production mode + // note: the order of the bundles is important + // note: Build script will prepend `window.gui_env="prod"` to the top of the file + else if(gui_env === "prod"){ + // Load the minified bundles + await loadCSS('/dist/bundle.min.css'); + await loadScript('/dist/bundle.min.js'); + } + + // 🚀 Launch the GUI 🚀 + initgui(); +} + +/** +* Dynamically loads an external JavaScript file. +* @param {string} url The URL of the external script to load. +* @param {Object} [options] Optional configuration for the script. +* @param {boolean} [options.isModule] Whether the script is a module. +* @param {boolean} [options.defer] Whether the script should be deferred. +* @param {Object} [options.dataAttributes] An object containing data attributes to add to the script element. +* @returns {Promise} A promise that resolves once the script has loaded, or rejects on error. +*/ +window.loadScript = async function(url, options = {}) { + return new Promise((resolve, reject) => { + const script = document.createElement('script'); + script.src = url; + + // Set default script loading behavior + script.async = true; + + // Handle if it is a module + if (options.isModule) { + script.type = 'module'; + } + + // Handle defer attribute + if (options.defer) { + script.defer = true; + script.async = false; // When "defer" is true, "async" should be false as they are mutually exclusive + } + + // Add arbitrary data attributes + if (options.dataAttributes && typeof options.dataAttributes === 'object') { + for (const [key, value] of Object.entries(options.dataAttributes)) { + script.setAttribute(`data-${key}`, value); + } + } + + // Resolve the promise when the script is loaded + script.onload = () => resolve(); + + // Reject the promise if there's an error during load + script.onerror = (error) => reject(new Error(`Failed to load script at url: ${url}`)); + + // Append the script to the body + document.body.appendChild(script); + }); +}; + +/** +* Dynamically loads an external CSS file. +* @param {string} url The URL of the external CSS to load. +* @returns {Promise} A promise that resolves once the CSS has loaded, or rejects on error. +*/ +window.loadCSS = async function(url) { + return new Promise((resolve, reject) => { + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = url; + + link.onload = () => { + resolve(); + }; + + link.onerror = (error) => { + reject(new Error(`Failed to load CSS at url: ${url}`)); + }; + + document.head.appendChild(link); + }); +} \ No newline at end of file diff --git a/dist/images/screenshot.png b/dist/images/screenshot.png new file mode 100644 index 00000000..0c873268 Binary files /dev/null and b/dist/images/screenshot.png differ diff --git a/dist/images/wallpaper.webp b/dist/images/wallpaper.webp new file mode 100644 index 00000000..ab620c60 Binary files /dev/null and b/dist/images/wallpaper.webp differ diff --git a/dist/manifest.json b/dist/manifest.json new file mode 100644 index 00000000..097be8ab --- /dev/null +++ b/dist/manifest.json @@ -0,0 +1,41 @@ +{ + "name": "App", + "icons": [ + { + "src": "/favicons/android-icon-36x36.png", + "sizes": "36x36", + "type": "image/png", + "density": "0.75" + }, + { + "src": "/favicons/android-icon-48x48.png", + "sizes": "48x48", + "type": "image/png", + "density": "1.0" + }, + { + "src": "/favicons/android-icon-72x72.png", + "sizes": "72x72", + "type": "image/png", + "density": "1.5" + }, + { + "src": "/favicons/android-icon-96x96.png", + "sizes": "96x96", + "type": "image/png", + "density": "2.0" + }, + { + "src": "/favicons/android-icon-144x144.png", + "sizes": "144x144", + "type": "image/png", + "density": "3.0" + }, + { + "src": "/favicons/android-icon-192x192.png", + "sizes": "192x192", + "type": "image/png", + "density": "4.0" + } + ] +} \ No newline at end of file diff --git a/docs/prod.md b/docs/prod.md new file mode 100644 index 00000000..5d04898f --- /dev/null +++ b/docs/prod.md @@ -0,0 +1,137 @@ +# Puter in Production + +## Building + +```bash +npm run build +``` + +## Usage + +Will build Puter in the `dist` directory. Include the generated `./dist/gui.js` file in your HTML page and call `gui()` when the page is loaded: + +```html + + +``` + +## Full Production Example + +Assuming the following directory structure in production: + +``` +. +├── dist/ +│ ├── favicons/ +│ ├── images/ +│ ├── bundle.min.css +│ ├── bundle.min.js +│ ├── gui.js +│ └── ... +└── index.html +``` + +The `index.html` file below will load Puter and all the necessary meta tags, favicons, and branding assets: + +```html + + + + + Puter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +### Server settings + +The GUI is a single page application (SPA) and as best practice any route under root (`/*`) should preferably load the `index.html` file. However, there are situations where we want to load a custom page for a specific route: for example, the `/privacy` route may need to load a page that contains your privacy policy and has nothing to do with the GUI application. In these cases it is ok to load a custom page as long as the following essential GUI routes are loaded with the GUI (i.e. `index.html` file): +- `/app/*` +- `/action/*` + +In other words, consider the routes above as "reserved" for Puter. + +### Best Practices + +- The `title` tags and meta tags (``, `privacy-first personal cloud to keep all your files, apps, and games in one private and secure place, accessible from anywhere at any time.` the `` tag should be escaped to `<b>` so that the browser doesn't interpret it as an HTML tag. + +- Make sure to replace all new line characters with space when dynamically adding text to the HTML page. + +- Generally, for UX and SEO reasons make sure that the tags are filled with relevant information about the state the URL is representing. E.g. is the user on the desktop or an app? diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..9087a096 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2510 @@ +{ + "name": "puter.com", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "puter.com", + "version": "1.0.0", + "license": "AGPL-3.0-only", + "devDependencies": { + "chalk": "^4.1.0", + "clean-css": "^5.3.2", + "express": "^4.18.2", + "html-entities": "^2.3.3", + "nodemon": "^2.0.22", + "uglify-js": "^3.17.4", + "webpack": "^5.88.2", + "webpack-cli": "^5.1.1" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", + "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@types/eslint": { + "version": "8.56.5", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.5.tgz", + "integrity": "sha512-u5/YPJHo1tvkSF2CE0USEkxon82Z5DBy2xR+qfyYNszpX9qcs4sT6uq2kBbj4BXY1+DBGDPnrhMZV3pKWGNukw==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", + "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", + "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-opt": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6", + "@webassemblyjs/wast-printer": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", + "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", + "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", + "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", + "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001591", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001591.tgz", + "integrity": "sha512-PCzRMei/vXjJyL5mJtzNiUCKP59dm8Apqc3PH8gJkMnMXZGox93RbE76jHsmLwmIo6/3nsYIpJtx0O7u5PqFuQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/clean-css": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", + "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", + "dev": true, + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 10.0" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.690", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.690.tgz", + "integrity": "sha512-+2OAGjUx68xElQhydpcbqH50hE8Vs2K6TkAeLhICYfndb67CVH0UsZaijmRUE3rHlIxU1u0jxwhgVe6fK3YANA==", + "dev": true + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.1.tgz", + "integrity": "sha512-3d3JRbwsCLJsYgvb6NuWEG44jjPSOMuS73L/6+7BZuoKm3W+qXnSoIYVHi8dG7Qcg4inAY4jbzkZ7MnskePeDg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/envinfo": { + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.11.1.tgz", + "integrity": "sha512-8PiZgZNIB4q/Lw4AhOvAfB/ityHAd2bli3lESSWmWSzSsl5dKpy5N1d1Rfkd2teq/g9xN90lc6o98DOjMeYHpg==", + "dev": true, + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", + "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/express": { + "version": "4.18.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz", + "integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==", + "dev": true, + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-entities": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.4.0.tgz", + "integrity": "sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ] + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "dev": true + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "node_modules/nodemon": { + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/nodemon/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/nodemon/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nodemon/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dev": true, + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-update-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", + "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", + "dev": true, + "dependencies": { + "semver": "~7.0.0" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser": { + "version": "5.28.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.28.1.tgz", + "integrity": "sha512-wM+bZp54v/E9eRRGXb5ZFDvinrJIOaTapx3WUokyVGZu5ucVCK55zEgGd5Dl2fSr3jUo5sDiERErUWLY6QPFyA==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.20", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "dev": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack": { + "version": "5.90.3", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.90.3.tgz", + "integrity": "sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA==", + "dev": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.9.0", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.15.0", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "dev": true, + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", + "colorette": "^2.0.14", + "commander": "^10.0.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..e9074d8f --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "puter.com", + "version": "1.0.0", + "author": "Puter Technologies Inc.", + "license": "AGPL-3.0-only", + "description": "Desktop environment in the browser!", + "homepage": "https://puter.com", + "directories": { + "lib": "lib" + }, + "devDependencies": { + "chalk": "^4.1.0", + "clean-css": "^5.3.2", + "html-entities": "^2.3.3", + "webpack": "^5.88.2", + "express": "^4.18.2", + "nodemon": "^2.0.22", + "uglify-js": "^3.17.4", + "webpack-cli": "^5.1.1" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start": "nodemon --exec \"node dev-server.js\" ", + "build": "node ./build.js" + }, + "nodemonConfig": { + "ext": "js, json, mjs, jsx, svg, css", + "ignore": [ + "./dist/", + "./node_modules/" + ] + } +} diff --git a/src/IPC.js b/src/IPC.js new file mode 100644 index 00000000..adc6307b --- /dev/null +++ b/src/IPC.js @@ -0,0 +1,953 @@ +import UIAlert from './UI/UIAlert.js'; +import UIWindow from './UI/UIWindow.js'; +import UIWindowSignup from './UI/UIWindowSignup.js'; +import UIWindowRequestPermission from './UI/UIWindowRequestPermission.js'; +import UIItem from './UI/UIItem.js' +import UIWindowFontPicker from './UI/UIWindowFontPicker.js'; +import UIWindowColorPicker from './UI/UIWindowColorPicker.js'; +import UIPrompt from './UI/UIPrompt.js'; +import download from './helpers/download.js'; +import path from "./lib/path.js"; + +/** + * In Puter, apps are loaded in iframes and communicate with the graphical user interface (GUI) aand each other using the postMessage API. + * The following sets up an Inter-Process Messaging System between apps and the GUI that enables communication + * for various tasks such as displaying alerts, prompts, managing windows, handling file operations, and more. + * + * The system listens for 'message' events on the window object, handling different types of messages from the app (which is loaded in an iframe), + * such as ALERT, createWindow, showOpenFilePicker, ... + * Each message handler performs specific actions, including creating UI windows, handling file saves and reads, and responding to user interactions. + * + * Precautions are taken to ensure proper usage of appInstanceIDs and other sensitive information. + */ +window.addEventListener('message', async (event) => { + const app_env = event.data?.env ?? 'app'; + + // Only process messages from apps + if(app_env !== 'app') + return; + + // -------------------------------------------------------- + // A response to a GUI message received from the app. + // -------------------------------------------------------- + if (typeof event.data.original_msg_id !== "undefined" && typeof appCallbackFunctions[event.data.original_msg_id] !== "undefined") { + // Execute callback + appCallbackFunctions[event.data.original_msg_id](event.data); + // Remove this callback function since it won't be needed again + delete appCallbackFunctions[event.data.original_msg_id]; + + // Done + return; + } + + // -------------------------------------------------------- + // Message from apps + // -------------------------------------------------------- + + // `data` and `msg` are required + if(!event.data || !event.data.msg){ + return; + } + + // `appInstanceID` is required + if(!event.data.appInstanceID){ + console.log(`appInstanceID is needed`); + return; + } + + const $el_parent_window = $(`.window[data-element_uuid="${event.data.appInstanceID}"]`); + const parent_window_id = $el_parent_window.attr('data-id'); + const $el_parent_disable_mask = $el_parent_window.find('.window-disable-mask'); + const target_iframe = $(`.window[data-element_uuid="${event.data.appInstanceID}"]`).find('.window-app-iframe').get(0); + const msg_id = event.data.uuid; + const app_name = $(target_iframe).attr('data-app'); + const app_uuid = $el_parent_window.attr('data-app_uuid'); + + // todo validate all event.data stuff coming from the client (e.g. event.data.message, .msg, ...) + //------------------------------------------------- + // READY + //------------------------------------------------- + if(event.data.msg === 'READY'){ + $(target_iframe).attr('data-appUsesSDK', 'true'); + } + //------------------------------------------------- + // windowFocused + //------------------------------------------------- + else if(event.data.msg === 'windowFocused'){ + console.log('windowFocused'); + } + //-------------------------------------------------------- + // ALERT + //-------------------------------------------------------- + else if(event.data.msg === 'ALERT' && event.data.message !== undefined){ + const alert_resp = await UIAlert({ + message: html_encode(event.data.message), + buttons: event.data.buttons, + type: event.data.options?.type, + window_options: { + parent_uuid: event.data.appInstanceID, + disable_parent_window: true, + } + }) + + target_iframe.contentWindow.postMessage({ + original_msg_id: msg_id, + msg: 'alertResponded', + response: alert_resp, + }, '*'); + } + //-------------------------------------------------------- + // PROMPT + //-------------------------------------------------------- + else if(event.data.msg === 'PROMPT' && event.data.message !== undefined){ + const prompt_resp = await UIPrompt({ + message: html_encode(event.data.message), + placeholder: html_encode(event.data.placeholder), + window_options: { + parent_uuid: event.data.appInstanceID, + disable_parent_window: true, + } + }) + + target_iframe.contentWindow.postMessage({ + original_msg_id: msg_id, + msg: 'promptResponded', + response: prompt_resp, + }, '*'); + } + //-------------------------------------------------------- + // env + //-------------------------------------------------------- + else if(event.data.msg === 'env'){ + target_iframe.contentWindow.postMessage({ + original_msg_id: msg_id, + }, '*'); + } + //-------------------------------------------------------- + // createWindow + //-------------------------------------------------------- + else if(event.data.msg === 'createWindow'){ + // todo: validate as many of these as possible + if(event.data.options){ + UIWindow({ + title: event.data.options.title, + disable_parent_window: event.data.options.disable_parent_window, + width: event.data.options.width, + height: event.data.options.height, + is_resizable: event.data.options.is_resizable, + has_head: event.data.options.has_head, + center: event.data.options.center, + show_in_taskbar: event.data.options.show_in_taskbar, + iframe_srcdoc: event.data.options.content, + iframe_url: event.data.options.url, + parent_uuid: event.data.appInstanceID, + }) + } + } + //-------------------------------------------------------- + // setItem + //-------------------------------------------------------- + else if(event.data.msg === 'setItem' && event.data.key && event.data.value){ + // todo: validate key and value to avoid unnecessary api calls + return await $.ajax({ + url: api_origin + "/setItem", + type: 'POST', + data: JSON.stringify({ + app: app_uuid, + key: event.data.key, + value: event.data.value, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (fsentry){ + } + }) + } + //-------------------------------------------------------- + // getItem + //-------------------------------------------------------- + else if(event.data.msg === 'getItem' && event.data.key){ + // todo: validate key to avoid unnecessary api calls + $.ajax({ + url: api_origin + "/getItem", + type: 'POST', + data: JSON.stringify({ + key: event.data.key, + app: app_uuid, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (result){ + // send confirmation to requester window + target_iframe.contentWindow.postMessage({ + original_msg_id: msg_id, + msg: 'getItemSucceeded', + value: result ? result.value : null, + }, '*'); + } + }) + } + //-------------------------------------------------------- + // removeItem + //-------------------------------------------------------- + else if(event.data.msg === 'removeItem' && event.data.key){ + // todo: validate key to avoid unnecessary api calls + $.ajax({ + url: api_origin + "/removeItem", + type: 'POST', + data: JSON.stringify({ + key: event.data.key, + app: app_uuid, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (result){ + // send confirmation to requester window + target_iframe.contentWindow.postMessage({ + original_msg_id: msg_id, + }, '*'); + } + }) + } + //-------------------------------------------------------- + // showOpenFilePicker + //-------------------------------------------------------- + else if(event.data.msg === 'showOpenFilePicker'){ + // Auth + if(!is_auth() && !(await UIWindowSignup({referrer: app_name}))) + return; + + // Disable parent window + $el_parent_window.addClass('window-disabled') + $el_parent_disable_mask.show(); + $el_parent_disable_mask.css('z-index', parseInt($el_parent_window.css('z-index')) + 1); + $(target_iframe).blur(); + + // Allowed_file_types + let allowed_file_types = ""; + if(event.data.options && event.data.options.accept) + allowed_file_types = event.data.options.accept; + + // selectable_body + let is_selectable_body = false; + if(event.data.options && event.data.options.multiple && event.data.options.multiple === true) + is_selectable_body = true; + + // Open dialog + UIWindow({ + allowed_file_types: allowed_file_types, + path: '/' + window.user.username + '/Desktop', + // this is the uuid of the window to which this dialog will return + parent_uuid: event.data.appInstanceID, + show_maximize_button: false, + show_minimize_button: false, + title: 'Open', + is_dir: true, + is_openFileDialog: true, + selectable_body: is_selectable_body, + iframe_msg_uid: msg_id, + initiating_app_uuid: app_uuid, + center: true, + }); + } + //-------------------------------------------------------- + // showDirectoryPicker + //-------------------------------------------------------- + else if(event.data.msg === 'showDirectoryPicker'){ + // Auth + if(!is_auth() && !(await UIWindowSignup({referrer: app_name}))) + return; + + // Disable parent window + $el_parent_window.addClass('window-disabled') + $el_parent_disable_mask.show(); + $el_parent_disable_mask.css('z-index', parseInt($el_parent_window.css('z-index')) + 1); + $(target_iframe).blur(); + + // allowed_file_types + let allowed_file_types = ""; + if(event.data.options && event.data.options.accept) + allowed_file_types = event.data.options.accept; + + // selectable_body + let is_selectable_body = false; + if(event.data.options && event.data.options.multiple && event.data.options.multiple === true) + is_selectable_body = true; + + // open dialog + UIWindow({ + path: '/' + window.user.username + '/Desktop', + // this is the uuid of the window to which this dialog will return + parent_uuid: event.data.appInstanceID, + show_maximize_button: false, + show_minimize_button: false, + title: 'Open', + is_dir: true, + is_directoryPicker: true, + selectable_body: is_selectable_body, + iframe_msg_uid: msg_id, + center: true, + initiating_app_uuid: app_uuid, + }); + } + + //-------------------------------------------------------- + // setWindowTitle + //-------------------------------------------------------- + else if(event.data.msg === 'setWindowTitle' && event.data.new_title !== undefined){ + const el_window = $(`.window[data-element_uuid="${event.data.appInstanceID}"]`).get(0); + // set window title + $(el_window).find(`.window-head-title`).html(html_encode(event.data.new_title)); + // send confirmation to requester window + target_iframe.contentWindow.postMessage({ + original_msg_id: msg_id, + }, '*'); + } + //-------------------------------------------------------- + // watchItem + //-------------------------------------------------------- + else if(event.data.msg === 'watchItem' && event.data.item_uid !== undefined){ + if(!window.watchItems[event.data.item_uid]) + window.watchItems[event.data.item_uid] = []; + + window.watchItems[event.data.item_uid].push(event.data.appInstanceID); + } + //-------------------------------------------------------- + // openItem + //-------------------------------------------------------- + else if(event.data.msg === 'openItem'){ + // check if readURL returns 200 + $.ajax({ + url: event.data.metadataURL + '&return_suggested_apps=true&return_path=true', + type: 'GET', + headers: { + "Authorization": "Bearer "+auth_token + }, + success: async function(metadata){ + $.ajax({ + url: api_origin + "/open_item", + type: 'POST', + contentType: "application/json", + data: JSON.stringify({ + uid: metadata.uid ?? undefined, + path: metadata.path ?? undefined, + }), + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function(open_item_meta){ + setTimeout(function(){ + launch_app({ + name: metadata.name, + file_path: metadata.path, + app_obj: open_item_meta.suggested_apps[0], + window_title: metadata.name, + file_uid: metadata.uid, + file_signature: open_item_meta.signature, + }); + // todo: this is done because sometimes other windows such as openFileDialog + // bring focus to their apps and steal the focus from the newly-opened app + }, 800); + }, + }); + } + }) + } + //-------------------------------------------------------- + // launchApp + //-------------------------------------------------------- + else if(event.data.msg === 'launchApp'){ + // launch app + launch_app({ + name: event.data.app_name ?? app_name, + args: event.data.args ?? {}, + }); + + // send confirmation to requester window + target_iframe.contentWindow.postMessage({ + original_msg_id: msg_id, + }, '*'); + } + //-------------------------------------------------------- + // readAppDataFile + //-------------------------------------------------------- + else if(event.data.msg === 'readAppDataFile' && event.data.path !== undefined){ + // resolve path to absolute + event.data.path = path.resolve(event.data.path); + + // join with appdata dir + const file_path = path.join(appdata_path, app_uuid, event.data.path); + + puter.fs.sign(app_uuid, { + path: file_path, + action: 'write', + }, + function(signature){ + signature = signature.items; + signature.signatures = signature.signatures ?? [signature]; + if(signature.signatures.length > 0 && signature.signatures[0].path){ + signature.signatures[0].path = `~/` + signature.signatures[0].path.split('/').slice(2).join('/') + // send confirmation to requester window + target_iframe.contentWindow.postMessage({ + msg: "readAppDataFileSucceeded", + original_msg_id: msg_id, + item: signature.signatures[0], + }, '*'); + }else{ + // send error to requester window + target_iframe.contentWindow.postMessage({ + msg: "readAppDataFileFailed", + original_msg_id: msg_id, + }, '*'); + } + } + ) + } + //-------------------------------------------------------- + // getAppData + //-------------------------------------------------------- + // todo appdata should be provided from the /open_item api call + else if(event.data.msg === 'getAppData'){ + if(appdata_signatures[app_uuid]){ + target_iframe.contentWindow.postMessage({ + msg: "getAppDataSucceeded", + original_msg_id: msg_id, + item: appdata_signatures[app_uuid], + }, '*'); + } + // make app directory if it doesn't exist + puter.fs.mkdir({ + path: path.join( appdata_path, app_uuid), + rename: false, + overwrite: false, + success: function(dir){ + puter.fs.sign(app_uuid, { + uid: dir.uid, + action: 'write', + success: function(signature){ + signature = signature.items; + appdata_signatures[app_uuid] = signature; + // send confirmation to requester window + target_iframe.contentWindow.postMessage({ + msg: "getAppDataSucceeded", + original_msg_id: msg_id, + item: signature, + }, '*'); + } + }) + }, + error: function(err){ + if(err.existing_fsentry || err.code === 'path_exists'){ + puter.fs.sign(app_uuid, { + uid: err.existing_fsentry.uid, + action: 'write', + success: function(signature){ + signature = signature.items; + appdata_signatures[app_uuid] = signature; + // send confirmation to requester window + target_iframe.contentWindow.postMessage({ + msg: "getAppDataSucceeded", + original_msg_id: msg_id, + item: signature, + }, '*'); + } + }) + } + } + }); + } + //-------------------------------------------------------- + // requestPermission + //-------------------------------------------------------- + else if(event.data.msg === 'requestPermission'){ + // auth + if(!is_auth() && !(await UIWindowSignup({referrer: app_name}))) + return; + + // options must be an object + if(event.data.options === undefined || typeof event.data.options !== 'object') + event.data.options = {}; + + // clear window_options for security reasons + event.data.options.window_options = {} + + // Set app as parent window of font picker window + event.data.options.window_options.parent_uuid = event.data.appInstanceID; + + // disable parent window + event.data.options.window_options.disable_parent_window = true; + + let granted = await UIWindowRequestPermission({ + origin: event.origin, + permission: event.data.options.permission, + window_options: event.data.options.window_options, + }); + + // send selected font to requester window + target_iframe.contentWindow.postMessage({ + msg: "permissionGranted", + granted: granted, + original_msg_id: msg_id, + }, '*'); + $(target_iframe).get(0).focus({preventScroll:true}); + } + //-------------------------------------------------------- + // showFontPicker + //-------------------------------------------------------- + else if(event.data.msg === 'showFontPicker'){ + // auth + if(!is_auth() && !(await UIWindowSignup({referrer: app_name}))) + return; + + // set options + event.data.options = event.data.options ?? {}; + + // clear window_options for security reasons + event.data.options.window_options = {} + + // Set app as parent window of font picker window + event.data.options.window_options.parent_uuid = event.data.appInstanceID; + + // Open font picker + let selected_font = await UIWindowFontPicker(event.data.options); + + // send selected font to requester window + target_iframe.contentWindow.postMessage({ + msg: "fontPicked", + original_msg_id: msg_id, + font: selected_font, + }, '*'); + $(target_iframe).get(0).focus({preventScroll:true}); + } + //-------------------------------------------------------- + // showColorPicker + //-------------------------------------------------------- + else if(event.data.msg === 'showColorPicker'){ + // Auth + if(!is_auth() && !(await UIWindowSignup({referrer: app_name}))) + return; + + // set options + event.data.options = event.data.options ?? {}; + + // Clear window_options for security reasons + event.data.options.window_options = {} + + // Set app as parent window of the font picker window + event.data.options.window_options.parent_uuid = event.data.appInstanceID; + + // Open color picker + let selected_color = await UIWindowColorPicker(event.data.options); + + // Send selected color to requester window + target_iframe.contentWindow.postMessage({ + msg: "colorPicked", + original_msg_id: msg_id, + color: selected_color ? selected_color.color : undefined, + }, '*'); + $(target_iframe).get(0).focus({preventScroll:true}); + } + //-------------------------------------------------------- + // setWallpaper + //-------------------------------------------------------- + else if(event.data.msg === 'setWallpaper'){ + // Auth + if(!is_auth() && !(await UIWindowSignup({referrer: app_name}))) + return; + + // No options? + if(!event.data.options) + event.data.options = {}; + + // /set-desktop-bg + try{ + await $.ajax({ + url: api_origin + "/set-desktop-bg", + type: 'POST', + data: JSON.stringify({ + url: event.data.readURL, + fit: event.data.options.fit ?? 'cover', + color: event.data.options.color, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + }); + + // Set wallpaper + window.set_desktop_background({ + url: event.data.readURL, + fit: event.data.options.fit ?? 'cover', + color: event.data.options.color, + }) + + // Send success to app + target_iframe.contentWindow.postMessage({ + msg: "wallpaperSet", + original_msg_id: msg_id, + }, '*'); + $(target_iframe).get(0).focus({preventScroll:true}); + }catch(err){ + console.error(err); + } + } + + //-------------------------------------------------------- + // showSaveFilePicker + //-------------------------------------------------------- + else if(event.data.msg === 'showSaveFilePicker'){ + //auth + if(!is_auth() && !(await UIWindowSignup({referrer: app_name}))) + return; + + //disable parent window + $el_parent_window.addClass('window-disabled') + $el_parent_disable_mask.show(); + $el_parent_disable_mask.css('z-index', parseInt($el_parent_window.css('z-index')) + 1); + $(target_iframe).blur(); + + await UIWindow({ + path: '/' + window.user.username + '/Desktop', + // this is the uuid of the window to which this dialog will return + parent_uuid: event.data.appInstanceID, + show_maximize_button: false, + show_minimize_button: false, + title: 'Save As…', + is_dir: true, + is_saveFileDialog: true, + saveFileDialog_default_filename: event.data.suggestedName ?? '', + selectable_body: false, + iframe_msg_uid: msg_id, + center: true, + initiating_app_uuid: app_uuid, + onSaveFileDialogSave: async function(target_path, el_filedialog_window){ + $(el_filedialog_window).find('.window-disable-mask, .busy-indicator').show(); + let busy_init_ts = Date.now(); + + // ------------------------------------- + // URL + // ------------------------------------- + if(event.data.url){ + // download progress tracker + let dl_op_id = operation_id++; + + // upload progress tracker defaults + window.progress_tracker[dl_op_id] = []; + window.progress_tracker[dl_op_id][0] = {}; + window.progress_tracker[dl_op_id][0].total = 0; + window.progress_tracker[dl_op_id][0].ajax_uploaded = 0; + window.progress_tracker[dl_op_id][0].cloud_uploaded = 0; + + let item_with_same_name_already_exists = true; + while(item_with_same_name_already_exists){ + await download({ + url: event.data.url, + name: path.basename(target_path), + dest_path: path.dirname(target_path), + auth_token: auth_token, + api_origin: api_origin, + dedupe_name: false, + overwrite: false, + operation_id: dl_op_id, + item_upload_id: 0, + success: function(res){ + }, + error: function(err){ + UIAlert(err && err.message ? err.message : "Download failed."); + } + }); + item_with_same_name_already_exists = false; + } + } + // ------------------------------------- + // File + // ------------------------------------- + else{ + let overwrite = false; + let file_to_upload = new File([event.data.content], path.basename(target_path)); + let item_with_same_name_already_exists = true; + while(item_with_same_name_already_exists){ + // overwrite? + if(overwrite) + item_with_same_name_already_exists = false; + // upload + try{ + const res = await puter.fs.write( + target_path, + file_to_upload, + { + dedupeName: false, + overwrite: overwrite + } + ); + + let file_signature = await puter.fs.sign(app_uuid, {uid: res.uid, action: 'write'}); + file_signature = file_signature.items; + + item_with_same_name_already_exists = false; + target_iframe.contentWindow.postMessage({ + msg: "fileSaved", + original_msg_id: msg_id, + filename: res.name, + saved_file: { + name: file_signature.fsentry_name, + readURL: file_signature.read_url, + writeURL: file_signature.write_url, + metadataURL: file_signature.metadata_url, + type: file_signature.type, + uid: file_signature.uid, + path: `~/` + res.path.split('/').slice(2).join('/'), + }, + }, '*'); + + $(target_iframe).get(0).focus({preventScroll:true}); + // Update matching items on open windows + // todo don't blanket-update, mostly files with thumbnails really need to be updated + // first remove overwritten items + $(`.item[data-uid="${res.uid}"]`).removeItems(); + // now add new items + UIItem({ + appendTo: $(`.item-container[data-path="${html_encode(path.dirname(target_path))}" i]`), + immutable: res.immutable, + associated_app_name: res.associated_app?.name, + path: target_path, + icon: await item_icon(res), + name: path.basename(target_path), + uid: res.uid, + size: res.size, + modified: res.modified, + type: res.type, + is_dir: false, + is_shared: res.is_shared, + suggested_apps: res.suggested_apps, + }); + // sort each window + $(`.item-container[data-path="${html_encode(path.dirname(target_path))}" i]`).each(function(){ + sort_items(this, $(this).attr('data-sort_by'), $(this).attr('data-sort_order')) + }); + $(el_filedialog_window).close(); + show_save_account_notice_if_needed(); + } + catch(err){ + // item with same name exists + if(err.code === 'item_with_same_name_exists'){ + const alert_resp = await UIAlert({ + message: `${html_encode(err.entry_name)} already exists.`, + buttons:[ + { + label: 'Replace', + value: 'replace', + type: 'primary', + }, + { + label: 'Cancel', + value: 'cancel', + }, + ], + parent_uuid: $(el_filedialog_window).attr('data-element_uuid'), + }) + if(alert_resp === 'replace'){ + overwrite = true; + }else if(alert_resp === 'cancel'){ + // enable parent window + $(el_filedialog_window).find('.window-disable-mask, .busy-indicator').hide(); + return; + } + } + else{ + // show error + await UIAlert({ + message: err.message ?? "Upload failed.", + parent_uuid: $(el_filedialog_window).attr('data-element_uuid'), + }); + // enable parent window + $(el_filedialog_window).find('.window-disable-mask, .busy-indicator').hide(); + return; + } + } + } + } + + // done + let busy_duration = (Date.now() - busy_init_ts); + if( busy_duration >= busy_indicator_hide_delay){ + $(el_filedialog_window).close(); + }else{ + setTimeout(() => { + // close this dialog + $(el_filedialog_window).close(); + }, Math.abs(busy_indicator_hide_delay - busy_duration)); + } + } + }); + } + //-------------------------------------------------------- + // saveToPictures/Desktop/Documents/Videos/Audio/AppData + //-------------------------------------------------------- + else if((event.data.msg === 'saveToPictures' || event.data.msg === 'saveToDesktop' || event.data.msg === 'saveToAppData' || + event.data.msg === 'saveToDocuments' || event.data.msg === 'saveToVideos' || event.data.msg === 'saveToAudio')){ + let target_path; + let create_missing_ancestors = false; + + if(event.data.msg === 'saveToPictures') + target_path = path.join(pictures_path, event.data.filename); + else if(event.data.msg === 'saveToDesktop') + target_path = path.join(desktop_path, event.data.filename); + else if(event.data.msg === 'saveToDocuments') + target_path = path.join(documents_path, event.data.filename); + else if(event.data.msg === 'saveToVideos') + target_path = path.join(videos_path, event.data.filename); + else if(event.data.msg === 'saveToAudio') + target_path = path.join(audio_path, event.data.filename); + else if(event.data.msg === 'saveToAppData'){ + target_path = path.join(appdata_path, app_uuid, event.data.filename); + create_missing_ancestors = true; + } + //auth + if(!is_auth() && !(await UIWindowSignup({referrer: app_name}))) + return; + + let item_with_same_name_already_exists = true; + let overwrite = false; + + // ------------------------------------- + // URL + // ------------------------------------- + if(event.data.url){ + let overwrite = false; + // download progress tracker + let dl_op_id = operation_id++; + + // upload progress tracker defaults + window.progress_tracker[dl_op_id] = []; + window.progress_tracker[dl_op_id][0] = {}; + window.progress_tracker[dl_op_id][0].total = 0; + window.progress_tracker[dl_op_id][0].ajax_uploaded = 0; + window.progress_tracker[dl_op_id][0].cloud_uploaded = 0; + + let item_with_same_name_already_exists = true; + while(item_with_same_name_already_exists){ + const res = await download({ + url: event.data.url, + name: path.basename(target_path), + dest_path: path.dirname(target_path), + auth_token: auth_token, + api_origin: api_origin, + dedupe_name: true, + overwrite: false, + operation_id: dl_op_id, + item_upload_id: 0, + success: function(res){ + }, + error: function(err){ + UIAlert(err && err.message ? err.message : "Download failed."); + } + }); + item_with_same_name_already_exists = false; + } + } + // ------------------------------------- + // File + // ------------------------------------- + else{ + let file_to_upload = new File([event.data.content], path.basename(target_path)); + + while(item_with_same_name_already_exists){ + if(overwrite) + item_with_same_name_already_exists = false; + try{ + const res = await puter.fs.write(target_path, file_to_upload, { + dedupeName: true, + overwrite: false, + createMissingAncestors: create_missing_ancestors, + }); + item_with_same_name_already_exists = false; + let file_signature = await puter.fs.sign(app_uuid, {uid: res.uid, action: 'write'}); + file_signature = file_signature.items; + + target_iframe.contentWindow.postMessage({ + msg: "fileSaved", + original_msg_id: msg_id, + filename: res.name, + saved_file: { + name: file_signature.fsentry_name, + readURL: file_signature.read_url, + writeURL: file_signature.write_url, + metadataURL: file_signature.metadata_url, + uid: file_signature.uid, + path: `~/` + res.path.split('/').slice(2).join('/'), + }, + }, '*'); + $(target_iframe).get(0).focus({preventScroll:true}); + } + catch(err){ + if(err.code === 'item_with_same_name_exists'){ + const alert_resp = await UIAlert({ + message: `${html_encode(err.entry_name)} already exists.`, + buttons:[ + { + label: 'Replace', + type: 'primary', + }, + { + label: 'Cancel' + }, + ], + parent_uuid: event.data.appInstanceID, + }) + if(alert_resp === 'Replace'){ + overwrite = true; + }else if(alert_resp === 'Cancel'){ + item_with_same_name_already_exists = false; + } + }else{ + break; + } + } + } + } + } + + //-------------------------------------------------------- + // exit + //-------------------------------------------------------- + else if(event.data.msg === 'exit'){ + $(`.window[data-element_uuid="${event.data.appInstanceID}"]`).close({bypass_iframe_messaging: true}); + } +}); \ No newline at end of file diff --git a/src/UI/PuterDialog.js b/src/UI/PuterDialog.js new file mode 100644 index 00000000..b9240c43 --- /dev/null +++ b/src/UI/PuterDialog.js @@ -0,0 +1,65 @@ + +import UIWindow from './UIWindow.js' + +// todo do this using uid rather than item_path, since item_path is way mroe expensive on the DB +async function PuterDialog(options) { + return new Promise(async (resolve) => { + let h = ''; + h += `
    + +

    This website uses Puter to bring you safe, secure, and private AI and Cloud features.

    +
    + + +
    +

    Powered by Puter.js

    +

    By clicking 'Continue' you agree to Puter's Terms of Service and Privacy Policy.

    +
    `; + + const el_window = await UIWindow({ + title: `Upload`, + icon: window.icons[`app-icon-uploader.svg`], + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + window_class: 'window-puter-dialog window-cover-page', + width: '100%', + top: '0', + dominant: true, + window_css:{ + height: '100%', + width: '100%', + top: '0 !important', + left: '0 !important', + }, + body_css: { + padding: '22px', + width: 'initial', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }); + + $(el_window).find('#launch-auth-popup').on('click submit', function (e) { + $(el_window).close(); + resolve(true); + }) + + $(el_window).find('#launch-auth-popup-cancel').on('click submit', function (e) { + $(el_window).close(); + resolve(false); + }) + }) +} +// export as default +export default PuterDialog; diff --git a/src/UI/UIAlert.js b/src/UI/UIAlert.js new file mode 100644 index 00000000..67428ba7 --- /dev/null +++ b/src/UI/UIAlert.js @@ -0,0 +1,96 @@ +import UIWindow from './UIWindow.js' + +function UIAlert(options){ + // set sensible defaults + if(arguments.length > 0){ + // if first argument is a string, then assume it is the message + if(isString(arguments[0])){ + options = {}; + options.message = arguments[0]; + } + // if second argument is an array, then assume it is the buttons + if(arguments[1] && Array.isArray(arguments[1])){ + options.buttons = arguments[1]; + } + } + + return new Promise(async (resolve) => { + // provide an 'OK' button if no buttons are provided + if(!options.buttons || options.buttons.length === 0){ + options.buttons = [ + {label: 'OK', value: true, type: 'primary'} + ] + } + + // set body icon + options.body_icon = options.body_icon ?? window.icons['warning-sign.svg']; + if(options.type === 'success') + options.body_icon = window.icons['c-check.svg']; + + let h = ''; + // icon + h += ``; + // message + h += `
    ${options.message}
    `; + // buttons + if(options.buttons && options.buttons.length > 0){ + h += `
    `; + for(let y=0; y${html_encode(options.buttons[y].label)}`; + } + h += `
    `; + } + + const el_window = await UIWindow({ + title: null, + icon: null, + uid: null, + is_dir: false, + message: options.message, + body_icon: options.body_icon, + backdrop: options.backdrop ?? false, + is_resizable: false, + is_droppable: false, + has_head: false, + stay_on_top: options.stay_on_top ?? false, + selectable_body: false, + draggable_body: options.draggable_body ?? true, + allow_context_menu: false, + show_in_taskbar: false, + window_class: 'window-alert', + dominant: true, + body_content: h, + width: 350, + parent_uuid: options.parent_uuid, + ...options.window_options, + window_css:{ + height: 'initial', + }, + body_css: { + width: 'initial', + padding: '20px', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }); + // focus to primary btn + $(el_window).find('.button-primary').focus(); + + // -------------------------------------------------------- + // Button pressed + // -------------------------------------------------------- + $(el_window).find('.alert-resp-button').on('click', async function(event){ + event.preventDefault(); + event.stopPropagation(); + resolve($(this).attr('data-value')); + $(el_window).close(); + return false; + }) + }) +} + +export default UIAlert; \ No newline at end of file diff --git a/src/UI/UIContextMenu.js b/src/UI/UIContextMenu.js new file mode 100644 index 00000000..ce77e9a9 --- /dev/null +++ b/src/UI/UIContextMenu.js @@ -0,0 +1,211 @@ +function UIContextMenu(options){ + $('.window-active .window-app-iframe').css('pointer-events', 'none'); + + const menu_id = global_element_id++; + + let h = ''; + h += `
    `; + + for(let i=0; i < options.items.length; i++){ + // item + if(!options.items[i].is_divider && options.items[i] !== '-'){ + // single item + if(options.items[i].items === undefined){ + h += `
  • `; + // icon + h += `${options.items[i].icon ?? ''}`; + h += `${options.items[i].icon_active ?? (options.items[i].icon ?? '')}`; + // label + h += `${options.items[i].html}`; + h += `${options.items[i].html_active ?? options.items[i].html}`; + + h += `
  • `; + } + // submenu + else{ + h += `
  • `; + // icon + h += `${options.items[i].icon ?? ''}`; + h += `${options.items[i].icon_active ?? (options.items[i].icon ?? '')}`; + // label + h += `${html_encode(options.items[i].html)}`; + // arrow + h += ``; + h += `
  • `; + } + } + // divider + else if(options.items[i].is_divider || options.items[i] === '-') + h += `

  • `; + } + h += `
    ` + $('body').append(h) + + const contextMenu = document.getElementById(`context-menu-${menu_id}`); + const menu_width = $(contextMenu).width(); + const menu_height = $(contextMenu).outerHeight(); + let start_x, start_y; + //-------------------------------- + // Auto position + //-------------------------------- + if(!options.position){ + if(isMobile.phone || isMobile.tablet){ + start_x = window.last_touch_x; + start_y = window.last_touch_y; + + }else{ + start_x = window.mouseX; + start_y = window.mouseY; + } + } + //-------------------------------- + // custom position + //-------------------------------- + else{ + start_x = options.position.left; + start_y = options.position.top; + } + + // X position + let x_pos; + if( start_x + menu_width > window.innerWidth){ + x_pos = start_x - menu_width; + // if this is a child menu, the width of parent must be also considered + if(options.parent_id){ + x_pos -= $(`.context-menu[data-element-id="${options.parent_id}"]`).width() + 30; + } + }else + x_pos = start_x + + // Y position + let y_pos; + // is the menu going to go out of the window from the bottom? + if( (start_y + menu_height) > (window.innerHeight - taskbar_height - 10)) + y_pos = window.innerHeight - menu_height - taskbar_height - 10; + else + y_pos = start_y; + + // Show ContextMenu + $(contextMenu).delay(100).show(0) + // In the right position (the mouse) + .css({ + top: y_pos + "px", + left: x_pos + "px" + }); + + // mark other context menus as inactive + $('.context-menu').not(contextMenu).removeClass('context-menu-active'); + + // An item is clicked + $(`#context-menu-${menu_id} > li:not(.context-menu-item-disabled)`).on('click', function (e) { + + // onClick + if(options.items[$(this).attr("data-action")].onClick && typeof options.items[$(this).attr("data-action")].onClick === 'function'){ + let event = e; + event.value = options.items[$(this).attr("data-action")]['val'] ?? undefined; + options.items[$(this).attr("data-action")].onClick(event); + } + // close menu and, if exists, its parent + if(!$(this).hasClass('context-menu-item-submenu')){ + $(`#context-menu-${menu_id}, .context-menu[data-element-id="${$(this).closest('.context-menu').attr('data-parent-id')}"]`).fadeOut(200, function(){ + $(contextMenu).remove(); + }); + } + + return false; + }); + + // when mouse is over an item + $(contextMenu).find('.context-menu-item').on('mouseover', function (e) { + // mark other items as inactive + $(contextMenu).find('.context-menu-item').removeClass('context-menu-item-active'); + // mark this item as active + $(this).addClass('context-menu-item-active'); + // close any submenu that doesn't belong to this item + $(`.context-menu[data-parent-id="${menu_id}"]`).remove(); + // mark this context menu as active + $(contextMenu).addClass('context-menu-active'); + }) + + // open submenu if applicable + $(`#context-menu-${menu_id} > li.context-menu-item-submenu`).on('mouseover', function (e) { + + // open submenu only if it's not already open + if($(`.context-menu[data-id="${menu_id}-${$(this).attr('data-action')}"]`).length === 0){ + let item_rect_box = this.getBoundingClientRect(); + + // close other submenus + $(`.context-menu[parent-element-id="${menu_id}"]`).remove(); + + // open the new submenu + UIContextMenu({ + items: options.items[parseInt($(this).attr('data-action'))].items, + parent_id: menu_id, + is_submenu: true, + id: menu_id + '-' + $(this).attr('data-action'), + position:{ + top: item_rect_box.top - 5, + left: x_pos + item_rect_box.width + 15, + } + }) + } + return false; + }); + + // useful in cases such as where a menue item is over a window, this prevents from the mousedown event + // reaching the window underneath + $(`#context-menu-${menu_id} > li:not(.context-menu-item-disabled)`).on('mousedown', function (e) { + e.preventDefault(); + e.stopPropagation(); + return false; + }) + + //disable parent scroll + if(options.parent_element){ + $(options.parent_element).css('overflow', 'hidden'); + $(options.parent_element).parent().addClass('children-have-open-contextmenu'); + $(options.parent_element).addClass('has-open-contextmenu'); + } + + $(contextMenu).on("remove", function () { + // when removing, make parent scrollable again + if(options.parent_element){ + $(options.parent_element).parent().removeClass('children-have-open-contextmenu'); + + $(options.parent_element).css('overflow', 'scroll'); + $(options.parent_element).removeClass('has-open-contextmenu'); + if($(options.parent_element).hasClass('taskbar-item')){ + make_taskbar_sortable() + } + } + }) + $(contextMenu).on("contextmenu", function (e) { + e.preventDefault(); + e.stopPropagation(); + return false; + }) +} + +window.select_ctxmenu_item = function ($ctxmenu_item){ + // remove active class from other items + $($ctxmenu_item).siblings('.context-menu-item').removeClass('context-menu-item-active'); + // add active class to the selected item + $($ctxmenu_item).addClass('context-menu-item-active'); +} + +export default UIContextMenu; \ No newline at end of file diff --git a/src/UI/UIDesktop.js b/src/UI/UIDesktop.js new file mode 100644 index 00000000..a9cf8e77 --- /dev/null +++ b/src/UI/UIDesktop.js @@ -0,0 +1,1428 @@ +import path from "../lib/path.js" +import UIWindowClaimReferral from "./UIWindowClaimReferral.js" +import UIContextMenu from './UIContextMenu.js' +import UIItem from './UIItem.js' +import UIAlert from './UIAlert.js' +import UIWindow from './UIWindow.js' +import UIWindowSaveAccount from './UIWindowSaveAccount.js'; +import UIWindowDesktopBGSettings from "./UIWindowDesktopBGSettings.js" +import UIWindowMyWebsites from "./UIWindowMyWebsites.js" +import UIWindowChangePassword from "./UIWindowChangePassword.js" +import UIWindowChangeUsername from "./UIWindowChangeUsername.js" +import UIWindowFeedback from "./UIWindowFeedback.js" +import UIWindowLogin from "./UIWindowLogin.js" +import UIWindowQR from "./UIWindowQR.js" +import UIWindowRefer from "./UIWindowRefer.js" +import UITaskbar from "./UITaskbar.js" + +async function UIDesktop(options){ + let h = ''; + + // connect socket. + window.socket = io(gui_origin + '/', { + query: { + auth_token: auth_token + } + }); + + window.socket.on('error', (error) => { + console.error('GUI Socket Error:', error); + }); + + window.socket.on('connect', function(){ + console.log('GUI Socket: Connected', window.socket.id); + }); + + window.socket.on('reconnect', function(){ + console.log('GUI Socket: Reconnected', window.socket.id); + }); + + window.socket.on('disconnect', () => { + console.log('GUI Socket: Disconnected'); + }); + + window.socket.on('reconnect', (attempt) => { + console.log('GUI Socket: Reconnection', attempt); + }); + + window.socket.on('reconnect_attempt', (attempt) => { + console.log('GUI Socket: Reconnection Attemps', attempt); + }); + + window.socket.on('reconnect_error', (error) => { + console.log('GUI Socket: Reconnection Error', error); + }); + + window.socket.on('reconnect_failed', () => { + console.log('GUI Socket: Reconnection Failed'); + }); + + window.socket.on('error', (error) => { + console.error('GUI Socket Error:', error); + }); + + socket.on('upload.progress', (msg) => { + if(window.progress_tracker[msg.operation_id]){ + window.progress_tracker[msg.operation_id].cloud_uploaded += msg.loaded_diff + if(window.progress_tracker[msg.operation_id][msg.item_upload_id]){ + window.progress_tracker[msg.operation_id][msg.item_upload_id].cloud_uploaded = msg.loaded; + } + } + }); + + socket.on('download.progress', (msg) => { + if(window.progress_tracker[msg.operation_id]){ + if(window.progress_tracker[msg.operation_id][msg.item_upload_id]){ + window.progress_tracker[msg.operation_id][msg.item_upload_id].downloaded = msg.loaded; + window.progress_tracker[msg.operation_id][msg.item_upload_id].total = msg.total; + } + } + }); + + socket.on('trash.is_empty', async (msg) => { + $(`.item[data-path="${html_encode(trash_path)}" i]`).find('.item-icon > img').attr('src', msg.is_empty ? window.icons['trash.svg'] : window.icons['trash-full.svg']); + $(`.window[data-path="${html_encode(trash_path)}" i]`).find('.window-head-icon').attr('src', msg.is_empty ? window.icons['trash.svg'] : window.icons['trash-full.svg']); + // empty trash windows if needed + if(msg.is_empty) + $(`.window[data-path="${html_encode(trash_path)}" i]`).find('.item-container').empty(); + }) + + socket.on('app.opened', async (app) => { + // don't update if this is the original client that initiated the action + if(app.original_client_socket_id === window.socket.id) + return; + + // add the app to the beginning of the array + launch_apps.recent.unshift(app); + + // dedupe the array by uuid, uid, and id + launch_apps.recent = _.uniqBy(launch_apps.recent, 'name'); + + // limit to 5 + launch_apps.recent = launch_apps.recent.slice(0, window.launch_recent_apps_count); + }) + + socket.on('item.removed', async (item) => { + // don't update if this is the original client that initiated the action + if(item.original_client_socket_id === window.socket.id) + return; + + // don't remove items if this was a descendants_only operation + if(item.descendants_only) + return; + + // hide all UIItems with matching uids + $(`.item[data-path='${item.path}']`).fadeOut(150, function(){ + // close all windows with matching uids + // $('.window-' + item.uid).close(); + // close all windows that belong to a descendant of this item + // todo this has to be case-insensitive but the `i` selector doesn't work on ^= + $(`.window[data-path^="${item.path}/"]`).close(); + }); + }) + + socket.on('item.updated', async (item) => { + // Don't update if this is the original client that initiated the action + if(item.original_client_socket_id === window.socket.id) + return; + + // Update matching items + // set new item name + $(`.item[data-uid='${html_encode(item.uid)}'] .item-name`).html(html_encode(truncate_filename(item.name, TRUNCATE_LENGTH)).replaceAll(' ', ' ')); + + // Set new icon + const new_icon = (item.is_dir ? window.icons['folder.svg'] : (await item_icon(item)).image); + $(`.item[data-uid='${item.uid}']`).find('.item-icon-thumb').attr('src', new_icon); + $(`.item[data-uid='${item.uid}']`).find('.item-icon-icon').attr('src', new_icon); + + // Set new data-name + $(`.item[data-uid='${item.uid}']`).attr('data-name', html_encode(item.name)); + $(`.window-${item.uid}`).attr('data-name', html_encode(item.name)); + + // Set new title attribute + $(`.item[data-uid='${item.uid}']`).attr('title', html_encode(item.name)); + $(`.window-${options.uid}`).attr('title', html_encode(item.name)); + + // Set new value for item-name-editor + $(`.item[data-uid='${item.uid}'] .item-name-editor`).val(html_encode(item.name)); + $(`.item[data-uid='${item.uid}'] .item-name`).attr('title', html_encode(item.name)); + + // Set new data-path + const new_path = item.path; + $(`.item[data-uid='${item.uid}']`).attr('data-path', new_path); + $(`.window-${item.uid}`).attr('data-path', new_path); + + // Update all elements that have matching paths + $(`[data-path="${html_encode(item.old_path)}" i]`).each(function(){ + $(this).attr('data-path', new_path) + if($(this).hasClass('window-navbar-path-dirname')) + $(this).text(item.name); + }); + + // Update all elements whose paths start with old_path + $(`[data-path^="${html_encode(item.old_path) + '/'}"]`).each(function(){ + const new_el_path = _.replace($(this).attr('data-path'), item.old_path + '/', new_path+'/'); + $(this).attr('data-path', new_el_path); + }); + + // Update all exact-matching windows + $(`.window-${item.uid}`).each(function(){ + update_window_path(this, new_path); + }) + // Set new name for matching open windows + $(`.window-${item.uid} .window-head-title`).text(item.name); + + // Re-sort all matching item containers + $(`.item[data-uid='${item.uid}']`).parent('.item-container').each(function(){ + sort_items(this, $(this).closest('.item-container').attr('data-sort_by'), $(this).closest('.item-container').attr('data-sort_order')); + }) + }) + + socket.on('item.moved', async (resp) => { + let fsentry = resp; + // Notify all apps that are watching this item + sendItemChangeEventToWatchingApps(fsentry.uid, { + event: 'moved', + uid: fsentry.uid, + name: fsentry.name, + }) + + // don't update if this is the original client that initiated the action + if(resp.original_client_socket_id === window.socket.id) + return; + + let dest_path = path.dirname(fsentry.path); + let metadata = fsentry.metadata; + + // path must use the real name from DB + fsentry.path = fsentry.path; + + // update all shortcut_to_path + $(`.item[data-shortcut_to_path="${html_encode(resp.old_path)}" i]`).attr(`data-shortcut_to_path`, html_encode(fsentry.path)); + + // remove all items with matching uids + $(`.item[data-uid='${fsentry.uid}']`).fadeOut(150, function(){ + // find all parent windows that contain this item + let parent_windows = $(`.item[data-uid='${fsentry.uid}']`).closest('.window'); + // remove this item + $(this).removeItems(); + // update parent windows' item counts + $(parent_windows).each(function(index){ + update_explorer_footer_item_count(this); + update_explorer_footer_selected_items_count(this) + }); + }) + + // if trashing, close windows of trashed items and its descendants + if(dest_path === trash_path){ + $(`.window[data-path="${html_encode(resp.old_path)}" i]`).close(); + // todo this has to be case-insensitive but the `i` selector doesn't work on ^= + $(`.window[data-path^="${html_encode(resp.old_path)}/"]`).close(); + } + + // update all paths of its and its descendants' open windows + else{ + // todo this has to be case-insensitive but the `i` selector doesn't work on ^= + $(`.window[data-path^="${html_encode(resp.old_path)}/"], .window[data-path="${html_encode(resp.old_path)}" i]`).each(function(){ + update_window_path(this, $(this).attr('data-path').replace(resp.old_path, fsentry.path)); + }) + } + + if(dest_path === trash_path){ + $(`.item[data-uid="${fsentry.uid}"]`).find('.item-is-shared').fadeOut(300); + + // if trashing dir... + if(fsentry.is_dir){ + // remove website badge + $(`.mywebsites-dir-path[data-uuid="${fsentry.uid}"]`).remove(); + // remove the website badge from all instances of the dir + $(`.item[data-uid="${fsentry.uid}"]`).find('.item-has-website-badge').fadeOut(300); + + // remove File Rrequest Token + // todo, some client-side check to see if this dir has an FR associated with it before sending a whole ajax req + } + } + // if replacing an existing item, remove the old item that was just replaced + if(fsentry.overwritten_uid !== undefined) + $(`.item[data-uid=${fsentry.overwritten_uid}]`).removeItems(); + + // if this is trash, get original name from item metadata + fsentry.name = (metadata && metadata.original_name) ? metadata.original_name : fsentry.name; + + // create new item on matching containers + UIItem({ + appendTo: $(`.item-container[data-path='${html_encode(dest_path)}' i]`), + immutable: fsentry.immutable, + uid: fsentry.uid, + path: fsentry.path, + icon: await item_icon(fsentry), + name: (dest_path === trash_path) ? metadata.original_name : fsentry.name, + is_dir: fsentry.is_dir, + size: fsentry.size, + type: fsentry.type, + modified: fsentry.modified, + is_selected: false, + is_shared: (dest_path === trash_path) ? false : fsentry.is_shared, + is_shortcut: fsentry.is_shortcut, + shortcut_to: fsentry.shortcut_to, + shortcut_to_path: fsentry.shortcut_to_path, + // has_website: $(el_item).attr('data-has_website') === '1', + metadata: JSON.stringify(fsentry.metadata) ?? '', + }); + + if(fsentry.parent_dirs_created && fsentry.parent_dirs_created.length > 0){ + // this operation may have created some missing directories, + // see if any of the directories in the path of this file is new AND + // if these new path have any open parents that need to be updated + + fsentry.parent_dirs_created.forEach(async dir => { + let item_container = $(`.item-container[data-path='${html_encode(path.dirname(dir.path))}' i]`); + if(item_container.length > 0 && $(`.item[data-path="${html_encode(dir.path)}" i]`).length === 0){ + UIItem({ + appendTo: item_container, + immutable: false, + uid: dir.uid, + path: dir.path, + icon: await item_icon(dir), + name: dir.name, + size: dir.size, + type: dir.type, + modified: dir.modified, + is_dir: true, + is_selected: false, + is_shared: dir.is_shared, + has_website: false, + }); + } + sort_items(item_container, $(item_container).attr('data-sort_by'), $(item_container).attr('data-sort_order')); + }); + } + //sort each container + $(`.item-container[data-path='${html_encode(dest_path)}' i]`).each(function(){ + sort_items(this, $(this).attr('data-sort_by'), $(this).attr('data-sort_order')) + }) + }); + + socket.on('user.email_confirmed', (msg) => { + // don't update if this is the original client that initiated the action + if(msg.original_client_socket_id === window.socket.id) + return; + + refresh_user_data(window.auth_token); + }); + + socket.on('item.renamed', async (item) => { + // Notify all apps that are watching this item + sendItemChangeEventToWatchingApps(item.uid, { + event: 'rename', + uid: item.uid, + // path: item.path, + new_name: item.name, + // old_path: item.old_path, + }) + + // Don't update if this is the original client that initiated the action + if(item.original_client_socket_id === window.socket.id) + return; + + // Update matching items + // Set new item name + $(`.item[data-uid='${html_encode(item.uid)}'] .item-name`).html(html_encode(truncate_filename(item.name, TRUNCATE_LENGTH)).replaceAll(' ', ' ')); + + // Set new icon + const new_icon = (item.is_dir ? window.icons['folder.svg'] : (await item_icon(item)).image); + $(`.item[data-uid='${item.uid}']`).find('.item-icon-icon').attr('src', new_icon); + + // Set new data-name + $(`.item[data-uid='${item.uid}']`).attr('data-name', html_encode(item.name)); + $(`.window-${item.uid}`).attr('data-name', html_encode(item.name)); + + // Set new title attribute + $(`.item[data-uid='${item.uid}']`).attr('title', html_encode(item.name)); + $(`.window-${options.uid}`).attr('title', html_encode(item.name)); + + // Set new value for item-name-editor + $(`.item[data-uid='${item.uid}'] .item-name-editor`).val(html_encode(item.name)); + $(`.item[data-uid='${item.uid}'] .item-name`).attr('title', html_encode(item.name)); + + // Set new data-path + const new_path = item.path; + $(`.item[data-uid='${item.uid}']`).attr('data-path', new_path); + $(`.window-${item.uid}`).attr('data-path', new_path); + + // Update all elements that have matching paths + $(`[data-path="${html_encode(item.old_path)}" i]`).each(function(){ + $(this).attr('data-path', new_path) + if($(this).hasClass('window-navbar-path-dirname')) + $(this).text(item.name); + }); + + // Update all elements whose paths start with old_path + $(`[data-path^="${html_encode(item.old_path) + '/'}"]`).each(function(){ + const new_el_path = _.replace($(this).attr('data-path'), item.old_path + '/', new_path+'/'); + $(this).attr('data-path', new_el_path); + }); + + // Update all exact-matching windows + $(`.window-${item.uid}`).each(function(){ + update_window_path(this, new_path); + }) + // Set new name for matching open windows + $(`.window-${item.uid} .window-head-title`).text(item.name); + + // Re-sort all matching item containers + $(`.item[data-uid='${item.uid}']`).parent('.item-container').each(function(){ + sort_items(this, $(this).closest('.item-container').attr('data-sort_by'), $(this).closest('.item-container').attr('data-sort_order')); + }) + }); + + socket.on('item.added', async (item) => { + // if item is empty, don't proceed + if(_.isEmpty(item)) + return; + + // Notify all apps that are watching this item + sendItemChangeEventToWatchingApps(item.uid, { + event: 'write', + uid: item.uid, + // path: item.path, + new_size: item.size, + modified: item.modified, + // old_path: item.old_path, + }); + + // Don't update if this is the original client that initiated the action + if(item.original_client_socket_id === window.socket.id) + return; + + // Update replaced items with matching uids + if(item.overwritten_uid){ + $(`.item[data-uid='${item.overwritten_uid}']`).attr({ + 'data-immutable': item.immutable, + 'data-path': item.path, + 'data-name': item.name, + 'data-size': item.size, + 'data-modified': item.modified, + 'data-is_shared': item.is_shared, + 'data-type': item.type, + }) + // set new icon + const new_icon = (item.is_dir ? window.icons['folder.svg'] : (await item_icon(item)).image); + $(`.item[data-uid="${item.overwritten_uid}"]`).find('.item-icon > img').attr('src', new_icon); + + //sort each window + $(`.item-container[data-path='${html_encode(item.dirpath)}' i]`).each(function(){ + sort_items(this, $(this).attr('data-sort_by'), $(this).attr('data-sort_order')) + }) + } + else{ + UIItem({ + appendTo: $(`.item-container[data-path='${html_encode(item.dirpath)}' i]`), + uid: item.uid, + immutable: item.immutable, + associated_app_name: item.associated_app?.name, + path: item.path, + icon: await item_icon(item), + name: item.name, + size: item.size, + type: item.type, + modified: item.modified, + is_dir: item.is_dir, + is_shared: item.is_shared, + is_shortcut: item.is_shortcut, + associated_app_name: item.associated_app?.name, + shortcut_to: item.shortcut_to, + shortcut_to_path: item.shortcut_to_path, + }); + + //sort each window + $(`.item-container[data-path='${html_encode(item.dirpath)}' i]`).each(function(){ + sort_items(this, $(this).attr('data-sort_by'), $(this).attr('data-sort_order')) + }) + } + }); + + // Hidden file dialog + h += `
    + + + +
    `; + + h += `
    `; + + // Desktop + // If desktop is not in fullpage/embedded mode, we hide it until files and directories are loaded and then fade in the UI + // This gives a calm and smooth experience for the user + h += `
    `; + h += `
    `; + + // Get window sidebar width + getItem({ + key: "window_sidebar_width", + success: async function(res){ + let value = parseInt(res.value); + // if value is a valid number + if(!isNaN(value) && value > 0){ + window.window_sidebar_width = value; + } + } + }) + + // Remove `?ref=...` from navbar URL + if(url_query_params.has('ref')){ + window.history.pushState(null, document.title, '/'); + } + + // Append to + $('body').append(h); + + // Set desktop height based on taskbar height + $('.desktop').css('height', `calc(100vh - ${window.taskbar_height + window.toolbar_height}px)`) + + // --------------------------------------------------------------- + // Taskbar + // --------------------------------------------------------------- + UITaskbar(); + + const el_desktop = document.querySelector('.desktop'); + + window.active_element = el_desktop; + window.active_item_container = el_desktop; + // -------------------------------------------------------- + // Dragster + // Allow dragging of local files onto desktop. + // -------------------------------------------------------- + $(el_desktop).dragster({ + enter: function (dragsterEvent, event) { + $('.context-menu').remove(); + }, + leave: function (dragsterEvent, event) { + }, + drop: async function (dragsterEvent, event) { + const e = event.originalEvent; + // no drop on item + if($(event.target).hasClass('item') || $(event.target).parent('.item').length > 0) + return false; + // recursively create directories and upload files + if(e.dataTransfer?.items?.length>0){ + upload_items(e.dataTransfer.items, desktop_path); + } + + e.stopPropagation(); + e.preventDefault(); + return false; + } + }); + + // -------------------------------------------------------- + // Droppable + // -------------------------------------------------------- + $(el_desktop).droppable({ + accept: '.item', + tolerance: "intersect", + drop: function( event, ui ) { + // Check if item was actually dropped on desktop and not a window + if(mouseover_window !== undefined) + return; + + // Can't drop anything but UIItems on desktop + if(!$(ui.draggable).hasClass('item')) + return; + + // Don't move an item to its current directory + if( path.dirname($(ui.draggable).attr('data-path')) === desktop_path && !event.ctrlKey) + return; + + // If ctrl is pressed and source is Trashed, cancel whole operation + if(event.ctrlKey && path.dirname($(ui.draggable).attr('data-path')) === window.trash_path) + return; + + // Unselect previously selected items + $(el_desktop).children('.item-selected').removeClass('item-selected'); + + const items_to_move = [] + // first item + items_to_move.push(ui.draggable); + + // all subsequent items + const cloned_items = document.getElementsByClassName('item-selected-clone'); + for(let i =0; i 0 ? false : true, + onClick: function(){ + if(clipboard_op === 'copy') + copy_clipboard_items(desktop_path, el_desktop); + else if(clipboard_op === 'move') + move_clipboard_items(el_desktop) + } + }, + // ------------------------------------------- + // Upload Here + // ------------------------------------------- + { + html: "Upload Here", + onClick: function(){ + init_upload_using_dialog(el_desktop); + } + }, + // ------------------------------------------- + // Request Files + // ------------------------------------------- + // { + // html: "Request Files", + // onClick: function(){ + // UIWindowRequestFiles({dir_path: desktop_path}) + // } + // }, + // ------------------------------------------- + // - + // ------------------------------------------- + '-', + // ------------------------------------------- + // Change Desktop Background… + // ------------------------------------------- + { + html: "Change Desktop Background…", + onClick: function(){ + UIWindowDesktopBGSettings(); + } + }, + + ] + }); + } + }); + + //------------------------------------------- + // Desktop Files/Folders + // we don't need to get the desktop items if we're in embedded or fullpage mode + // because the items aren't visible anyway and we don't need to waste bandwidth/server resources + //------------------------------------------- + if(!is_embedded && !window.is_fullpage_mode){ + refresh_item_container(el_desktop, {fadeInItems: true}) + window.launch_download_from_url(); + } + + // ------------------------------------------- + // Selectable + // Only for desktop + // ------------------------------------------- + if(!isMobile.phone && !isMobile.tablet){ + let selected_ctrl_items = []; + const selection = new SelectionArea({ + selectionContainerClass: '.selection-area-container', + container: '.desktop', + selectables: ['.desktop.item-container > .item'], + startareas: ['.desktop'], + boundaries: ['.desktop'], + behaviour: { + overlap: 'drop', + intersect: 'touch', + startThreshold: 10, + scrolling: { + speedDivider: 10, + manualSpeed: 750, + startScrollMargins: {x: 0, y: 0} + } + }, + features: { + touch: true, + range: true, + singleTap: { + allow: true, + intersect: 'native' + } + } + }); + + selection.on('beforestart', ({event}) => { + selected_ctrl_items = []; + // Returning false prevents a selection + return $(event.target).hasClass('item-container'); + }) + .on('beforedrag', evt => { + }) + .on('start', ({store, event}) => { + if (!event.ctrlKey && !event.metaKey) { + for (const el of store.stored) { + el.classList.remove('item-selected'); + } + + selection.clearSelection(); + } + }) + .on('move', ({store: {changed: {added, removed}}, event}) => { + for (const el of added) { + // if ctrl or meta key is pressed and the item is already selected, then unselect it + if((event.ctrlKey || event.metaKey) && $(el).hasClass('item-selected')){ + el.classList.remove('item-selected'); + selected_ctrl_items.push(el); + } + // otherwise select it + else{ + el.classList.add('item-selected'); + } + } + + for (const el of removed) { + el.classList.remove('item-selected'); + // in case this item was selected by ctrl+click before, then reselect it again + if(selected_ctrl_items.includes(el)) + $(el).not('.item-disabled').addClass('item-selected'); + } + }) + .on('stop', evt => { + }); + } + // ---------------------------------------------------- + // User options + // ---------------------------------------------------- + let ht = ''; + ht += `
    `; + // logo + ht += ``; + // create account button + ht += ``; + + // 'show desktop' + if(window.is_fullpage_mode){ + ht += `Open Desktop`; + } + + // refer + if(user.referral_code){ + ht += `
    `; + } + + // do not show the fullscreen button on mobile devices since it's broken + if(!isMobile.phone){ + // fullscreen button + ht += `
    `; + } + + // qr code button -- only show if not embedded + if(!is_embedded) + ht += `
    `; + + // user options menu + ht += `
    `; + h += `${window.user.username}`; + ht += `
    `; + ht += `
    `; + + // prepend toolbar to desktop + $(ht).insertBefore(el_desktop); + + // adjust window container to take into account the toolbar height + $('.window-container').css('top', window.toolbar_height); + + // --------------------------------------------- + // Run apps from insta-login URL + // --------------------------------------------- + if(url_query_params.has('app')){ + let url_app_name = url_query_params.get('app'); + if(url_app_name === 'explorer'){ + let predefined_path = home_path; + if(url_query_params.has('path')) + predefined_path =url_query_params.get('path') + // launch explorer + UIWindow({ + path: predefined_path, + title: path.basename(predefined_path), + icon: await item_icon({is_dir: true, path: predefined_path}), + // todo + // uid: $(el_item).attr('data-uid'), + is_dir: true, + // todo + // sort_by: $(el_item).attr('data-sort_by'), + app: 'explorer', + }); + } + } + // --------------------------------------------- + // load from direct app URLs: /app/app-name + // --------------------------------------------- + else if(window.app_launched_from_url){ + let qparams = new URLSearchParams(window.location.search); + if(!qparams.has('c')){ + launch_app({ + name: app_launched_from_url, + readURL: qparams.get('readURL'), + maximized: qparams.get('maximized'), + is_fullpage: window.is_fullpage_mode, + window_options: { + stay_on_top: false, + } + }); + } + } + + $(el_desktop).on('mousedown touchstart', function(e){ + // dimiss touchstart on regular devices + if(e.type==='taphold' && !isMobile.phone && !isMobile.tablet) + return; + + // disable pointer-events for all app iframes, this is to make sure selectable works + $('.window-app-iframe').css('pointer-events', 'none'); + $('.window').find('.item-selected').addClass('item-blurred'); + $('.desktop').find('.item-blurred').removeClass('item-blurred'); + }) + + $(el_desktop).on('click', function(e){ + // blur all windows + $('.window-active').removeClass('window-active'); + }) + + function display_ct() { + var x = new Date() + var ampm = x.getHours( ) >= 12 ? ' PM' : ' AM'; + let hours = x.getHours( ) % 12; + hours = hours ? hours : 12; + hours=hours.toString().length==1? 0+hours.toString() : hours; + + var minutes=x.getMinutes().toString() + minutes=minutes.length==1 ? 0+minutes : minutes; + + var seconds=x.getSeconds().toString() + seconds=seconds.length==1 ? 0+seconds : seconds; + + var month=(x.getMonth() +1).toString(); + month=month.length==1 ? 0+month : month; + + var dt=x.getDate().toString(); + dt=dt.length==1 ? 0+dt : dt; + + var x1=month + "/" + dt + "/" + x.getFullYear(); + x1 = x1 + " - " + hours + ":" + minutes + ":" + seconds + " " + ampm; + $('#clock').html(x1); + $('#clock').css('line-height', taskbar_height + 'px'); + } + + setInterval(display_ct, 1000); + + // show referral notice window + if(window.show_referral_notice && !user.email_confirmed){ + getItem({ + key: "shown_referral_notice", + success: async function(res){ + if(!res){ + setTimeout(() => { + UIWindowClaimReferral(); + }, 1000); + setItem({ + key: "shown_referral_notice", + value: true, + }) + } + } + }) + } + +} + +$(document).on('contextmenu taphold', '.taskbar', function(event){ + // dismiss taphold on regular devices + if(event.type==='taphold' && !isMobile.phone && !isMobile.tablet) + return; + + event.preventDefault(); + event.stopPropagation(); + UIContextMenu({ + parent_element: $('.taskbar'), + items: [ + //-------------------------------------------------- + // Show open windows + //-------------------------------------------------- + { + html: "Show open windows", + onClick: function(){ + $(`.window`).showWindow(); + } + }, + //-------------------------------------------------- + // Show the desktop + //-------------------------------------------------- + { + html: "Show the desktop", + onClick: function(){ + $(`.window`).hideWindow(); + } + } + ] + }); + return false; +}) + +$(document).on('click', '.qr-btn', async function (e) { + UIWindowQR(); +}) + +$(document).on('click', '.user-options-menu-btn', async function(e){ + const pos = this.getBoundingClientRect(); + if($('.context-menu[data-id="user-options-menu"]').length > 0) + return; + + let items = []; + let parent_element = this; + //-------------------------------------------------- + // Save Session + //-------------------------------------------------- + if(window.user.is_temp){ + items.push( + { + html: `Save Session`, + icon: ``, + icon_active: ``, + onClick: async function(){ + UIWindowSaveAccount({ + send_confirmation_code: false, + default_username: window.user.username + }); + } + }, + ) + // ------------------------------------------- + // - + // ------------------------------------------- + items.push('-') + } + + // ------------------------------------------- + // Logged in users + // ------------------------------------------- + if(window.logged_in_users.length > 0){ + let users_arr = window.logged_in_users; + + // bring logged in user's item to top + users_arr.sort(function(x,y){ return x.uuid === window.user.uuid ? -1 : y.uuid == window.user.uuid ? 1 : 0; }); + + // create menu items + users_arr.forEach(l_user => { + items.push( + { + html: l_user.username, + icon: l_user.username === user.username ? '✓' : '', + onClick: async function(val){ + // don't reload everything if clicked on already-logged-in user + if(l_user.username === user.username) + return; + // update auth data + update_auth_data(l_user.auth_token, l_user); + // refresh + location.reload(); + } + + }, + ) + }); + // ------------------------------------------- + // - + // ------------------------------------------- + items.push('-') + + items.push( + { + html: 'Add existing account', + // icon: l_user.username === user.username ? '✓' : '', + onClick: async function(val){ + await UIWindowLogin({ + reload_on_success: true, + send_confirmation_code: false, + window_options:{ + has_head: true + } + }); + } + }, + ) + + // ------------------------------------------- + // - + // ------------------------------------------- + items.push('-') + + } + + UIContextMenu({ + id: 'user-options-menu', + parent_element: parent_element, + position: {top: pos.top + 28, left: pos.left + pos.width - 15}, + items: [ + ...items, + //-------------------------------------------------- + // My Websites + //-------------------------------------------------- + { + html: "My Websites", + onClick: async function(){ + UIWindowMyWebsites(); + } + }, + //-------------------------------------------------- + // Change Username + //-------------------------------------------------- + { + html: "Change Username", + onClick: async function(){ + UIWindowChangeUsername(); + } + }, + + //-------------------------------------------------- + // Change Password + //-------------------------------------------------- + { + html: "Change Password", + onClick: async function(){ + UIWindowChangePassword(); + } + }, + //-------------------------------------------------- + // Contact Us + //-------------------------------------------------- + { + html: "Contact Us", + onClick: async function(){ + UIWindowFeedback(); + } + }, + // ------------------------------------------- + // - + // ------------------------------------------- + '-', + + //-------------------------------------------------- + // Log Out + //-------------------------------------------------- + { + html: "Log Out", + onClick: async function(){ + // see if there are any open windows, if yes notify user + if($('.window-app').length > 0){ + const alert_resp = await UIAlert({ + message: `

    You have open apps. Are you sure you want to log out?

    `, + buttons:[ + { + label: 'Close Windows and Log Out', + type: 'primary', + }, + { + label: 'Cancel' + }, + ] + }) + if(alert_resp === 'Close Windows and Log Out') + logout(); + } + // no open windows + else + logout(); + } + }, + ] + }); +}) + +$(document).on('click', '.fullscreen-btn', async function (e) { + if(!is_fullscreen()) { + var elem = document.documentElement; + if (elem.requestFullscreen) { + elem.requestFullscreen(); + } else if (elem.webkitRequestFullscreen) { /* Safari */ + elem.webkitRequestFullscreen(); + } else if (elem.mozRequestFullScreen) { /* moz */ + elem.mozRequestFullScreen(); + } else if (elem.msRequestFullscreen) { /* IE11 */ + elem.msRequestFullscreen(); + } + } + else{ + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if (document.msExitFullscreen) { + document.msExitFullscreen(); + } + } +}) + +$(document).on('click', '.close-launch-popover', function(){ + $(".launch-popover").closest('.popover').fadeOut(200, function(){ + $(".launch-popover").closest('.popover').remove(); + }); +}); + +$(document).on('click', '.toolbar-puter-logo', function(){ + // launch the about app + launch_app({name: 'about', window_options:{ + single_instance: true, + }}); +}) + +$(document).on('click', '.user-options-create-account-btn', async function(e){ + UIWindowSaveAccount({ + send_confirmation_code: false, + default_username: window.user.username, + }); +}) + +$(document).on('click', '.refer-btn', async function(e){ + UIWindowRefer(); +}) + +$(document).on('click', '.start-app', async function(e){ + launch_app({ + name: $(this).attr('data-app-name') + }) + // close popovers + $(".popover").fadeOut(200, function(){ + $(".popover").remove(); + }); +}) + +$(document).on('click', '.user-options-login-btn', async function(e){ + const alert_resp = await UIAlert({ + message: `Save session before exiting!

    You are in a temporary session and logging into another account will erase all data in your current session.

    `, + buttons:[ + { + label: 'Save session', + value: 'save-session', + type: 'primary', + }, + { + label: 'Log into another account anyway', + value: 'login', + }, + { + label: 'Cancel' + }, + ] + }) + + if(alert_resp === 'save-session'){ + let saved = await UIWindowSaveAccount({ + send_confirmation_code: false, + }); + if(saved) + UIWindowLogin({show_signup_button: false, reload_on_success: true}); + }else if (alert_resp === 'login'){ + UIWindowLogin({ + show_signup_button: false, + reload_on_success: true, + window_options: { + backdrop: true, + close_on_backdrop_click: false, + } + }); + } +}) + +$(document).on('click mousedown', '.launch-search, .launch-popover', function(e){ + $(this).focus(); + e.stopPropagation(); + e.preventDefault(); + // don't let click bubble up to window + e.stopImmediatePropagation(); +}) + +$(document).on('focus', '.launch-search', function(e){ + // remove all selected items in start menu + $('.launch-app-selected').removeClass('launch-app-selected'); + // scroll popover to top + $('.launch-popover').scrollTop(0); +}) + +$(document).on('change keyup keypress keydown paste', '.launch-search', function(e){ + // search launch_apps.recommended for query + const query = $(this).val().toLowerCase(); + if(query === ''){ + $('.launch-search-clear').hide(); + $(`.start-app-card`).show(); + $('.launch-apps-recent').show(); + $('.start-section-heading').show(); + }else{ + $('.launch-apps-recent').hide(); + $('.start-section-heading').hide(); + $('.launch-search-clear').show(); + launch_apps.recommended.forEach((app)=>{ + if(app.title.toLowerCase().includes(query.toLowerCase())){ + $(`.start-app-card[data-name="${app.name}"]`).show(); + }else{ + $(`.start-app-card[data-name="${app.name}"]`).hide(); + } + }) + } +}) + +$(document).on('click', '.launch-search-clear', function(e){ + $('.launch-search').val(''); + $('.launch-search').trigger('change'); + $('.launch-search').focus(); +}) + +document.addEventListener('fullscreenchange', (event) => { + // document.fullscreenElement will point to the element that + // is in fullscreen mode if there is one. If there isn't one, + // the value of the property is null. + if (document.fullscreenElement) { + $('.fullscreen-btn').css('background-image', `url(${window.icons['shrink.svg']})`); + $('.fullscreen-btn').attr('title', 'Exit Full Screen'); + $('#clock').show(); + } else { + $('.fullscreen-btn').css('background-image', `url(${window.icons['fullscreen.svg']})`); + $('.fullscreen-btn').attr('title', 'Enter Full Screen'); + $('#clock').hide(); + } +}) + +window.set_desktop_background = function(options){ + if(options.fit){ + let fit = options.fit; + if(fit === 'cover' || fit === 'contain'){ + $('body').css('background-size', fit); + $('body').css('background-repeat', `no-repeat`); + $('body').css('background-position', `center center`); + } + else if(fit === 'center'){ + $('body').css('background-size', 'auto'); + $('body').css('background-repeat', `no-repeat`); + $('body').css('background-position', `center center`); + } + + else if( fit === 'repeat'){ + $('body').css('background-size', `auto`); + $('body').css('background-repeat', `repeat`); + } + window.desktop_bg_fit = fit; + } + + if(options.url){ + $('body').css('background-image', `url(${options.url})`); + window.desktop_bg_url = options.url; + window.desktop_bg_color = undefined; + } + else if(options.color){ + $('body').css({ + 'background-image': `none`, + 'background-color': options.color, + }); + window.desktop_bg_color = options.color; + window.desktop_bg_url = undefined; + } +} + +window.update_taskbar = function(){ + let items = [] + $('.taskbar-item-sortable[data-keep-in-taskbar="true"]').each(function(index){ + items.push({ + name: $( this ).attr('data-app'), + type: 'app', + }) + }) + + // update taskbar in the server-side + $.ajax({ + url: api_origin + "/update-taskbar-items", + type: 'POST', + data: JSON.stringify({ + items: items, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + }) +} + +window.remove_taskbar_item = function(item){ + $(item).find('*').fadeOut(100, function(){}); + + $(item).animate({width: 0}, 200, function(){ + $(item).remove(); + }) +} + +window.enter_fullpage_mode = (el_window)=>{ + $('.taskbar').hide(); + $(el_window).find('.window-head').hide(); + $('body').addClass('fullpage-mode'); + $(el_window).css({ + width: '100%', + height: '100%', + top: toolbar_height + 'px', + left: 0, + 'border-radius': 0, + }); +} + +window.exit_fullpage_mode = (el_window)=>{ + $('body').removeClass('fullpage-mode'); + window.taskbar_height = window.default_taskbar_height; + $('.taskbar').css('height', window.taskbar_height); + $('.taskbar').show(); + refresh_item_container($('.desktop.item-container'), {fadeInItems: true}); + $(el_window).removeAttr('data-is_fullpage'); + if(el_window){ + reset_window_size_and_position(el_window) + $(el_window).find('.window-head').show(); + } + + // reset dektop height to take into account the taskbar height + $('.desktop').css('height', `calc(100vh - ${window.taskbar_height + window.toolbar_height}px)`); + + // hide the 'Show Desktop' button in toolbar + $('.show-desktop-btn').hide(); + + // refresh desktop background + refresh_desktop_background(); +} + +window.reset_window_size_and_position = (el_window)=>{ + $(el_window).css({ + width: 680, + height: 380, + 'border-radius': window_border_radius, + top: 'calc(50% - 190px)', + left: 'calc(50% - 340px)', + }); +} + +export default UIDesktop; \ No newline at end of file diff --git a/src/UI/UIItem.js b/src/UI/UIItem.js new file mode 100644 index 00000000..fb74ed1a --- /dev/null +++ b/src/UI/UIItem.js @@ -0,0 +1,1602 @@ +import UIWindowPublishWebsite from './UIWindowPublishWebsite.js'; +import UIWindowItemProperties from './UIWindowItemProperties.js'; +import UIWindowGetCopyLink from './UIWindowGetCopyLink.js'; +import UIWindowSaveAccount from './UIWindowSaveAccount.js'; +import UIPopover from './UIPopover.js'; +import UIWindowEmailConfirmationRequired from './UIWindowEmailConfirmationRequired.js'; +import UIContextMenu from './UIContextMenu.js' +import UIAlert from './UIAlert.js' +import path from "../lib/path.js" + +function UIItem(options){ + const matching_appendto_count = $(options.appendTo).length; + if(matching_appendto_count > 1){ + $(options.appendTo).each(function(){ + const opts = options; + opts.appendTo = this; + UIItem(opts); + }) + return; + }else if(matching_appendto_count === 0){ + return; + } + + const item_id = global_element_id++; + let last_mousedown_ts = 999999999999999; + let rename_cancelled = false; + + // set options defaults + options.disabled = options.disabled ?? false; + options.is_dir = options.is_dir ?? false; + options.is_selected = options.is_selected ?? false; + options.is_shared = options.is_shared ?? false; + options.is_shortcut = options.is_shortcut ?? 0; + options.is_trash = options.is_trash ?? false; + options.metadata = options.metadata ?? ''; + options.multiselectable = options.multiselectable ?? true; + options.shortcut_to = options.shortcut_to ?? ''; + options.shortcut_to_path = options.shortcut_to_path ?? ''; + options.immutable = (options.immutable === false || options.immutable === 0 || options.immutable === undefined ? 0 : 1); + options.sort_container_after_append = (options.sort_container_after_append !== undefined ? options.sort_container_after_append : false); + const is_shared_with_me = (options.path !== '/'+window.user.username && !options.path.startsWith('/'+window.user.username+'/')); + + let website_url = determine_website_url(options.path); + + // do a quick check to see if the target parent has any file type restrictions + const appendto_allowed_file_types = $(options.appendTo).attr('data-allowed_file_types') + if(!window.check_fsentry_against_allowed_file_types_string({is_dir: options.is_dir, name:options.name, type:options.type}, appendto_allowed_file_types)) + options.disabled = true; + + // -------------------------------------------------------- + // HTML for Item + // -------------------------------------------------------- + let h = ''; + h += `
    `; + + // spinner + h += `
    `; + h += `
    `; + // modified + h += `
    `; + h += `${options.modified === 0 ? '-' : timeago.format(options.modified*1000)}`; + h += `
    `; + // size + h += `
    `; + h += `${options.size ? byte_format(options.size) : '-'}`; + h += `
    `; + // type + h += `
    `; + if(options.is_dir) + h += `Folder`; + else + h += `${options.type ? html_encode(options.type) : '-'}`; + h += `
    `; + + + // icon + h += `
    `; + h += ``; + h += `
    `; + // badges + h += `
    `; + // website badge + h += ``; + // link badge + h += ``; + + // shared badge + h += ``; + // owner-shared badge + h += ``; + // shortcut badge + h += ``; + + h += `
    `; + + // name + h += `${html_encode(truncate_filename(options.name, TRUNCATE_LENGTH)).replaceAll(' ', ' ')}` + // name editor + h += `` + h += `
    `; + + // append to options.appendTo + $(options.appendTo).append(h); + + // updte item_container + const item_container = $(options.appendTo).closest('.item-container'); + show_or_hide_empty_folder_message(item_container); + + // get all the elements needed + const el_item = document.getElementById(`item-${item_id}`); + const el_item_name = document.querySelector(`#item-${item_id} > .item-name`); + const el_item_icon = document.querySelector(`#item-${item_id} .item-icon`); + const el_item_name_editor = document.querySelector(`#item-${item_id} > .item-name-editor`); + const is_trashed = $(el_item).attr('data-path').startsWith(trash_path + '/'); + + // update parent window's explorer item count if applicable + if(options.appendTo !== undefined){ + let el_window = options.appendTo; + if(!$(el_window).hasClass('.window')) + el_window = $(el_window).closest('.window'); + + update_explorer_footer_item_count(el_window); + } + + // -------------------------------------------------------- + // Dragster + // allow dragging of local files on this window, if it's is_dir + // -------------------------------------------------------- + if(options.is_dir){ + $(el_item).dragster({ + enter: function () { + $(el_item).not('.item-disabled').addClass('item-selected'); + }, + leave: function () { + $(el_item).removeClass('item-selected'); + }, + drop: function (dragsterEvent, event) { + const e = event.originalEvent; + $(el_item).removeClass('item-selected'); + // if files were dropped... + if(e.dataTransfer?.items?.length > 0){ + upload_items( e.dataTransfer.items, $(el_item).attr('data-path')) + } + + e.stopPropagation(); + e.preventDefault(); + return false; + } + }); + } + + // -------------------------------------------------------- + // Draggable + // -------------------------------------------------------- + let longer_hover_timeout; + let last_window_dragged_over; + + $(el_item).draggable({ + appendTo: "body", + helper: "clone", + revert: "invalid", + //containment: "document", + zIndex: 10000, + scroll:false, + distance: 5, + revertDuration: 100, + start: function(event, ui) { + // select this item and its helper + $(el_item).addClass('item-selected'); + $('.ui-draggable-dragging').addClass('item-selected'); + //clone other selected items + $(el_item) + .siblings('.item-selected') + .clone() + .addClass('item-selected-clone') + .css('position', 'absolute') + .appendTo('body') + .hide(); + + // Bring item and clones to front + $('.item-selected-clone, .ui-draggable-dragging').css('z-index', 99999); + + // count badge + const item_count = $('.item-selected-clone').length; + if(item_count > 0){ + $('body').append(`${item_count + 1}`); + } + + // Disable all droppable UIItems that are not a dir/app to avoid accidental cancellation + // on Items that are not droppables. In general if an item is dropped on another, if the + // target is not a dir, the source needs to be dropped on the target's container. + $(`.item[data-is_dir="0"][data-associated_app_name=""]:not(.item-selected)`).droppable('disable'); + + // Disable pointer events on all app iframes. This is needed because as soon as + // a dragging event enters the iframe the event is delegated to iframe which makes the item + // stuck at the edge of the iframe not allowing us to move items freely across the screen + $('.window-app-iframe').css('pointer-events', 'none') + + // reset longer hover timeout and last window dragged over + longer_hover_timeout = null; + last_window_dragged_over = null; + }, + drag: function(event, ui) { + // Only show drag helpers if the item has been moved more than 5px + if( Math.abs(ui.originalPosition.top - ui.offset.top) > 5 + || + Math.abs(ui.originalPosition.left - ui.offset.left) > 5 ){ + $('.ui-draggable-dragging').show(); + $('.item-selected-clone').show(); + $('.draggable-count-badge').show(); + } + + const other_selected_items = $('.item-selected-clone'); + const item_count = other_selected_items.length + 1; + + // Move count badge with mouse + $('.draggable-count-badge').css({ + top: event.pageY, + left: event.pageX + 10, + }) + + // Move other selected items + for(let i=0; i < item_count - 1; i++){ + $(other_selected_items[i]).css({ + 'left': ui.position.left + 3 * (i+1), + 'top': ui.position.top + 3 * (i+1), + 'z-index': 999 - (i), + 'opacity': 0.5 - i*0.1, + }) + } + + // remove all item-container active borders + $('.item-container').removeClass('item-container-active'); + + // if item has changed container, remove timeout for window focus and reset last target + if(longer_hover_timeout && last_window_dragged_over !== window.mouseover_window){ + clearTimeout(longer_hover_timeout); + longer_hover_timeout = null; + last_window_dragged_over = window.mouseover_window; + } + + // if item hover for more than 1.2s, focus the window + if(!longer_hover_timeout){ + longer_hover_timeout = setTimeout(() => { + $(last_window_dragged_over).focusWindow(); + }, 1200); + } + + // Highlight item container to help user see more clearly where the item is going to be dropped + if($(window.mouseover_item_container).closest('.window').is(window.mouseover_window) && + // do not highlight if the target is the same as the item being moved + $(el_item).attr('data-path') !== $(window.mouseover_item_container).attr('data-path') && + // do not highlight if item is being moved to where it already is + $(el_item).attr('data-path') !== $(window.mouseover_item_container).attr('data-path')){ + + // highlight item container + $(window.mouseover_item_container).addClass('item-container-active'); + } + + // send drag event to iframe if mouse is inside iframe + if(mouseover_window){ + const $app_iframe = $(mouseover_window).find('.window-app-iframe'); + if(!$(mouseover_window).hasClass('window-disabled') && $app_iframe.length > 0){ + var rect = $app_iframe.get(0).getBoundingClientRect(); + // if mouse is inside iframe, send drag message to iframe + if(mouseX > rect.left && mouseX < rect.right && mouseY > rect.top && mouseY < rect.bottom){ + $app_iframe.get(0).contentWindow.postMessage({msg: "drag", x: (mouseX - rect.left), y: (mouseY - rect.top)}, '*'); + } + } + } + }, + stop: function(event, ui){ + $('.item-selected-clone').remove(); + $('.draggable-count-badge').remove(); + // re-enable all droppable UIItems that are not a dir + $(`.item[data-is_dir='0']:not(.item-selected)`).droppable('enable'); + // remove active item-container border highlights + $('.item-container').removeClass('item-container-active'); + // reset longer hover timeout and last window dragged over + clearTimeout(longer_hover_timeout); + last_window_dragged_over = null; + } + }); + + // -------------------------------------------------------- + // Droppable + // -------------------------------------------------------- + $(el_item).droppable({ + accept: '.item', + // 'pointer' is very important because of active window tracking is based on the position of cursor. + tolerance: 'pointer', + drop: async function( event, ui ) { + // Check if hovering over an item that is VISIBILE + if($(event.target).closest('.window').attr('data-id') !== $(mouseover_window).attr('data-id')) + return; + + // If ctrl is pressed and source is Trashed, cancel whole operation + if(event.ctrlKey && path.dirname($(ui.draggable).attr('data-path')) === window.trash_path) + return; + + const items_to_move = [] + + // First item + items_to_move.push(ui.draggable); + + // All subsequent items + const cloned_items = document.getElementsByClassName('item-selected-clone'); + for(let i =0; i { + create_shortcut( + path.basename($(item_to_move).attr('data-path')), + $(item_to_move).attr('data-is_dir') === '1', + options.is_dir ? $(el_item).attr('data-path') : path.dirname($(el_item).attr('data-path')), + null, + $(item_to_move).attr('data-shortcut_to') === '' ? $(item_to_move).attr('data-uid') : $(item_to_move).attr('data-shortcut_to'), + $(item_to_move).attr('data-shortcut_to_path') === '' ? $(item_to_move).attr('data-path') : $(item_to_move).attr('data-shortcut_to_path'), + ); + }); + } + // Otherwise, move items + else if(options.is_dir){ + move_items(items_to_move, $(el_item).attr('data-shortcut_to_path') !== '' ? $(el_item).attr('data-shortcut_to_path') : $(el_item).attr('data-path')); + } + } + + // Re-enable droppable on all 'item-container's + $('.item-container').droppable('enable') + + return false; + }, + over: function(event, ui){ + // Check hovering over an item that is VISIBILE + const $event_parent_win = $(event.target).closest('.window') + if( $event_parent_win.length > 0 && $event_parent_win.attr('data-id') !== $(mouseover_window).attr('data-id')) + return; + // Don't do anything if the dragged item is NOT a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + // If this is a directory or an app, and an item was dragged over it, highlight it. + if(options.is_dir || options.associated_app_name){ + $(el_item).addClass('item-selected'); + $('.ui-draggable-dragging .item-name, .item-selected-clone .item-name').css('opacity', 0.1) + // remove all item-container active borders + $('.item-container').addClass('item-container-transparent-border') + } + // Disable all window bodies + $('.item-container').droppable( 'disable' ) + }, + out: function(event, ui){ + // Don't do anything if the dragged item is NOT a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + + // Unselect directory/app if item is dragged out + if(options.is_dir || options.associated_app_name){ + $(el_item).removeClass('item-selected'); + $('.ui-draggable-dragging .item-name, .item-selected-clone .item-name').css('opacity', 'initial') + $('.item-container').removeClass('item-container-transparent-border') + } + $('.item-container').droppable( 'enable' ) + } + }); + + // -------------------------------------------------------- + // Double Click/Single Tap on Item + // -------------------------------------------------------- + if(isMobile.phone || isMobile.tablet){ + $(el_item).on('click', async function (e) { + // if item is disabled, do not allow any action + if($(el_item).hasClass('item-disabled')) + return false; + + if($(e.target).hasClass('item-name-editor')) + return false; + + open_item({ + item: el_item, + maximized: true, + }); + }); + + }else{ + $(el_item).on('dblclick', async function (e) { + // if item is disabled, do not allow any action + if($(el_item).hasClass('item-disabled')) + return false; + + if($(e.target).hasClass('item-name-editor')) + return false; + + open_item({ + item: el_item, + new_window: e.metaKey || e.ctrlKey, + }); + }); + } + + // -------------------------------------------------------- + // Mousedown + // -------------------------------------------------------- + $(el_item).on('mousedown', function (e) { + // if item is disabled, do not allow any action + if($(el_item).hasClass('item-disabled')) + return false; + + // if link badge is clicked, don't continue + if($(e.target).hasClass('item-has-website-url-badge')) + return false; + + const $el_parent_window = $(el_item).closest('.window'); + + // first see if this is a ContextMenu call on multiple items + if(e.which === 3 && $(el_item).hasClass('item-selected') && $(el_item).siblings('.item-selected').length > 0){ + $(".context-menu").remove(); + return false; + } + + // unselect other items if neither CTRL nor Command key are held + // or + // if parent is not multiselectable + if((!e.ctrlKey && !e.metaKey && !$(this).hasClass('item-selected')) || ($el_parent_window.length>0 && $el_parent_window.attr('data-multiselectable') !== 'true')){ + $(this).closest('.item-container').find('.item-selected').removeClass('item-selected'); + } + if((e.ctrlKey || e.metaKey) && $(this).hasClass('item-selected')){ + $(this).removeClass('item-selected') + } + else{ + $(this).addClass('item-selected') + } + update_explorer_footer_selected_items_count($el_parent_window) + }); + // -------------------------------------------------------- + // Click + // -------------------------------------------------------- + $(el_item).on('click', function (e) { + // if item is disabled, do not allow any action + if($(el_item).hasClass('item-disabled')) + return false; + + skip_a_rename_click = false; + const $el_parent_window = $(el_item).closest('.window'); + + // do not unselect other items if: + // CTRL/Command key is pressed or clicking an item that is already selected + if(!e.ctrlKey && !e.metaKey){ + $(this).closest('.item-container').find('.item-selected').not(this).removeClass('item-selected'); + update_explorer_footer_selected_items_count($el_parent_window) + } + //---------------------------------------------------------------- + // On an OpenFileDialog? + //---------------------------------------------------------------- + if($el_parent_window.attr('data-is_openFileDialog') === 'true'){ + if(!options.is_dir) + $el_parent_window.find('.openfiledialog-open-btn').removeClass('disabled'); + else + $el_parent_window.find('.openfiledialog-open-btn').addClass('disabled'); + } + //---------------------------------------------------------------- + // On a SaveFileDialog? + //---------------------------------------------------------------- + if($el_parent_window.attr('data-is_saveFileDialog') === 'true' && !options.is_dir){ + $el_parent_window.find('.savefiledialog-filename').val($(el_item).attr('data-name')); + $el_parent_window.find('.savefiledialog-save-btn').removeClass('disabled'); + } + }); + + $(document).on('click', function(e){ + if(!$(e.target).hasClass('item') && !$(e.target).hasClass('item-name') && !$(e.target).hasClass('item-icon')){ + skip_a_rename_click = true; + } + + if($(e.target).parents('.item').data('id') !== item_id){ + skip_a_rename_click = true; + } + }) + + // -------------------------------------------------------- + // Rename + // -------------------------------------------------------- + function rename(){ + if(rename_cancelled){ + rename_cancelled = false; + return; + } + + const old_name = $(el_item).attr('data-name'); + const old_path = $(el_item).attr('data-path'); + const new_name = $(el_item_name_editor).val(); + + // Don't send a rename request if: + // the new name is the same as the old one, + // or it's empty, + // or editable was not even active at all + if(old_name === new_name || !new_name || new_name === '.' || new_name === '..' || !$(el_item_name_editor).hasClass('item-name-editor-active')){ + if(new_name === '.'){ + UIAlert(`The name "." is not allowed, because it is a reserved name. Please choose another name.`); + } + else if(new_name === '..'){ + UIAlert(`The name ".." is not allowed, because it is a reserved name. Please choose another name.`) + } + + $(el_item_name).html(truncate_filename(options.name, TRUNCATE_LENGTH).replaceAll(' ', ' ')); + $(el_item_name).show(); + $(el_item_name_editor).val($(el_item).attr('data-name')); + $(el_item_name_editor).hide(); + return; + } + // deactivate item name editable + $(el_item_name_editor).removeClass('item-name-editor-active'); + + // Perform rename request + puter.fs.rename({ + uid: options.uid === 'null' ? null : options.uid, + new_name: new_name, + excludeSocketID: window.socket.id, + success: async (fsentry)=>{ + // Has the extension changed? in that case update options.sugggested_apps + const old_extension = path.extname(old_name); + const new_extension = path.extname(new_name); + if(old_extension !== new_extension){ + suggest_apps_for_fsentry({ + uid: options.uid, + onSuccess: function(suggested_apps){ + options.suggested_apps = suggested_apps; + } + }); + } + + // Set new item name + $(`.item[data-uid='${$(el_item).attr('data-uid')}'] .item-name`).html(html_encode(truncate_filename(new_name, TRUNCATE_LENGTH)).replaceAll(' ', ' ')); + $(el_item_name).show(); + + // Hide item name editor + $(el_item_name_editor).hide(); + + // Set new icon + const new_icon = (options.is_dir ? window.icons['folder.svg'] : (await item_icon(fsentry)).image); + $(el_item_icon).find('.item-icon-icon').attr('src', new_icon); + + // Set new data-name + options.name = new_name; + $(el_item).attr('data-name', html_encode(new_name)); + $(`.item[data-uid='${$(el_item).attr('data-uid')}']`).attr('data-name', html_encode(new_name)); + $(`.window-${options.uid}`).attr('data-name', html_encode(new_name)); + + // Set new title attribute + $(`.item[data-uid='${$(el_item).attr('data-uid')}']`).attr('title', html_encode(new_name)); + $(`.window-${options.uid}`).attr('title', html_encode(new_name)); + + // Set new value for item-name-editor + $(`.item[data-uid='${$(el_item).attr('data-uid')}'] .item-name-editor`).val(html_encode(new_name)); + $(`.item[data-uid='${$(el_item).attr('data-uid')}'] .item-name`).attr('title', html_encode(new_name)); + + // Set new data-path + options.path = path.join( path.dirname(options.path), options.name); + const new_path = options.path; + $(el_item).attr('data-path', new_path); + $(`.item[data-uid='${$(el_item).attr('data-uid')}']`).attr('data-path', new_path); + $(`.window-${options.uid}`).attr('data-path', new_path); + + // Update all elements that have matching paths + $(`[data-path="${html_encode(old_path)}" i]`).each(function(){ + $(this).attr('data-path', new_path) + if($(this).hasClass('window-navbar-path-dirname')) + $(this).text(new_name); + }); + + // Update the paths of all elements whose paths start with old_path + $(`[data-path^="${html_encode(old_path) + '/'}"]`).each(function(){ + const new_el_path = _.replace($(this).attr('data-path'), old_path + '/', new_path+'/'); + $(this).attr('data-path', new_el_path); + }); + + // Update the 'Sites Cache' + if($(el_item).attr('data-has_website') === '1') + await update_sites_cache(); + + // Update website_url + website_url = determine_website_url(new_path); + $(el_item).attr('data-website_url', website_url); + + // Update all exact-matching windows + $(`.window-${options.uid}`).each(function(){ + update_window_path(this, options.path); + }) + + // Set new name for corresponding open windows + $(`.window-${options.uid} .window-head-title`).text(new_name); + + // Re-sort all matching item containers + $(`.item[data-uid='${$(el_item).attr('data-uid')}']`).parent('.item-container').each(function(){ + sort_items(this, $(el_item).closest('.item-container').attr('data-sort_by'), $(el_item).closest('.item-container').attr('data-sort_order')); + }) + }, + error: function (err){ + // reset to old name + $(el_item_name).text(truncate_filename(options.name, TRUNCATE_LENGTH)); + $(el_item_name).show(); + + // hide item name editor + $(el_item_name_editor).hide(); + $(el_item_name_editor).val(html_encode($(el_item).attr('data-name'))); + + //show error + if(err.message){ + UIAlert(err.message) + } + }, + }); + } + + // -------------------------------------------------------- + // Rename if enter pressed on Item Name Editor + // -------------------------------------------------------- + $(el_item_name_editor).on('keypress',function(e) { + // If name editor is not active don't continue + if(!$(el_item_name_editor).is(":visible")) + return; + + // Enter key = rename + if(e.which === 13) { + e.stopPropagation(); + e.preventDefault(); + $(el_item_name_editor).blur(); + $(el_item).addClass('item-selected'); + last_enter_pressed_to_rename_ts = Date.now(); + update_explorer_footer_selected_items_count($(el_item).closest('.item-container')); + return false; + } + }) + + // -------------------------------------------------------- + // Cancel and undo if escape pressed on Item Name Editor + // -------------------------------------------------------- + $(el_item_name_editor).on('keyup',function(e) { + if(!$(el_item_name_editor).is(":visible")) + return; + + // Escape = undo rename + else if(e.which === 27){ + e.stopPropagation(); + e.preventDefault(); + rename_cancelled = true; + $(el_item_name_editor).hide(); + $(el_item_name_editor).val(options.name); + $(el_item_name).show(); + } + }); + + $(el_item_name_editor).on('focusout',function(e) { + e.stopPropagation(); + e.preventDefault(); + rename(); + }); + + /************************************************ + * Takes care of 'click to edit item name' + ************************************************/ + let skip_a_rename_click = true; + $(el_item_name).on('click', function(e){ + if( !skip_a_rename_click && e.which !== 3 && $(el_item_name).parent('.item-selected').length > 0){ + last_mousedown_ts = Date.now(); + setTimeout(() => { + if(!skip_a_rename_click && (Date.now() - last_mousedown_ts) > 400){ + if (!e.ctrlKey && !e.metaKey) + activate_item_name_editor(el_item) + last_mousedown_ts = 0 + }else{ + last_mousedown_ts = Date.now() + 500; + skip_a_rename_click= false; + } + }, 500); + } + skip_a_rename_click = false; + }) + $(el_item_name).on('dblclick', function(e){ + skip_a_rename_click = true; + }) + + // -------------------------------------------------------- + // ContextMenu + // -------------------------------------------------------- + $(el_item).bind("contextmenu taphold", async function (event) { + // if item is disabled, do not allow any action + if($(el_item).hasClass('item-disabled')) + return false; + + // if on website link badge, don't continue + if($(event.target).hasClass('item-has-website-url-badge')) + return false; + + // dimiss taphold on regular devices + if(event.type==='taphold' && !isMobile.phone && !isMobile.tablet) + return; + + // if editing item name, preserve native context menu + if(event.target === el_item_name_editor) + return; + + // if ctrl is pressed don't open ctxmenu, ctrl is for drag and copy + if(event.ctrlKey) + return false; + + event.preventDefault(); + let menu_items; + const $selected_items = $(el_item).closest('.item-container').find('.item-selected').not(el_item).addBack(); + // ------------------------------------------------------- + // Multiple items selected + // ------------------------------------------------------- + if($selected_items.length > 1){ + const are_trashed = $selected_items.attr('data-path').startsWith(trash_path + '/'); + menu_items = [] + // ------------------------------------------- + // Restore + // ------------------------------------------- + if(are_trashed){ + menu_items.push({ + html: "Restore", + onClick: function(){ + $selected_items.each(function() { + const ell = this; + let metadata = $(ell).attr('data-metadata') === '' ? {} : JSON.parse($(ell).attr('data-metadata')) + move_items([ell], path.dirname(metadata.original_path)); + }) + } + }); + // ------------------------------------------- + // - + // ------------------------------------------- + menu_items.push('-'); + } + if(!are_trashed){ + // ------------------------------------------- + // Donwload + // ------------------------------------------- + menu_items.push({ + html: 'Download', + onClick: async function(){ + let items = []; + for (let index = 0; index < $selected_items.length; index++) { + items.push($selected_items[index]); + } + + zipItems(items, path.dirname($(el_item).attr('data-path')), true); + } + }); + // ------------------------------------------- + // Zip + // ------------------------------------------- + menu_items.push({ + html: 'Zip', + onClick: async function(){ + let items = []; + for (let index = 0; index < $selected_items.length; index++) { + items.push($selected_items[index]); + } + + zipItems(items, path.dirname($(el_item).attr('data-path')), false); + } + }); + // ------------------------------------------- + // - + // ------------------------------------------- + menu_items.push('-'); + } + // ------------------------------------------- + // Cut + // ------------------------------------------- + menu_items.push({ + html: "Cut", + onClick: function(){ + window.clipboard_op= 'move'; + window.clipboard = []; + $selected_items.each(function() { + const ell = this; + window.clipboard.push($(ell).attr('data-path')); + }) + } + }); + + // ------------------------------------------- + // Copy + // ------------------------------------------- + if(!are_trashed){ + menu_items.push({ + html: "Copy", + onClick: function(){ + window.clipboard_op= 'copy'; + window.clipboard = []; + $selected_items.each(function() { + const ell = this; + window.clipboard.push({path: $(ell).attr('data-path')}); + }) + } + }); + } + // ------------------------------------------- + // - + // ------------------------------------------- + menu_items.push('-'); + // ------------------------------------------- + // Delete Permanently + // ------------------------------------------- + if(are_trashed){ + menu_items.push({ + html: 'Delete Permanently', + onClick: async function(){ + const alert_resp = await UIAlert({ + message: `Are you sure you want to permanently delete these items?`, + buttons:[ + { + label: 'Delete', + type: 'primary', + }, + { + label: 'Cancel' + }, + ] + }) + if((alert_resp) === 'Delete'){ + for (let index = 0; index < $selected_items.length; index++) { + const element = $selected_items[index]; + await delete_item(element); + } + const trash = await puter.fs.stat(trash_path); + + // update other clients + if(window.socket){ + window.socket.emit('trash.is_empty', {is_empty: trash.is_empty}); + } + + if(trash.is_empty){ + $(`.item[data-path="${html_encode(trash_path)}" i], .item[data-shortcut_to_path="${trash_path}" i]`).find('.item-icon > img').attr('src', window.icons['trash.svg']); + $(`.window[data-path="${html_encode(trash_path)}"]`).find('.window-head-icon').attr('src', window.icons['trash.svg']); + } + } + } + }); + } + // ------------------------------------------- + // Create Shortcut + // ------------------------------------------- + if(!are_trashed && window.feature_flags.create_shortcut){ + menu_items.push({ + html: 'Create Shortcut', + onClick: async function(){ + $selected_items.each(function() { + let base_dir = path.dirname($(this).attr('data-path')); + // Trash on Desktop is a special case + if($(this).attr('data-path') && $(this).closest('.item-container').attr('data-path') === window.desktop_path){ + base_dir = window.desktop_path; + } + // create shortcut + create_shortcut( + path.basename($(this).attr('data-path')), + $(this).attr('data-is_dir') === '1', + base_dir, + $(this).closest('.item-container'), + $(this).attr('data-shortcut_to') === '' ? $(this).attr('data-uid') : $(this).attr('data-shortcut_to'), + $(this).attr('data-shortcut_to_path') === '' ? $(this).attr('data-path') : $(this).attr('data-shortcut_to_path'), + ); + }) + } + }); + } + // ------------------------------------------- + // Delete + // ------------------------------------------- + if(!are_trashed){ + menu_items.push({ + html: 'Delete', + onClick: async function(){ + move_items($selected_items, trash_path); + } + }); + } + + } + + // ------------------------------------------------------- + // One item selected + // ------------------------------------------------------- + else{ + const is_trash = $(el_item).attr('data-path') === trash_path || $(el_item).attr('data-shortcut_to_path') === trash_path; + menu_items = []; + // ------------------------------------------- + // Open + // ------------------------------------------- + if(!is_trashed){ + menu_items.push({ + html: 'Open', + onClick: function(){ + open_item({item: el_item}); + } + }); + + // ------------------------------------------- + // - + // ------------------------------------------- + if(options.associated_app_name || is_trash) + menu_items.push('-'); + } + // ------------------------------------------- + // Open With + // ------------------------------------------- + if(!is_trashed && !is_trash && (options.associated_app_name === null || options.associated_app_name === undefined)){ + let items = []; + if(!options.suggested_apps || options.suggested_apps.length === 0){ + // try to find suitable apps + const suitable_apps = await suggest_apps_for_fsentry({ + uid: options.uid, + path: options.path, + }); + if(suitable_apps && suitable_apps.length > 0){ + options.suggested_apps = suitable_apps; + } + } + + if(options.suggested_apps && options.suggested_apps.length > 0){ + for (let index = 0; index < options.suggested_apps.length; index++) { + const suggested_app = options.suggested_apps[index]; + if ( ! suggested_app ) { + console.warn(`suggested_app is null`, options.suggested_apps, index); + continue; + } + items.push({ + html: suggested_app.title, + icon: ``, + onClick: async function(){ + launch_app({ + name: suggested_app.name, + file_path: $(el_item).attr('data-path'), + window_title: $(el_item).attr('data-name'), + file_uid: $(el_item).attr('data-uid'), + }); + } + }) + } + }else{ + items.push({ + html: 'No suitable apps found', + disabled: true, + }); + } + // add all suitable apps + menu_items.push({ + html: 'Open With', + items: items, + }); + + // ------------------------------------------- + // -- seperator -- + // ------------------------------------------- + menu_items.push('-'); + } + + // ------------------------------------------- + // Open in New Window + // (only if the item is on a window) + // ------------------------------------------- + if($(el_item).closest('.window-body').length > 0 && options.is_dir){ + menu_items.push({ + html: 'Open in New Window', + onClick: function(){ + if(options.is_dir){ + open_item({item: el_item, new_window: true}) + } + } + }); + // ------------------------------------------- + // -- seperator -- + // ------------------------------------------- + if(!is_trash && !is_trashed && options.is_dir) + menu_items.push('-'); + } + + // ------------------------------------------- + // Publish As Website + // ------------------------------------------- + if(!is_trashed && !is_trash && options.is_dir){ + menu_items.push({ + html: 'Publish As Website', + disabled: !options.is_dir, + onClick: async function () { + if(window.require_email_verification_to_publish_website){ + if(window.user.is_temp && + !await UIWindowSaveAccount({ + send_confirmation_code: true, + message: 'Please create an account to proceed.', + window_options: { + backdrop: true, + close_on_backdrop_click: false, + } + })) + return; + else if(!window.user.email_confirmed && !await UIWindowEmailConfirmationRequired()) + return; + } + UIWindowPublishWebsite(options.uid, $(el_item).attr('data-name'), $(el_item).attr('data-path')); + } + }); + + } + // ------------------------------------------- + // Deploy As App + // ------------------------------------------- + if(!is_trashed && !is_trash && options.is_dir){ + menu_items.push({ + html: 'Deploy As App', + disabled: !options.is_dir, + onClick: async function () { + launch_app({ + name: 'dev-center', + file_path: $(el_item).attr('data-path'), + file_uid: $(el_item).attr('data-uid'), + params: { + source_path: options.path, + } + }) + } + }); + + menu_items.push('-'); + } + + // ------------------------------------------- + // Empty Trash + // ------------------------------------------- + if(is_trash){ + menu_items.push({ + html: 'Empty Trash', + onClick: async function(){ + empty_trash(); + } + }); + + } + // ------------------------------------------- + // Donwload + // ------------------------------------------- + if(!is_trash && !is_trashed && (options.associated_app_name === null || options.associated_app_name === undefined)){ + menu_items.push({ + html: 'Download', + disabled: options.is_dir && !window.feature_flags.download_directory, + onClick: async function(){ + if(options.is_dir) + zipItems(el_item, path.dirname($(el_item).attr('data-path')), true); + else + trigger_download([options.path]); + } + }); + } + + + // ------------------------------------------- + // Get Copy Link + // ------------------------------------------- + if(!is_trashed && !is_trash && (options.associated_app_name === null || options.associated_app_name === undefined)){ + menu_items.push({ + html: 'Get Copy Link', + onClick: async function(){ + if(window.user.is_temp && + !await UIWindowSaveAccount({ + message: 'Please create an account to proceed.', + send_confirmation_code: true, + window_options: { + backdrop: true, + close_on_backdrop_click: false, + } + })) + return; + else if(!window.user.email_confirmed && !await UIWindowEmailConfirmationRequired()) + return; + + UIWindowGetCopyLink({ + name: $(el_item).attr('data-name'), + uid: $(el_item).attr('data-uid'), + path: $(el_item).attr('data-path'), + is_dir: options.is_dir, + }); + } + }); + } + // ------------------------------------------- + // Zip + // ------------------------------------------- + if(!is_trash && !is_trashed && !$(el_item).attr('data-path').endsWith('.zip')){ + menu_items.push({ + html: "Zip", + onClick: function(){ + zipItems(el_item, path.dirname($(el_item).attr('data-path')), false); + } + }) + } + // ------------------------------------------- + // Unzip + // ------------------------------------------- + if(!is_trash && !is_trashed && $(el_item).attr('data-path').endsWith('.zip')){ + menu_items.push({ + html: "Unzip", + onClick: async function(){ + const zip = new JSZip(); + let filPath = $(el_item).attr('data-path'); + let file = puter.fs.read($(el_item).attr('data-path')); + + zip.loadAsync(file).then(async function (zip) { + const rootdir = await puter.fs.mkdir(path.dirname(filPath) + '/' + path.basename(filPath, '.zip'), {dedupeName: true}); + Object.keys(zip.files).forEach(async function (filename) { + if(filename.endsWith('/')) + await puter.fs.mkdir(rootdir.path +'/' + filename, {createMissingParents: true}); + zip.files[filename].async('blob').then(async function (fileData) { + await puter.fs.write(rootdir.path +'/' + filename, fileData); + }).catch(function (e) { + // UIAlert(e.message); + }) + }) + }).catch(function (e) { + // UIAlert(e.message); + }) + } + }) + } + // ------------------------------------------- + // Restore + // ------------------------------------------- + if(is_trashed){ + menu_items.push({ + html: 'Restore', + onClick: async function(){ + let metadata = $(el_item).attr('data-metadata') === '' ? {} : JSON.parse($(el_item).attr('data-metadata')) + move_items([el_item], path.dirname(metadata.original_path)); + } + }); + } + // ------------------------------------------- + // - + // ------------------------------------------- + if(!is_trash && (options.associated_app_name === null || options.associated_app_name === undefined)) + menu_items.push('-'); + // ------------------------------------------- + // Cut + // ------------------------------------------- + if($(el_item).attr('data-immutable') === '0'){ + menu_items.push({ + html: "Cut", + onClick: function(){ + window.clipboard_op= 'move'; + window.clipboard= [options.path]; + } + }); + } + // ------------------------------------------- + // Copy + // ------------------------------------------- + if(!is_trashed && !is_trash){ + menu_items.push({ + html: "Copy", + onClick: function(){ + window.clipboard_op= 'copy'; + window.clipboard= [{path: options.path}]; + } + }); + } + // ------------------------------------------- + // Paste Into Folder + // ------------------------------------------- + if($(el_item).attr('data-is_dir') === '1' && !is_trashed && !is_trash){ + menu_items.push({ + html: "Paste Into Folder", + disabled: clipboard.length > 0 ? false : true, + onClick: function(){ + if(clipboard_op === 'copy') + copy_clipboard_items($(el_item).attr('data-path'), null); + else if(clipboard_op === 'move') + move_clipboard_items(null, $(el_item).attr('data-path')) + } + }) + } + // ------------------------------------------- + // - + // ------------------------------------------- + if($(el_item).attr('data-immutable') === '0' && !is_trash){ + menu_items.push('-') + } + // ------------------------------------------- + // Create Shortcut + // ------------------------------------------- + if(!is_trashed && window.feature_flags.create_shortcut){ + menu_items.push({ + html: 'Create Shortcut', + onClick: async function(){ + let base_dir = path.dirname($(el_item).attr('data-path')); + // Trash on Desktop is a special case + if($(el_item).attr('data-path') && $(el_item).closest('.item-container').attr('data-path') === window.desktop_path){ + base_dir = window.desktop_path; + } + + create_shortcut( + path.basename($(el_item).attr('data-path')), + options.is_dir, + base_dir, + options.appendTo, + options.shortcut_to === '' ? options.uid : options.shortcut_to, + options.shortcut_to_path === '' ? options.path : options.shortcut_to_path, + ); + } + }); + } + // ------------------------------------------- + // Delete + // ------------------------------------------- + if($(el_item).attr('data-immutable') === '0' && !is_trashed){ + menu_items.push({ + html: 'Delete', + onClick: async function(){ + move_items([el_item], trash_path); + } + }); + } + // ------------------------------------------- + // Delete Permanently + // ------------------------------------------- + if(is_trashed){ + menu_items.push({ + html: 'Delete Permanently', + onClick: async function(){ + const alert_resp = await UIAlert({ + message: `Are you sure you want to permanently delete this item?`, + buttons:[ + { + label: 'Delete', + type: 'primary', + }, + { + label: 'Cancel' + }, + ] + }) + + if((alert_resp) === 'Delete'){ + await delete_item(el_item); + // check if trash is empty + const trash = await puter.fs.stat(trash_path); + // update other clients + if(window.socket){ + window.socket.emit('trash.is_empty', {is_empty: trash.is_empty}); + } + // update this client + if(trash.is_empty){ + $(`.item[data-path="${html_encode(trash_path)}" i], .item[data-shortcut_to_path="${html_encode(trash_path)}" i]`).find('.item-icon > img').attr('src', window.icons['trash.svg']); + $(`.window[data-path="${trash_path}"]`).find('.window-head-icon').attr('src', window.icons['trash.svg']); + } + } + } + }); + } + // ------------------------------------------- + // Rename + // ------------------------------------------- + if($(el_item).attr('data-immutable') === '0' && !is_trashed && !is_trash){ + menu_items.push({ + html: "Rename", + onClick: function(){ + activate_item_name_editor(el_item) + } + }); + } + // ------------------------------------------- + // - + // ------------------------------------------- + menu_items.push('-'); + // ------------------------------------------- + // Properties + // ------------------------------------------- + menu_items.push({ + html: "Properties", + onClick: function(){ + let window_height = 500; + let window_width = 450; + + let left = $(el_item).position().left + $(el_item).width(); + left = left > (window.innerWidth - window_width)? (window.innerWidth - window_width) : left; + + let top = $(el_item).position().top + $(el_item).height(); + top = top > (window.innerHeight - (window_height + window.taskbar_height + window.toolbar_height))? (window.innerHeight - (window_height + window.taskbar_height + window.toolbar_height)) : top; + + UIWindowItemProperties( + $(el_item).attr('data-name'), + $(el_item).attr('data-path'), + $(el_item).attr('data-uid'), + left, + top, + window_width, + window_height, + ); + } + }); + } + + // Create ContextMenu + UIContextMenu({ + parent_element: ($(options.appendTo).hasClass('desktop') ? undefined : options.appendTo), + items: menu_items + }); + + return false + }) + + // -------------------------------------------------------- + // Resize Item Name Editor on every keystroke + // -------------------------------------------------------- + $(el_item_name_editor).on('input keypress focus', function(){ + const val = $(el_item_name_editor).val(); + $('.item-name-shadow').html(html_encode(val).replaceAll(' ', ' ')); + if(val !== ''){ + const w = $('.item-name-shadow').width(); + const h = $('.item-name-shadow').height(); + $(el_item_name_editor).width(w + 4) + $(el_item_name_editor).height(h + 2) + } + }) + + if(options.sort_container_after_append){ + sort_items(options.appendTo, $(el_item).closest('.item-container').attr('data-sort_by'), $(el_item).closest('.item-container').attr('data-sort_order')); + } + if(options.editable){ + activate_item_name_editor(el_item) + } +} + +// Create item-name-shadow +// This element has the exact styling as item name editor and allows us +// to measure the width and height of the item name editor and automatically +// resize it to fit the text. +$('body').append(``); + +$(document).on('click', '.item-has-website-url-badge', async function(e){ + e.stopPropagation(); + e.preventDefault(); + const website_url = $(this).closest('.item').attr('data-website_url'); + if(website_url){ + window.open(website_url, '_blank'); + } + return false; +}) + +$(document).on('mousedown', '.item-has-website-url-badge', async function(e){ + console.log('mousedown') + e.stopPropagation(); + e.preventDefault(); + return false; +}) + +$(document).on('contextmenu', '.item-has-website-url-badge', async function(e){ + e.stopPropagation(); + e.preventDefault(); + + // close other context menus + const $ctxmenus = $(".context-menu"); + $ctxmenus.fadeOut(200, function(){ + $ctxmenus.remove(); + }); + + UIContextMenu({ + parent_element: this, + items: [ + // Open + { + html: `Open in New Tab ` , + html_active: `Open in New Tab ` , + onClick: function(){ + const website_url = $(e.target).closest('.item').attr('data-website_url'); + if(website_url){ + window.open(website_url, '_blank'); + } + } + }, + // Copy Link + { + html: 'Copy Link', + onClick: async function(){ + const website_url = $(e.target).closest('.item').attr('data-website_url'); + if(website_url){ + await copy_to_clipboard(website_url); + } + } + }, + ] + }); + + return false; +}) + + +$(document).on('click', '.item-has-website-badge', async function(e){ + puter.fs.stat({ + uid: $(this).closest('.item').attr('data-uid'), + returnSubdomains: true, + returnPermissions: false, + returnVersions: false, + success: function (fsentry){ + if(fsentry.subdomains) + window.open(fsentry.subdomains[0].address, '_blank'); + } + }) +}) + +$(document).on('long-hover', '.item-has-website-badge', function(e){ + puter.fs.stat({ + uid: $(this).closest('.item').attr('data-uid'), + returnSubdomains: true, + returnPermissions: false, + returnVersions: false, + success: function (fsentry){ + var box = e.target.getBoundingClientRect(); + + var body = document.body; + var docEl = document.documentElement; + + var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop; + var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft; + + var clientTop = docEl.clientTop || body.clientTop || 0; + var clientLeft = docEl.clientLeft || body.clientLeft || 0; + + var top = box.top + scrollTop - clientTop; + var left = box.left + scrollLeft - clientLeft; + + + if(fsentry.subdomains){ + let h = `
    `; + h += `
    Associated website${ fsentry.subdomains.length > 1 ? 's':''}
    `; + fsentry.subdomains.forEach(subdomain => { + h += ` + ${subdomain.address.replace('https://', '')} +
    `; + }); + + h += `
    `; + + // close other website popovers + $('.website-badge-popover-content').closest('.popover').remove(); + + // show a UIPopover with the website + UIPopover({ + target: e.target, + content:h, + snapToElement: e.target, + parent_element: e.target, + top: top - 30, + left: left + 20, + }) + } + } + }) +}) + +$(document).on('click', '.website-badge-popover-link', function(e){ + // remove the parent popover + $(e.target).closest('.popover').remove(); +}) + +// removes item(s) +$.fn.removeItems = async function(options) { + options = options || {}; + $(this).each(async function() { + const parent_container = $(this).closest('.item-container'); + $(this).remove(); + show_or_hide_empty_folder_message(parent_container); + }); + + return this; +} + +window.activate_item_name_editor= function(el_item){ + // files in trash cannot be renamed, the user should be notified with an Alert. + if($(el_item).attr('data-immutable') !== '0'){ + return; + } + // files in trash cannot be renamed, user should be notified with an Alert. + else if(path.dirname($(el_item).attr('data-path')) === window.trash_path){ + UIAlert(`This item can't be renamed because it's in the trash. To rename this item, first drag it out of the Trash.`) + return; + } + + const el_item_name = $(el_item).find('.item-name'); + const el_item_name_editor = $(el_item).find('.item-name-editor').get(0); + + $(el_item_name).hide(); + $(el_item_name_editor).show(); + $(el_item_name_editor).focus(); + $(el_item_name_editor).addClass('item-name-editor-active'); + + // select all text before extension + const item_name = $(el_item).attr('data-name'); + const is_dir = parseInt($(el_item).attr('data-is_dir')); + const extname = path.extname('/'+item_name); + if(extname !== '' && !is_dir) + el_item_name_editor.setSelectionRange(0, item_name.length - extname.length) + else + $(el_item_name_editor).select(); +} + +export default UIItem; \ No newline at end of file diff --git a/src/UI/UINotification.js b/src/UI/UINotification.js new file mode 100644 index 00000000..8b8d1506 --- /dev/null +++ b/src/UI/UINotification.js @@ -0,0 +1,57 @@ +function UINotification(options){ + global_element_id++; + + options.content = options.content ?? ''; + + let h = ''; + h += `
    `; + h += ``; + h += options.content; + h += `
    `; + + $('body').append(h); + + + const el_notification = document.getElementById(`ui-notification__${global_element_id}`); + + $(el_notification).show(0, function(e){ + // options.onAppend() + if(options.onAppend && typeof options.onAppend === 'function'){ + options.onAppend(el_notification); + } + }) + + // Show Notification + $(el_notification).delay(100).show(0). + // In the right position (the mouse) + css({ + top: toolbar_height + 15, + }); + + return el_notification; +} + +$(document).on('click', '.notification', function(e){ + if($(e.target).hasClass('notification')){ + if(options.click && typeof options.click === 'function'){ + options.click(e); + } + window.close_notification(e.target); + }else{ + window.close_notification($(e.target).closest('.notification')); + } +}); + +$(document).on('click', '.notification-close', function(e){ + window.close_notification($(e.target).closest('.notification')); +}); + + +window.close_notification = function(el_notification){ + $(el_notification).addClass('animate__fadeOutRight'); + setTimeout(function(){ + $(el_notification).remove(); + }, 500); +} + +export default UINotification; \ No newline at end of file diff --git a/src/UI/UIPopover.js b/src/UI/UIPopover.js new file mode 100644 index 00000000..dfa98f2b --- /dev/null +++ b/src/UI/UIPopover.js @@ -0,0 +1,85 @@ +// todo change to apps popover or sth +function UIPopover(options){ + // skip if popover already open + if(options.parent_element && $(options.parent_element).hasClass('has-open-popover')) + return; + + $('.window-active .window-app-iframe').css('pointer-events', 'none'); + + global_element_id++; + + options.content = options.content ?? ''; + + let h = ''; + h += `
    `; + h += options.content; + h += `
    `; + + $('body').append(h); + + + const el_popover = document.getElementById(`popover-${global_element_id}`); + + $(el_popover).show(0, function(e){ + // options.onAppend() + if(options.onAppend && typeof options.onAppend === 'function'){ + options.onAppend(el_popover); + } + }) + + let x_pos; + let y_pos; + + if(options.parent_element){ + $(options.parent_element).addClass('has-open-popover'); + } + $(el_popover).on("remove", function () { + if(options.parent_element){ + $(options.parent_element).removeClass('has-open-popover'); + } + }) + + function position_popover(){ + // X position + const popover_width = options.width ?? $(el_popover).width(); + if(options.center_horizontally){ + x_pos = window.innerWidth/2 - popover_width/2 - 15; + }else{ + if(options.position === 'bottom' || options.position === 'top') + x_pos = options.left ?? ($(options.snapToElement).offset().left - (popover_width/ 2) + 10); + else + x_pos = options.left ?? ($(options.snapToElement).offset().left + 5); + } + + // Y position + const popover_height = options.height ?? $(el_popover).height(); + if(options.center_horizontally){ + y_pos = options.top ?? (window.innerHeight - (taskbar_height + popover_height + 10)); + }else{ + y_pos = options.top ?? ($(options.snapToElement).offset().top + $(options.snapToElement).height() + 5); + } + + $(el_popover).css({ + left: x_pos + "px", + top: y_pos + "px", + }); + } + position_popover(); + + // If the window is resized, reposition the popover + $(window).on('resize', function(){ + position_popover(); + }); + + // Show Popover + $(el_popover).delay(100).show(0). + // In the right position (the mouse) + css({ + left: x_pos + "px", + top: y_pos + "px", + }); + + return el_popover; +} + +export default UIPopover; \ No newline at end of file diff --git a/src/UI/UIPrompt.js b/src/UI/UIPrompt.js new file mode 100644 index 00000000..d32ccddb --- /dev/null +++ b/src/UI/UIPrompt.js @@ -0,0 +1,103 @@ +import UIWindow from './UIWindow.js' + +function UIPrompt(options){ + // set sensible defaults + if(arguments.length > 0){ + // if first argument is a string, then assume it is the message + if(isString(arguments[0])){ + options = {}; + options.message = arguments[0]; + } + // if second argument is an array, then assume it is the buttons + if(arguments[1] && Array.isArray(arguments[1])){ + options.buttons = arguments[1]; + } + } + + return new Promise(async (resolve) => { + // provide an 'OK' button if no buttons are provided + if(!options.buttons || options.buttons.length === 0){ + options.buttons = [ + {label: 'Cancel', value: false, type: 'default'}, + {label: 'OK', value: true, type: 'primary'}, + ] + } + + let h = ''; + // message + h += `
    ${options.message}
    `; + // prompt + h += `
    `; + h += ``; + h += `
    `; + // buttons + if(options.buttons && options.buttons.length > 0){ + h += `
    `; + h += ``; + h += ``; + h += `
    `; + } + + const el_window = await UIWindow({ + title: null, + icon: null, + uid: null, + is_dir: false, + message: options.message, + backdrop: options.backdrop ?? false, + is_resizable: false, + is_droppable: false, + has_head: false, + stay_on_top: options.stay_on_top ?? false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + show_in_taskbar: false, + window_class: 'window-alert', + dominant: true, + body_content: h, + width: 450, + parent_uuid: options.parent_uuid, + onAppend: function(this_window){ + setTimeout(function(){ + $(this_window).find('.prompt-input').get(0).focus({preventScroll:true}); + }, 30); + }, + ...options.window_options, + window_css:{ + height: 'initial', + }, + body_css: { + width: 'initial', + padding: '20px', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }); + // focus to primary btn + $(el_window).find('.button-primary').focus(); + + // -------------------------------------------------------- + // Button pressed + // -------------------------------------------------------- + $(el_window).find('.prompt-resp-button').on('click', async function(event){ + event.preventDefault(); + event.stopPropagation(); + if($(this).attr('data-value') === 'true'){ + resolve($(el_window).find('.prompt-input').val()); + }else{ + resolve(false); + } + $(el_window).close(); + return false; + }) + + $(el_window).find('.prompt-input').on('keyup', async function(e){ + if(e.keyCode === 13){ + $(el_window).find('.prompt-resp-btn-ok').click(); + } + }) + }) +} + +export default UIPrompt; \ No newline at end of file diff --git a/src/UI/UITaskbar.js b/src/UI/UITaskbar.js new file mode 100644 index 00000000..6f8fcaba --- /dev/null +++ b/src/UI/UITaskbar.js @@ -0,0 +1,286 @@ +import UITaskbarItem from './UITaskbarItem.js' +import UIPopover from './UIPopover.js' + +async function UITaskbar(options){ + global_element_id++; + + options = options ?? {}; + options.content = options.content ?? ''; + + // get launch apps + $.ajax({ + url: api_origin + "/get-launch-apps", + type: 'GET', + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + success: function (apps){ + window.launch_apps = apps; + } + }); + + let h = ''; + h += `
    `; + + $('.desktop').append(h); + + //--------------------------------------------- + // add `Start` to taskbar + //--------------------------------------------- + UITaskbarItem({ + icon: window.icons['start.svg'], + name: 'Start', + sortable: false, + keep_in_taskbar: true, + disable_context_menu: true, + onClick: async function(item){ + // skip if popover already open + if($(item).hasClass('has-open-popover')) + return; + + // show popover + let popover = UIPopover({ + content: `
    `, + snapToElement: item, + parent_element: item, + width: 500, + height: 500, + center_horizontally: true, + }); + + // In the rare case that launch_apps is not populated yet, get it from the server + // then populate the popover + if(!launch_apps || !launch_apps.recent || launch_apps.recent.length === 0){ + // get launch apps + launch_apps = await $.ajax({ + url: api_origin + "/get-launch-apps", + type: 'GET', + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + }); + } + + let apps_str = ''; + + apps_str += `
    ` + apps_str += ``; + apps_str += ``; + apps_str += `
    `; + // ------------------------------------------- + // Recent apps + // ------------------------------------------- + if(launch_apps.recent.length > 0){ + // heading + apps_str += `

    Recent

    `; + + // apps + apps_str += `
    `; + for (let index = 0; index < window.launch_recent_apps_count && index < launch_apps.recent.length; index++) { + const app_info = launch_apps.recent[index]; + apps_str += `
    `; + apps_str += `
    `; + apps_str += ``; + apps_str += `${html_encode(app_info.title)}`; + apps_str += `
    `; + apps_str += `
    `; + } + apps_str += `
    `; + } + // ------------------------------------------- + // Reccomended apps + // ------------------------------------------- + if(launch_apps.recommended.length > 0){ + // heading + apps_str += `

    Recommended

    `; + + // apps + apps_str += ``; + } + + // add apps to popover + $(popover).find('.launch-popover').append(apps_str); + + // focus on search input only if not on mobile + if(!isMobile.phone) + $(popover).find('.launch-search').focus(); + + // make apps draggable + $(popover).find('.start-app').draggable({ + appendTo: "body", + helper: "clone", + revert: "invalid", + connectToSortable: ".taskbar", + //containment: "document", + zIndex: parseInt($(popover).css('z-index')) + 1, + scroll: false, + distance: 5, + revertDuration: 100, + helper: 'clone', + cursorAt: { left: 18, top: 20 }, + start: function(event, ui){ + }, + drag: function(event, ui){ + }, + stop: function(){ + } + }); + } + }); + + //--------------------------------------------- + // add `Explorer` to the taskbar + //--------------------------------------------- + UITaskbarItem({ + icon: window.icons['folders.svg'], + app: 'explorer', + name: 'Explorer', + sortable: false, + keep_in_taskbar: true, + lock_keep_in_taskbar: true, + onClick: function(){ + let open_window_count = parseInt($(`.taskbar-item[data-app="explorer"]`).attr('data-open-windows')); + if(open_window_count === 0){ + launch_app({ name: 'explorer', path: window.home_path}); + }else{ + return false; + } + } + }) + + //--------------------------------------------- + // Add other useful apps to the taskbar + //--------------------------------------------- + if(window.user.taskbar_items && window.user.taskbar_items.length > 0){ + for (let index = 0; index < window.user.taskbar_items.length; index++) { + const app_info = window.user.taskbar_items[index]; + // add taskbar item for each app + UITaskbarItem({ + icon: app_info.icon, + app: app_info.name, + name: app_info.title, + keep_in_taskbar: true, + onClick: function(){ + let open_window_count = parseInt($(`.taskbar-item[data-app="${app_info.name}"]`).attr('data-open-windows')); + if(open_window_count === 0){ + launch_app({ + name: app_info.name, + }) + }else{ + return false; + } + } + }); + } + } + + //--------------------------------------------- + // add `Trash` to the taskbar + //--------------------------------------------- + const trash = await puter.fs.stat(trash_path); + if(window.socket){ + window.socket.emit('trash.is_empty', {is_empty: trash.is_empty}); + } + + UITaskbarItem({ + icon: trash.is_empty ? window.icons['trash.svg'] : window.icons['trash-full.svg'], + app: 'trash', + name: 'Trash', + sortable: false, + keep_in_taskbar: true, + lock_keep_in_taskbar: true, + onClick: function(){ + let open_windows = $(`.window[data-path="${html_encode(trash_path)}"]`); + if(open_windows.length === 0){ + launch_app({ name: 'explorer', path: window.trash_path}); + }else{ + open_windows.focusWindow(); + } + }, + onItemsDrop: function(items){ + move_items(items, trash_path); + } + }) + + make_taskbar_sortable(); +} + +window.make_taskbar_sortable = function(){ + //------------------------------------------- + // Taskbar is sortable + //------------------------------------------- + $('.taskbar').sortable({ + axis: "x", + items: '.taskbar-item-sortable:not(.has-open-contextmenu)', + cancel: '.has-open-contextmenu', + placeholder: "taskbar-item-sortable-placeholder", + helper : 'clone', + distance: 5, + revert: 10, + receive: function(event, ui){ + if(!$(ui.item).hasClass('taskbar-item')){ + // if app is already in taskbar, cancel + if($(`.taskbar-item[data-app="${$(ui.item).attr('data-app-name')}"]`).length !== 0){ + $(this).sortable('cancel'); + $('.taskbar .start-app').remove(); + return; + }else{ + } + } + }, + update: function(event, ui){ + if(!$(ui.item).hasClass('taskbar-item')){ + // if app is already in taskbar, cancel + if($(`.taskbar-item[data-app="${$(ui.item).attr('data-app-name')}"]`).length !== 0){ + $(this).sortable('cancel'); + $('.taskbar .start-app').remove(); + return; + } + + let item = UITaskbarItem({ + icon: $(ui.item).attr('data-app-icon'), + app: $(ui.item).attr('data-app-name'), + name: $(ui.item).attr('data-app-title'), + append_to_taskbar: false, + keep_in_taskbar: true, + onClick: function(){ + let open_window_count = parseInt($(`.taskbar-item[data-app="${$(ui.item).attr('data-app-name')}"]`).attr('data-open-windows')); + if(open_window_count === 0){ + launch_app({ + name: $(ui.item).attr('data-app-name'), + }) + }else{ + return false; + } + } + }); + let el = ($(item).detach()) + $(el).insertAfter(ui.item); + // $(ui.item).insertBefore(`

    Hello!

    `); + $(el).show(); + $(ui.item).removeItems(); + update_taskbar(); + } + // only proceed to update DB if the item sorted was a pinned item otherwise no point in updating the taskbar in DB + else if($(ui.item).attr('data-keep-in-taskbar') === 'true'){ + update_taskbar(); + } + }, + }); +} + +export default UITaskbar; \ No newline at end of file diff --git a/src/UI/UITaskbarItem.js b/src/UI/UITaskbarItem.js new file mode 100644 index 00000000..590eaf6d --- /dev/null +++ b/src/UI/UITaskbarItem.js @@ -0,0 +1,346 @@ +import UIContextMenu from './UIContextMenu.js'; + +let tray_item_id = 1; + +function UITaskbarItem(options){ + let h = ``; + tray_item_id++; + options.sortable = options.sortable ?? true; + options.open_windows_count = options.open_windows_count ?? 0; + options.lock_keep_in_taskbar = options.lock_keep_in_taskbar ?? false; + options.append_to_taskbar = options.append_to_taskbar ?? true; + const element_id = global_element_id++; + + h += `
    `; + let icon = options.icon ? options.icon : window.icons['app.svg']; + if(options.app === 'explorer') + icon = window.icons['folders.svg']; + + // taskbar icon + h += `
    `; + h += ``; + h += `
    `; + + // active indicator + if(options.app !== 'apps') + h += ``; + h += `
    `; + + if(options.append_to_taskbar) + $('.taskbar').append(h); + else + $('body').prepend(h); + + const el_taskbar_item = document.querySelector(`#taskbar-item-${tray_item_id}`); + + // fade in the taskbar item + $(el_taskbar_item).show(50); + + $(el_taskbar_item).on("click", function(){ + // If this item has an open context menu, don't do anything + if($(el_taskbar_item).hasClass('has-open-contextmenu')) + return; + + if(options.onClick === undefined || options.onClick(el_taskbar_item) === false){ + // re-show each window in this app group + $(`.window[data-app="${options.app}"]`).showWindow(); + } + }) + + $(el_taskbar_item).on('contextmenu taphold', function(e){ + // seems like the only way to stop sortable is to destroy it + if(options.sortable) { + $('.taskbar').sortable('destroy'); + } + + e.preventDefault(); + e.stopPropagation(); + + // If context menu is disabled on this item, return + if(options.disable_context_menu) + return; + + // don't allow context menu to open if it's already open + if($(el_taskbar_item).hasClass('has-open-contextmenu')) + return; + + const menu_items =[]; + const open_windows = parseInt($(el_taskbar_item).attr('data-open-windows')); + // ------------------------------------------- + // List of open windows belonging to this app + // ------------------------------------------- + $(`.window[data-app="${options.app}"]`).each(function(){ + menu_items.push({ + html: $(this).find(`.window-head-title`).html(), + val: $(this).attr('data-id'), + onClick: function(e){ + $(`.window[data-id="${e.value}"]`).showWindow(); + } + }) + }) + // ------------------------------------------- + // divider + // ------------------------------------------- + if(menu_items.length > 0) + menu_items.push('-'); + + //------------------------------------------ + // New Window + //------------------------------------------ + if(options.app){ + menu_items.push({ + html: 'New Window', + val: $(this).attr('data-id'), + onClick: function(){ + launch_app({ + name: options.app, + maximized: (isMobile.phone || isMobile.tablet), + }) + } + }) + } + //------------------------------------------ + // Empty Trash + //------------------------------------------ + if(options.app === 'trash' && options.name === 'Trash'){ + // divider + menu_items.push('-'); + + // Empty Trash menu item + menu_items.push({ + html: 'Empty Trash', + val: $(this).attr('data-id'), + onClick: async function(){ + empty_trash(); + } + }) + } + + //------------------------------------------ + // Remove from Taskbar + //------------------------------------------ + if(options.keep_in_taskbar && !options.lock_keep_in_taskbar){ + menu_items.push({ + html: 'Remove from Taskbar', + val: $(this).attr('data-id'), + onClick: function(){ + $(el_taskbar_item).attr('data-keep-in-taskbar', 'false'); + if($(el_taskbar_item).attr('data-open-windows') === '0'){ + remove_taskbar_item(el_taskbar_item); + } + update_taskbar(); + options.keep_in_taskbar = false; + } + }) + } + //------------------------------------------ + // Keep in Taskbar + //------------------------------------------ + else if(!options.keep_in_taskbar){ + menu_items.push({ + html: 'Keep in Taskbar', + val: $(this).attr('data-id'), + onClick: function(){ + $(el_taskbar_item).attr('data-keep-in-taskbar', 'true'); + update_taskbar(); + options.keep_in_taskbar = true; + } + }) + } + + if(open_windows > 0){ + // ------------------------------------------- + // divider + // ------------------------------------------- + menu_items.push('-'); + // ------------------------------------------- + // Show All Windows + // ------------------------------------------- + menu_items.push({ + html: "Show All Windows", + onClick: function(){ + if(open_windows > 0) + $(el_taskbar_item).trigger('click'); + } + }) + // ------------------------------------------- + // Hide All Windows + // ------------------------------------------- + menu_items.push({ + html: "Hide All Windows", + onClick: function(){ + if(open_windows > 0) + $(`.window[data-app="${options.app}"]`).hideWindow(); + } + }) + // ------------------------------------------- + // Close All Windows + // ------------------------------------------- + menu_items.push({ + html: "Close All Windows", + onClick: function(){ + $(`.window[data-app="${options.app}"]`).close(); + } + }) + } + const pos = el_taskbar_item.getBoundingClientRect(); + UIContextMenu({ + parent_element: el_taskbar_item, + position: {top: pos.top - 15, left: pos.left+5}, + items: menu_items + }); + + return false; + }); + + $( el_taskbar_item ).tooltip({ + items: ".taskbar:not(.children-have-open-contextmenu) .taskbar-item", + position: { + my: "center bottom-20", + at: "center top", + using: function( position, feedback ) { + $( this ).css( position ); + $( "
    " ) + .addClass( "arrow" ) + .addClass( feedback.vertical ) + .addClass( feedback.horizontal ) + .appendTo( this ); + } + } + }); + + // -------------------------------------------------------- + // Droppable + // -------------------------------------------------------- + $(el_taskbar_item).droppable({ + accept: '.item', + // 'pointer' is very important because of active window tracking is based on the position of cursor. + tolerance: 'pointer', + drop: async function( event, ui ) { + // Check if hovering over an item that is VISIBILE + if($(event.target).closest('.window').attr('data-id') !== $(mouseover_window).attr('data-id')) + return; + + // If ctrl is pressed and source is Trashed, cancel whole operation + if(event.ctrlKey && path.dirname($(ui.draggable).attr('data-path')) === window.trash_path) + return; + + const items_to_move = [] + + // First item + items_to_move.push(ui.draggable); + + // All subsequent items + const cloned_items = document.getElementsByClassName('item-selected-clone'); + for(let i =0; i 0 && $event_parent_win.attr('data-id') !== $(mouseover_window).attr('data-id')) + return; + // Don't do anything if the dragged item is NOT a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + // If this is a directory or an app, and an item was dragged over it, highlight it. + if(options.is_dir || options.app){ + $(el_taskbar_item).addClass('active'); + // show tooltip of this item + $(el_taskbar_item).tooltip().mouseover(); + // make item name partially transparent + $('.ui-draggable-dragging .item-name, .item-selected-clone .item-name').css('opacity', 0.1) + // remove all item-container active borders + $('.item-container').addClass('item-container-transparent-border') + } + // Disable all window bodies + $('.item-container').droppable( 'disable' ) + }, + out: function(event, ui){ + // Don't do anything if the dragged item is NOT a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + + // Unselect directory/app if item is dragged out + if(options.is_dir || options.app){ + $(el_taskbar_item).removeClass('active'); + $(el_taskbar_item).tooltip('close'); + $('.ui-draggable-dragging .item-name, .item-selected-clone .item-name').css('opacity', 'initial') + $('.item-container').removeClass('item-container-transparent-border') + } + $('.item-container').droppable( 'enable' ) + } + }); + + return el_taskbar_item; +} + +export default UITaskbarItem \ No newline at end of file diff --git a/src/UI/UIWindow.js b/src/UI/UIWindow.js new file mode 100644 index 00000000..07ac6e05 --- /dev/null +++ b/src/UI/UIWindow.js @@ -0,0 +1,3233 @@ +import UIAlert from './UIAlert.js'; +import UIContextMenu from './UIContextMenu.js'; +import path from '../lib/path.js'; +import UITaskbarItem from './UITaskbarItem.js'; +import UIWindowLogin from './UIWindowLogin.js'; +import UIWindowPublishWebsite from './UIWindowPublishWebsite.js'; +import UIWindowItemProperties from './UIWindowItemProperties.js'; + +const el_body = document.getElementsByTagName('body')[0]; + +async function UIWindow(options) { + const win_id = global_element_id++; + last_window_zindex++; + + // options.dominant places the window in center close to top. + options.dominant = options.dominant ?? false; + + // in case of file dialogs, the window is automatically dominant + if(options.is_openFileDialog || options.is_saveFileDialog || options.is_directoryPicker) + options.dominant = true; + + // we don't want to increment window_counter for dominant windows + if(!options.dominant) + window.window_counter++; + + // add this window's id to the window_stack + window_stack.push(win_id); + + // ===================================== + // set options defaults + // ===================================== + + // indicates if sidebar is hidden, only applies to directory windows + let sidebar_hidden = false; + + const default_window_top = ('calc(15% + ' + ((window.window_counter-1) % 10 * 20) + 'px)'); + + // list of file types that are allowed, other types will be disabled but still shown + options.allowed_file_types = options.allowed_file_types ?? ''; + options.app = options.app ?? ''; + options.allow_context_menu = options.allow_context_menu ?? true; + options.allow_native_ctxmenu = options.allow_native_ctxmenu ?? false; + options.allow_user_select = options.allow_user_select ?? false; + options.backdrop = options.backdrop ?? false; + options.body_css = options.body_css ?? {}; + options.border_radius = options.border_radius ?? undefined; + options.draggable_body = options.draggable_body ?? false; + options.element_uuid = options.element_uuid ?? uuidv4(); + options.center = options.center ?? false; + options.close_on_backdrop_click = options.close_on_backdrop_click ?? true; + options.disable_parent_window = options.disable_parent_window ?? false; + options.has_head = options.has_head ?? true; + options.height = options.height ?? 380; + options.icon = options.icon ?? null; + options.iframe_msg_uid = options.iframe_msg_uid ?? null; + options.is_droppable = options.is_droppable ?? true; + options.is_draggable = options.is_draggable ?? true; + options.is_dir = options.is_dir ?? false; + options.is_minimized = options.is_minimized ?? false; + options.is_maximized = options.is_maximized ?? false; + options.is_openFileDialog = options.is_openFileDialog ?? false; + options.is_resizable = options.is_resizable ?? true; + // if this is a fullpage window, it won't be resizable + if(options.is_fullpage) + options.is_resizable = false; + + // in the embedded/fullpage mode every window is on top since there is no taskbar to switch between windows + // if user has specifically asked for this window to NOT stay on top, honor it. + if((is_embedded || window.is_fullpage_mode) && !options.parent_uuid && options.stay_on_top !== false) + options.stay_on_top = true; + // Keep the window on top of all previously opened windows + options.stay_on_top = options.stay_on_top ?? false; + + options.is_saveFileDialog = options.is_saveFileDialog ?? false; + options.show_minimize_button = options.show_minimize_button ?? true; + options.on_close = options.on_close ?? undefined; + options.parent_uuid = options.parent_uuid ?? null; + options.selectable_body = options.selectable_body ?? true; + options.show_in_taskbar = options.show_in_taskbar ?? true; + options.show_maximize_button = options.show_maximize_button ?? true; + options.single_instance = options.single_instance ?? false; + options.sort_by = options.sort_by ?? 'name'; + options.sort_order = options.sort_order ?? 'asc'; + options.title = options.title ?? null; + options.top = options.top ?? default_window_top; + options.type = options.type ?? null; + options.update_window_url = options.update_window_url ?? false; + options.layout = options.layout ?? 'icons'; + options.width = options.width ?? 680; + options.window_css = options.window_css ?? {}; + options.window_class = (options.window_class !== undefined ? ' ' + options.window_class : ''); + + // if only one instance is allowed, bring focus to the window that is already open + if(options.single_instance && options.app !== ''){ + let $already_open_window = $(`.window[data-app="${html_encode(options.app)}"]`); + if($already_open_window.length){ + $(`.window[data-app="${html_encode(options.app)}"]`).focusWindow(); + return; + } + } + + // left + if(!options.dominant && !options.center){ + options.left = options.left ?? ((window.innerWidth/2 - options.width/2) +(window.window_counter-1) % 10 * 30) + 'px'; + }else if(!options.dominant && options.center){ + options.left = options.left ?? ((window.innerWidth/2 - options.width/2)) + 'px'; + } + else if(options.dominant){ + options.left = (window.innerWidth/2 - options.width/2) + 'px'; + } + else + options.left = options.left ?? ((window.innerWidth/2 - options.width/2) + 'px'); + + // top + if(!options.dominant && !options.center){ + options.top = options.top ?? ((window.innerHeight/2 - options.height/2) +(window.window_counter-1) % 10 * 30) + 'px'; + }else if(!options.dominant && options.center){ + options.top = options.top ?? ((window.innerHeight/2 - options.height/2)) + 'px'; + } + else if(options.dominant){ + options.top = (window.innerHeight * 0.15); + } + else if(isMobile.phone) + options.top = 100; + + if(isMobile.phone){ + options.left = 0; + options.top = window.toolbar_height + 'px'; + options.width = '100%'; + options.height = 'calc(100% - ' + window.toolbar_height + 'px)'; + }else{ + options.width += 'px' + options.height += 'px' + } + + // ===================================== + // cover page + // ===================================== + if(options.cover_page){ + options.left = 0; + options.top = 0; + options.width = '100%'; + options.height = '100%'; + } + // -------------------------------------------------------- + // HTML for Window + // -------------------------------------------------------- + let h = ''; + + // Window + let zindex = options.stay_on_top ? (99999999 + last_window_zindex + 1 + ' !important') : last_window_zindex; + h += `
    `; + // window mask + h += `
    `; + //busy indicator + h += `
    BUSY
    `; + h += `
    `; + + + // Head + if(options.has_head){ + h += `
    `; + // draggable handle which also contains icon and title + h+=`
    `; + // icon + if(options.icon) + h += ``; + // title + h += ``; + h += `
    `; + // Minimize button, only if window is resizable and not embedded + if(options.is_resizable && options.show_minimize_button && !is_embedded) + h += ``; + // Maximize button + if(options.is_resizable && options.show_maximize_button) + h += ``; + // Close button + h += ``; + h += `
    `; + } + + // Sidebar + if(options.is_dir && !isMobile.phone){ + h += `
    `; + // favorites + h += `

    Favorites

    `; + h += `
    Home
    `; + h += `
    Documents
    `; + h += `
    Pictures
    `; + h += `
    Desktop
    `; + h += `
    Videos
    `; + h += `
    `; + } + + // Navbar + if(options.is_dir){ + h += `
    `; + h += `
    `; + // Back + h += ``; + // Forward + h += ``; + // Up + h += ``; + h += `
    `; + // Path + h += `
    ${navbar_path(options.path, window.user.username)}
    `; + // Path editor + h += ``; + // Layout settings + h += ``; + h += `
    `; + } + + // Body + h += `
    `; + // iframe, for apps + if(options.iframe_url || options.iframe_srcdoc){ + // iframe + h += ``; + } + // custom body + else if(options.body_content !== undefined){ + h += options.body_content; + } + + // Directory + if(options.is_dir){ + // Detail layout header + h += window.explore_table_headers(); + + // Add 'This folder is empty' message by default + h += `
    This folder is empty
    `; + + // Loading spinner + h += `
    `; + h +=`circle anim`; + h += `

    Loading...

    `; + h += `
    `; + } + + h += `
    `; + + // Explorer footer + if(options.is_dir && !options.is_saveFileDialog && !options.is_openFileDialog && !options.is_directoryPicker){ + h += ``; + } + + // is_saveFileDialog + if(options.is_saveFileDialog){ + h += `
    `; + h += `
    `; + h += ``; + h += ``; + h += ``; + h += `
    `; + h += `
    `; + } + + // is_openFileDialog + else if(options.is_openFileDialog){ + h += `
    `; + h += `
    `; + h += ``; + h += ``; + h += `
    `; + h += `
    `; + } + + // is_directoryPicker + else if(options.is_directoryPicker){ + h += `
    `; + h += `
    `; + h += ``; + h += ``; + h += `
    `; + h += `
    `; + } + h += `
    `; + + // backdrop + if(options.backdrop){ + let backdrop_zindex; + // backdrop should also cover over taskbar + let taskbar_zindex = $('.taskbar').css('z-index'); + if(taskbar_zindex === null || taskbar_zindex === undefined) + backdrop_zindex = zindex; + else{ + taskbar_zindex = parseInt(taskbar_zindex); + backdrop_zindex = taskbar_zindex > zindex ? taskbar_zindex : zindex; + } + + h = `
    ` + h + `
    `; + } + + // Append + $(el_body).append(h); + + // disable_parent_window + if(options.disable_parent_window && options.parent_uuid !== null){ + const $el_parent_window = $(`.window[data-element_uuid="${options.parent_uuid}"]`); + const $el_parent_disable_mask = $el_parent_window.find('.window-disable-mask'); + //disable parent window + $el_parent_window.addClass('window-disabled') + $el_parent_disable_mask.show(); + $el_parent_disable_mask.css('z-index', parseInt($el_parent_window.css('z-index')) + 1); + $el_parent_window.find('iframe').blur(); + } + + // Add Taskbar Item + if(!options.is_openFileDialog && !options.is_saveFileDialog && !options.is_directoryPicker && options.show_in_taskbar){ + // add icon if there is no similar app already open + if($(`.taskbar-item[data-app="${options.app}"]`).length === 0){ + UITaskbarItem({ + icon: options.icon, + name: options.title, + app: options.app, + open_windows_count: 1, + onClick: function(){ + let open_window_count = parseInt($(`.taskbar-item[data-app="${options.app}"]`).attr('data-open-windows')); + if(open_window_count === 0){ + launch_app({ + name: options.app, + }) + }else{ + return false; + } + } + }); + if(options.app) + $(`.taskbar-item[data-app="${options.app}"] .active-taskbar-indicator`).show(); + }else{ + if(options.app){ + $(`.taskbar-item[data-app="${options.app}"]`).attr('data-open-windows', parseInt($(`.taskbar-item[data-app="${options.app}"]`).attr('data-open-windows')) + 1); + $(`.taskbar-item[data-app="${options.app}"] .active-taskbar-indicator`).show(); + } + } + } + + // if directory, set window_nav_history and window_nav_history_current_position + if(options.is_dir){ + window_nav_history[win_id] = [options.path]; + window_nav_history_current_position[win_id] = 0; + } + + // get all the elements needed + const el_window = document.querySelector(`#window-${win_id}`); + const el_window_head = document.querySelector(`#window-${win_id} > .window-head`); + const el_window_sidebar = document.querySelector(`#window-${win_id} > .window-sidebar`); + const el_window_head_title = document.querySelector(`#window-${win_id} > .window-head .window-head-title`); + const el_window_head_icon = document.querySelector(`#window-${win_id} > .window-head .window-head-icon`); + const el_window_head_scale_btn = document.querySelector(`#window-${win_id} > .window-head > .window-scale-btn`); + const el_window_navbar_back_btn = document.querySelector(`#window-${win_id} .window-navbar-btn-back`); + const el_window_navbar_forward_btn = document.querySelector(`#window-${win_id} .window-navbar-btn-forward`); + const el_window_navbar_up_btn = document.querySelector(`#window-${win_id} .window-navbar-btn-up`); + const el_window_body = document.querySelector(`#window-${win_id} > .window-body`); + const el_window_app_iframe = document.querySelector(`#window-${win_id} > .window-body > .window-app-iframe`); + const el_savefiledialog_filename = document.querySelector(`#window-${win_id} .savefiledialog-filename`); + const el_savefiledialog_save_btn = document.querySelector(`#window-${win_id} .savefiledialog-save-btn`); + const el_filedialog_cancel_btn = document.querySelector(`#window-${win_id} .filedialog-cancel-btn`); + const el_openfiledialog_open_btn = document.querySelector(`#window-${win_id} .openfiledialog-open-btn`); + const el_directorypicker_select_btn = document.querySelector(`#window-${win_id} .directorypicker-select-btn`); + + if(options.is_maximized){ + // save original size and position + $(el_window).attr({ + 'data-left-before-maxim': ((window.innerWidth/2 - 680/2) +(window.window_counter-1) % 10 * 30) + 'px', + 'data-top-before-maxim': default_window_top, + 'data-width-before-maxim': '680px', + 'data-height-before-maxim': '350px', + 'data-is_maximized': '1', + }); + + // shrink icon + $(el_window).find('.window-scale-btn>img').attr('src', window.icons['scale-down-3.svg']); + + // set new size and position + $(el_window).css({ + 'top': window.toolbar_height + 'px', + 'left': '0', + 'width': '100%', + 'height': `calc(100% - ${window.taskbar_height + window.toolbar_height + 1}px)`, + 'transform': 'none', + }); + } + + // when a window is created, focus is brought to it and + // therefore it is the current active element + window.active_element = el_window; + + // set name + $(el_window_head_title).html(html_encode(options.title)); + + // set icon + if(options.icon) + $(el_window_head_icon).attr('src', options.icon.image ?? options.icon); + + // root folder of a shared user? + if(options.is_dir && (options.path.split('/').length - 1) === 1 && options.path !== '/'+window.user.username){ + $(el_window_head_icon).attr('src', window.icons['shared.svg']); + } + // focus on this window and deactivate other windows + $(el_window).focusWindow(); + + if (animate_window_opening) { + // animate window opening + $(el_window).css({ + 'opacity': '0', + 'transition': 'opacity 70ms ease-in-out', + }); + + // Use requestAnimationFrame to schedule a function to run at the next repaint of the browser window + requestAnimationFrame(() => { + // Change the window's opacity to 1 and scale to 1 to create an opening effect + $(el_window).css({ + 'opacity': '1', + }) + + // Set a timeout to run after the transition duration (100ms) + setTimeout(function () { + // Remove the transition property, so future CSS changes won't be animated + $(el_window).css({ + 'transition': 'none', + }) + }, 70); + }); + } + + // onAppend() - using show() is a hack to make sure window is visible AND onAppend is called when + // window is actually appended and usable. + $(el_window).show(0, function(e){ + // if SaveFileDialog, bring focus to the el_savefiledialog_filename and select all + if(options.is_saveFileDialog){ + let item_name = el_savefiledialog_filename.value; + const extname = path.extname('/' + item_name); + if(extname !== '') + el_savefiledialog_filename.setSelectionRange(0, item_name.length - extname.length) + else + $(el_savefiledialog_filename).select(); + + $(el_savefiledialog_filename).get(0).focus({preventScroll:true}); + } + //set custom window css + $(el_window).css(options.window_css); + // onAppend() + if(options.onAppend && typeof options.onAppend === 'function'){ + options.onAppend(el_window); + } + }) + + if(options.is_saveFileDialog){ + //------------------------------------------------ + // SaveFileDialog > Save button + //------------------------------------------------ + $(el_savefiledialog_save_btn).on('click', function(e){ + const filename = $(el_savefiledialog_filename).val(); + try{ + validate_fsentry_name(filename) + }catch(err){ + UIAlert(err.message, 'error', 'OK') + return; + } + const target_path = path.join($(el_window).attr('data-path'), filename); + if(options.onSaveFileDialogSave && typeof options.onSaveFileDialogSave === 'function') + options.onSaveFileDialogSave(target_path, el_window) + }) + + //------------------------------------------------ + // SaveFileDialog > Enter + //------------------------------------------------ + $(el_savefiledialog_filename).on('keypress', function(event) { + if(event.which === 13){ + $(el_savefiledialog_save_btn).trigger('click'); + } + }) + + //------------------------------------------------ + // Enable/disable Save button based on input + //------------------------------------------------ + $(el_savefiledialog_filename).bind('keydown change input paste', function(){ + if($(this).val() !== '') + $(el_savefiledialog_save_btn).removeClass('disabled'); + else + $(el_savefiledialog_save_btn).addClass('disabled'); + }) + $(el_savefiledialog_filename).get(0).focus({preventScroll:true}); + } + + if(options.is_openFileDialog){ + //------------------------------------------------ + // OpenFileDialog > Open button + //------------------------------------------------ + $(el_openfiledialog_open_btn).on('click', async function(e){ + const selected_els = $(el_window).find('.item-selected[data-is_dir="0"]'); + let selected_files; + + // No item selected + if(selected_els.length === 0) + return; + // ------------------------------------------------ + // Item(s) selected + // ------------------------------------------------ + else{ + selected_files = [] + // an array that hold the items to sign + const items_to_sign = []; + + // prepare items to sign + for(let i=0; i Select button + //------------------------------------------------ + $(el_directorypicker_select_btn).on('click', async function(e){ + const selected_els = $(el_window).find('.item-selected[data-is_dir="1"]'); + let selected_dirs; + // ------------------------------------------------ + // No item selected, return current directory + // ------------------------------------------------ + if(selected_els.length === 0){ + selected_dirs = await puter.fs.sign(options.initiating_app_uuid, {uid: $(el_window).attr('data-uid'), action: 'write'}) + selected_dirs = selected_dirs.items; + } + + // ------------------------------------------------ + // directorie(s) selected + // ------------------------------------------------ + else{ + selected_dirs = [] + // an array that hold the items to sign + const items_to_sign = []; + + // prepare items to sign + for(let i=0; i Cancel button + //------------------------------------------------ + $(el_filedialog_cancel_btn).on('click', function(e){ + if(options.return_to_parent_window){ + window.close(); + window.open('','_self').close(); + } + $(el_window).hide(0, ()=>{ + // re-anable parent window + $(`.window[data-element_uuid="${options.parent_uuid}"]`).removeClass('window-disabled'); + $(`.window[data-element_uuid="${options.parent_uuid}"]`).find('.window-disable-mask').hide(); + $(el_window).close(); + }) + }) + } + + if(options.is_dir){ + navbar_path_droppable(el_window); + sidebar_item_droppable(el_window); + // -------------------------------------------------------- + // Back button + // -------------------------------------------------------- + $(el_window_navbar_back_btn).on('click', function(e){ + // if history menu is open don't continue + if($(el_window_navbar_back_btn).hasClass('has-open-contextmenu')) + return; + // if ctrl/cmd are pressed, open in new window + if(e.ctrlKey || e.metaKey){ + const dirpath = window_nav_history[win_id].at(window_nav_history_current_position[win_id] - 1); + UIWindow({ + path: dirpath, + title: dirpath === '/' ? root_dirname : path.basename(dirpath), + icon: window.icons['folder.svg'], + // uid: $(el_item).attr('data-uid'), + is_dir: true, + }); + } + // ... otherwise, open in same window + else{ + window_nav_history_current_position[win_id] > 0 && window_nav_history_current_position[win_id]--; + const new_path = window_nav_history[win_id].at(window_nav_history_current_position[win_id]); + // update window path + update_window_path(el_window, new_path); + } + }) + // -------------------------------------------------------- + // Back button click-hold + // -------------------------------------------------------- + $(el_window_navbar_back_btn).on('taphold', function() { + let items = []; + const pos = el_window_navbar_back_btn.getBoundingClientRect(); + + for(let index = window_nav_history_current_position[win_id] - 1; index >= 0; index--){ + const history_item = window_nav_history[win_id].at(index); + + // build item for context menu + items.push({ + html: `${history_item === window.home_path ? 'Home' : path.basename(history_item)}`, + val: index, + onClick: async function(e){ + let history_index = e.value; + window_nav_history_current_position[win_id] = history_index; + const new_path = window_nav_history[win_id].at(window_nav_history_current_position[win_id]); + // if ctrl/cmd are pressed, open in new window + if(e.ctrlKey || e.metaKey && (new_path !== undefined && new_path !== null)){ + UIWindow({ + path: new_path, + title: new_path === '/' ? root_dirname : path.basename(new_path), + icon: window.icons['folder.svg'], + is_dir: true, + }); + } + // update window path + else{ + update_window_path(el_window, new_path); + } + } + }) + } + + // Menu + UIContextMenu({ + position: {top: pos.top + pos.height + 3, left: pos.left}, + parent_element: el_window_navbar_back_btn, + items: items, + }) + }) + // -------------------------------------------------------- + // Forward button + // -------------------------------------------------------- + $(el_window_navbar_forward_btn).on('click', function(e){ + // if history menu is open don't continue + if($(el_window_navbar_forward_btn).hasClass('has-open-contextmenu')) + return; + // if ctrl/cmd are pressed, open in new window + if(e.ctrlKey || e.metaKey){ + const dirpath = window_nav_history[win_id].at(window_nav_history_current_position[win_id] + 1); + UIWindow({ + path: dirpath, + title: dirpath === '/' ? root_dirname : path.basename(dirpath), + icon: window.icons['folder.svg'], + // uid: $(el_item).attr('data-uid'), + is_dir: true, + }); + } + // ... otherwise, open in same window + else{ + window_nav_history_current_position[win_id]++; + // get last path in history + const target_path = window_nav_history[win_id].at(window_nav_history_current_position[win_id]); + // update window path + if(target_path !== undefined){ + update_window_path(el_window, target_path); + } + } + }) + // -------------------------------------------------------- + // forward button click-hold + // -------------------------------------------------------- + $(el_window_navbar_forward_btn).on('taphold', function() { + let items = []; + const pos = el_window_navbar_forward_btn.getBoundingClientRect(); + + for(let index = window_nav_history_current_position[win_id] + 1; index < window_nav_history[win_id].length; index++){ + const history_item = window_nav_history[win_id].at(index); + + // build item for context menu + items.push({ + html: `${history_item === window.home_path ? 'Home' : path.basename(history_item)}`, + val: index, + onClick: async function(e){ + let history_index = e.value; + window_nav_history_current_position[win_id] = history_index; + const new_path = window_nav_history[win_id].at(window_nav_history_current_position[win_id]); + // if ctrl/cmd are pressed, open in new window + if(e.ctrlKey || e.metaKey && (new_path !== undefined && new_path !== null)){ + UIWindow({ + path: new_path, + title: new_path === '/' ? root_dirname : path.basename(new_path), + icon: window.icons['folder.svg'], + is_dir: true, + }); + } + // update window path + else{ + update_window_path(el_window, new_path); + } + } + }) + } + + // Menu + UIContextMenu({ + parent_element: el_window_navbar_forward_btn, + position: {top: pos.top + pos.height + 3, left: pos.left}, + items: items, + }) + }) + + // -------------------------------------------------------- + // Up button + // -------------------------------------------------------- + $(el_window_navbar_up_btn).on('click', function(e){ + const target_path = path.resolve(path.join($(el_window).attr('data-path'), '..')); + // if ctrl/cmd are pressed, open in new window + if(e.ctrlKey || e.metaKey && (target_path !== undefined && target_path !== null)){ + UIWindow({ + path: target_path, + title: target_path === '/' ? root_dirname : path.basename(target_path), + icon: window.icons['folder.svg'], + // uid: $(el_item).attr('data-uid'), + is_dir: true, + }); + } + // ... otherwise, open in same window + else if(target_path !== undefined && target_path !== null){ + // update history + window_nav_history[win_id] = window_nav_history[win_id].slice(0, window_nav_history_current_position[win_id]+1); + window_nav_history[win_id].push(target_path); + window_nav_history_current_position[win_id]++; + // update window path + update_window_path(el_window, target_path); + } + }) + + const layouts = ['icons', 'list', 'details']; + + $(el_window).find('.window-navbar-layout-settings').on('contextmenu taphold', function() { + let cur_layout = $(el_window).attr('data-layout'); + let items = []; + for(let i=0; i${layouts[i]}`, + icon: cur_layout === layouts[i] ? '✓' : '', + onClick: async function(e){ + update_window_layout(el_window, layouts[i]); + window.set_layout($(el_window).attr('data-uid'), layouts[i]); + } + }) + } + UIContextMenu({ + parent_element: this, + items: items, + }) + }) + $(el_window).find('.window-navbar-layout-settings').on('click', function() { + let cur_layout = $(el_window).attr('data-layout'); + for(let i=0; i { + selected_ctrl_items = []; + return $(event.target).is(`#window-body-${win_id}`) + }) + .on('beforedrag', evt => { + }) + .on('start', ({store, event}) => { + if (!event.ctrlKey && !event.metaKey) { + + for (const el of store.stored) { + el.classList.remove('item-selected'); + } + + selection.clearSelection(); + } + }) + .on('move', ({store: {changed: {added, removed}}, event}) => { + for (const el of added) { + // if ctrl or meta key is pressed and the item is already selected, then unselect it + if((event.ctrlKey || event.metaKey) && $(el).hasClass('item-selected')){ + el.classList.remove('item-selected'); + selected_ctrl_items.push(el); + } + // otherwise select it + else{ + el.classList.add('item-selected'); + // the latest selected item is the active element + active_element = el; + } + } + + for (const el of removed) { + el.classList.remove('item-selected'); + // in case this item was selected by ctrl+click before, then reselect it again + if(selected_ctrl_items.includes(el)) + $(el).addClass('item-selected'); + } + + update_explorer_footer_selected_items_count(el_window); + + // If this is openFileDialog, enable/disable the Open button accordingly + if(options.is_openFileDialog && $(el_window).find('.item-selected').length) + $(el_openfiledialog_open_btn).removeClass('disabled') + else + $(el_openfiledialog_open_btn).addClass('disabled') + }) + .on('stop', ({store, event}) => { + // If this is openFileDialog, enable/disable the Open button accordingly + if(options.is_openFileDialog && $(el_window).find('.item-selected').length) + $(el_openfiledialog_open_btn).removeClass('disabled') + else + $(el_openfiledialog_open_btn).addClass('disabled') + }); + } + + // -------------------------------------------------------- + // Droppable + // -------------------------------------------------------- + $(el_window_body).droppable({ + accept: '.item', + greedy: true, + tolerance: "pointer", + drop: async function( e, ui ) { + // check if item was actually dropped on this window + if($(mouseover_window).attr('data-id') !== $(el_window).attr('data-id')) + return; + + // can't drop anything here but a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + + // -------------------------------------------------- + // In case this was dropped on an App window + // -------------------------------------------------- + if(el_window_app_iframe !== null){ + const items_to_move = [] + + // first item + items_to_move.push(ui.draggable); + + // all subsequent items + const cloned_items = document.getElementsByClassName('item-selected-clone'); + for(let i =0; i { + create_shortcut( + path.basename($(item_to_move).attr('data-path')), + $(item_to_move).attr('data-is_dir') === '1', + $(mouseover_window).attr('data-path'), + null, + $(item_to_move).attr('data-shortcut_to') === '' ? $(item_to_move).attr('data-uid') : $(item_to_move).attr('data-shortcut_to'), + $(item_to_move).attr('data-shortcut_to_path') === '' ? $(item_to_move).attr('data-path') : $(item_to_move).attr('data-shortcut_to_path'), + ); + }); + } + // otherwise, move items + else{ + move_items(items_to_move, $(mouseover_window).attr('data-path')); + } + }, + over: function(event, ui){ + // Don't do anything if the dragged item is NOT a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + }, + out: function(event, ui){ + // Don't do anything if the dragged item is NOT a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + } + }); + + // -------------------------------------------------------- + // Double Click on Head + // double click on a window head will maximize or shrink window + // only maximize/shrink if window is marked `is_resizable` + // -------------------------------------------------------- + if(options.is_resizable){ + $(el_window_head).dblclick(function () { + scale_window(el_window); + }) + } + + $(el_window_head).mousedown(function () { + if(window_is_snapped){ + $( el_window ).draggable( "option", "cursorAt", { left: width_before_snap/2 } ); + } + }) + + // -------------------------------------------------------- + // Click On The `Scale` Button + // (the little rectangle in the window head) + // -------------------------------------------------------- + if(options.is_resizable){ + $(el_window_head_scale_btn).click(function () { + scale_window(el_window); + }) + } + + // -------------------------------------------------------- + // Dragster + // If a local item is dragged over this window, bring it to front + // -------------------------------------------------------- + let drag_enter_timeout; + $(el_window).dragster({ + enter: function (dragsterEvent, event) { + // make sure to cancel any previous timeouts otherwise the window will be brought to front multiple times + clearTimeout(drag_enter_timeout); + // If items are dragged over this window long enough, bring it to front + drag_enter_timeout = setTimeout(function(){ + // focus window + $(el_window).focusWindow(); + }, 1400); + }, + leave: function (dragsterEvent, event) { + // cancel the timeout for 'bringing window to front' + clearTimeout(drag_enter_timeout); + }, + drop: function (dragsterEvent, event) { + // cancel the timeout for 'bringing window to front' + clearTimeout(drag_enter_timeout); + }, + over: function (dragsterEvent, event) { + // cancel the timeout for 'bringing window to front' + clearTimeout(drag_enter_timeout); + } + }); + + // -------------------------------------------------------- + // Dragster + // Allow dragging of local files onto this window, if it's is_dir + // -------------------------------------------------------- + $(el_window_body).dragster({ + enter: function (dragsterEvent, event) { + if(options.is_dir){ + // remove any context menu that might be open + $('.context-menu').remove(); + + // highlight this item container + $(el_window).find('.item-container').addClass('item-container-active'); + } + }, + leave: function (dragsterEvent, event) { + if(options.is_dir){ + $(el_window).find('.item-container').removeClass('item-container-active'); + } + }, + drop: function (dragsterEvent, event) { + const e = event.originalEvent; + if(options.is_dir){ + // if files were dropped... + if(e.dataTransfer?.items?.length>0){ + upload_items(e.dataTransfer.items, $(el_window).attr('data-path')) + } + // de-highlight all windows + $('.item-container').removeClass('item-container-active'); + } + e.stopPropagation(); + e.preventDefault(); + return false; + } + }); + + // -------------------------------------------------------- + // Close button + // -------------------------------------------------------- + $(`#window-${win_id} > .window-head > .window-close-btn`).click(function () { + $(el_window).close({ + shrink_to_target: options.on_close_shrink_to_target + }); + }) + + // -------------------------------------------------------- + // Minimize button + // -------------------------------------------------------- + $(`#window-${win_id} > .window-head > .window-minimize-btn`).click(function () { + $(el_window).hideWindow(); + }) + + // -------------------------------------------------------- + // Draggable + // -------------------------------------------------------- + let width_before_snap = 0; + let height_before_snap = 0; + let window_is_snapped = false; + let snap_placeholder_active = false; + let snap_trigger_timeout; + + if(options.is_draggable){ + let window_snap_placeholder = $( + `
    +
    +
    ` + ); + + $(el_window).draggable({ + start: function(e, ui){ + // if window is snapped, unsnap it and reset its position to where it was before snapping + if(options.is_resizable && window_is_snapped){ + window_is_snapped = false; + $(el_window).css({ + 'width': width_before_snap, + 'height': height_before_snap + 'px', + }); + + // if at any point the window's width is "too small", hide the sidebar + if($(el_window).width() < window_width_threshold_for_sidebar){ + if(width_before_snap >= window_width_threshold_for_sidebar && !sidebar_hidden){ + $(el_window_sidebar).hide(); + } + sidebar_hidden = true; + } + // if at any point the window's width is "big enough", show the sidebar + else if($(el_window).width() >= window_width_threshold_for_sidebar){ + if(sidebar_hidden){ + $(el_window_sidebar).show(); + } + sidebar_hidden = false; + } + } + + $(el_window).addClass('window-dragging'); + + // since jquery draggable sets the z-index automatically we need this to + // bring windows to the front when they are clicked. + last_window_zindex = parseInt($(el_window).css('z-index')); + + //transform causes draggable to start inaccurately + $(el_window).css('transform', 'none'); + }, + drag: function ( e, ui ) { + $(el_window_app_iframe).css('pointer-events', 'none'); + $('.window').css('pointer-events', 'none'); + // jqueryui changes the z-index automatically, if the stay_on_top flag is set + // make sure window stays on top + $(`.window[data-stay_on_top="true"]`).css('z-index', 999999999) + + if($(el_window).attr('data-is_maximized') === '1'){ + $(el_window).attr('data-is_maximized', '0'); + // maximize icon + $(el_window_head_scale_btn).find('img').attr('src', window.icons['scale.svg']); + } + // -------------------------------------------------------- + // Snap to screen edges + // -------------------------------------------------------- + if(options.is_resizable){ + clearTimeout(snap_trigger_timeout); + // if window is not snapped, check if it should be snapped + snap_trigger_timeout = setTimeout(function(){ + // if cursor is not in a snap zone, don't snap + if(!current_active_snap_zone){ + return; + } + // if dragging has stopped by now, don't snap + if(!$(el_window).hasClass('window-dragging')){ + return; + } + + // W + if(!window_is_snapped && current_active_snap_zone === 'w'){ + window_snap_placeholder.css({ + 'display': 'block', + 'width': '50%', + 'height': desktop_height, + 'top': toolbar_height, + 'left': 0, + 'z-index': last_window_zindex - 1, + }) + } + // NW + else if(!window_is_snapped && current_active_snap_zone === 'nw'){ + window_snap_placeholder.css({ + 'display': 'block', + 'width': '50%', + 'height': desktop_height/2, + 'top': toolbar_height, + 'left': 0, + 'z-index': last_window_zindex - 1, + }) + } + // NE + else if(!window_is_snapped && current_active_snap_zone ==='ne'){ + window_snap_placeholder.css({ + 'display': 'block', + 'width': '50%', + 'height': desktop_height/2, + 'top': toolbar_height, + 'left': desktop_width/2, + 'z-index': last_window_zindex - 1, + }) + } + // E + else if(!window_is_snapped && current_active_snap_zone ==='e'){ + window_snap_placeholder.css({ + 'display': 'block', + 'width': '50%', + 'height': desktop_height, + 'top': toolbar_height, + 'left': 'initial', + 'right': 0, + 'z-index': last_window_zindex - 1, + }) + } + // N + else if(!window_is_snapped && current_active_snap_zone ==='n'){ + window_snap_placeholder.css({ + 'display': 'block', + 'width': desktop_width, + 'height': desktop_height, + 'top': toolbar_height, + 'left': 0, + 'z-index': last_window_zindex - 1, + }) + } + // SW + else if(!window_is_snapped && current_active_snap_zone ==='sw'){ + window_snap_placeholder.css({ + 'display': 'block', + 'top': toolbar_height + desktop_height/2, + 'left': 0, + 'width': '50%', + 'height': desktop_height/2, + 'z-index': last_window_zindex - 1, + }) + } + // SE + else if(!window_is_snapped && current_active_snap_zone ==='se'){ + window_snap_placeholder.css({ + 'display': 'block', + 'top': toolbar_height + desktop_height/2, + 'left': desktop_width/2, + 'width': '50%', + 'height': desktop_height/2, + 'z-index': last_window_zindex - 1, + }) + } + + // If snap placeholder is not active, append it and make it active + if(!window_is_snapped && !snap_placeholder_active){ + snap_placeholder_active = true; + $(el_body).append(window_snap_placeholder); + } + + // save window size before snap + width_before_snap = $(el_window).width(); + height_before_snap = $(el_window).height(); + }, 500); + + // if mouse is not in a snap zone, hide snap placeholder + if(snap_placeholder_active && !current_active_snap_zone){ + snap_placeholder_active = false; + window_snap_placeholder.fadeOut(80); + } + } + }, + stop: function () { + let window_will_snap = false; + $( el_window ).draggable( "option", "cursorAt", false ); + + $(el_window).removeClass('window-dragging'); + $(el_window).attr({ + 'data-orig-top': $(el_window).position().top, + 'data-orig-left': $(el_window).position().left, + }) + + $(el_window_app_iframe).css('pointer-events', 'all'); + $('.window').css('pointer-events', 'initial'); + + // jqueryui changes the z-index automatically, if the stay_on_top flag is set + // make sure window stays on top with the initial zindex though + $(`.window[data-stay_on_top="true"]`).each(function(){ + $(this).css('z-index', $(this).attr('data-initial_zindex')) + }) + + if(options.is_resizable && snap_placeholder_active && !window_is_snapped){ + window_will_snap = true; + $(window_snap_placeholder).css('padding', 0); + + setTimeout(function(){ + // snap to w + if(current_active_snap_zone === 'w'){ + $(el_window).css({ + 'top': toolbar_height, + 'left': 0, + 'width': '50%', + 'height': desktop_height, + }) + } + // snap to nw + else if(current_active_snap_zone === 'nw'){ + $(el_window).css({ + 'top': toolbar_height, + 'left': 0, + 'width': '50%', + 'height': desktop_height/2, + }) + } + // snap to ne + else if(current_active_snap_zone === 'ne'){ + $(el_window).css({ + 'top': toolbar_height, + 'left': '50%', + 'width': '50%', + 'height': desktop_height/2, + }) + } + // snap to sw + else if(current_active_snap_zone === 'sw'){ + $(el_window).css({ + 'top': toolbar_height + desktop_height/2, + 'left': 0, + 'width': '50%', + 'height': desktop_height/2, + }) + } + // snap to se + else if(current_active_snap_zone === 'se'){ + $(el_window).css({ + 'top': toolbar_height + desktop_height/2, + 'left': desktop_width/2, + 'width': '50%', + 'height': desktop_height/2, + }) + } + // snap to e + else if(current_active_snap_zone === 'e'){ + $(el_window).css({ + 'top': toolbar_height, + 'left': '50%', + 'width': '50%', + 'height': desktop_height, + }) + } + // snap to n + else if(current_active_snap_zone === 'n'){ + scale_window(el_window); + } + // snap placeholder is no longer active + snap_placeholder_active = false; + // hide snap placeholder + window_snap_placeholder.css('display', 'none'); + window_snap_placeholder.css('padding', '10px'); + // mark window as snapped + window_is_snapped = true; + + // if at any point the window's width is "too small", hide the sidebar + if($(el_window).width() < window_width_threshold_for_sidebar){ + if(width_before_snap >= window_width_threshold_for_sidebar && !sidebar_hidden){ + $(el_window_sidebar).hide(); + } + sidebar_hidden = true; + } + // if at any point the window's width is "big enough", show the sidebar + else if($(el_window).width() >= window_width_threshold_for_sidebar){ + if(sidebar_hidden){ + $(el_window_sidebar).show(); + } + sidebar_hidden = false; + } + }, 100); + } + + // if window is dropped below the taskbar, move it up + // the lst '- 30' is to account for the window head + if($(el_window).position().top > window.innerHeight - taskbar_height - 30 && !window_will_snap){ + $(el_window).animate({ + top: window.innerHeight - taskbar_height - 60, + }, 100); + } + // if window is dropped too far to the right, move it left + if($(el_window).position().left > window.innerWidth - 50 && !window_will_snap){ + $(el_window).animate({ + left: window.innerWidth - 50, + }, 100); + } + // if window is dropped too far to the left, move it right + if(($(el_window).position().left + $(el_window).width() - 150 )< 0 && !window_will_snap){ + $(el_window).animate({ + left: -1 * ($(el_window).width() - 150), + }, 100); + } + }, + handle: `.window-head-draggable` + (options.draggable_body ? `, .window-body` : ``), + stack: `.window`, + scroll: false, + containment: '.window-container', + }); + } + + // -------------------------------------------------------- + // Resizable + // -------------------------------------------------------- + if(options.is_resizable){ + if($(el_window).width() < window_width_threshold_for_sidebar){ + $(el_window_sidebar).hide(); + sidebar_hidden = true; + } + + $(el_window).resizable({ + handles: "n, ne, nw, e, s, se, sw, w", + minWidth: 200, + minHeight: 200, + start: function(){ + $(el_window_app_iframe).css('pointer-events', 'none'); + $('.window').css('pointer-events', 'none'); + }, + resize: function (e, ui) { + // if at any point the window's width is "too small", hide the sidebar + if(ui.size.width < window_width_threshold_for_sidebar){ + if(ui.originalSize.width >= window_width_threshold_for_sidebar && !sidebar_hidden){ + $(el_window_sidebar).hide(); + } + sidebar_hidden = true; + } + // if at any point the window's width is "big enough", show the sidebar + else if(ui.size.width >= window_width_threshold_for_sidebar){ + if(sidebar_hidden){ + $(el_window_sidebar).show(); + } + sidebar_hidden = false; + } + + // when resizing the top of the window, make sure the window head is not hidden behind the toolbar + if($(el_window).position().top < toolbar_height){ + var difference = toolbar_height - $(el_window).position().top; + $(el_window).css({ + 'top': toolbar_height, + 'height': ui.size.height - difference // Reduce the height by the difference + }); + // don't resize + return false; + } + }, + stop: function () { + $(el_window_app_iframe).css('pointer-events', 'all'); + $('.window').css('pointer-events', 'initial'); + $(el_window_sidebar).resizable("option", "maxWidth", el_window.getBoundingClientRect().width/2); + $(el_window).attr({ + 'data-orig-width': $(el_window).width(), + 'data-orig-height': $(el_window).height(), + }) + // maximize icon + $(el_window_head_scale_btn).find('img').attr('src', window.icons['scale.svg']); + $(el_window).attr('data-is_maximized', '0'); + }, + containment: 'parent', + }) + } + + let side = $(el_window).find('.window-sidebar') + side.resizable({ + handles: "e,w", + minWidth: 100, + maxWidth: el_window.getBoundingClientRect().width/2, + start: function(){ + $(el_window_app_iframe).css('pointer-events', 'none'); + $('.window').css('pointer-events', 'none'); + }, + stop: function () { + $(el_window_app_iframe).css('pointer-events', 'all'); + $('.window').css('pointer-events', 'initial'); + const new_width = $(el_window_sidebar).width(); + // save new width in the cloud, to user's settings + setItem({key: "window_sidebar_width", value: new_width}); + // save new width locally, to window object + window.window_sidebar_width = new_width; + } + }) + + // -------------------------------------------------------- + // Alt/Option + Shift + click on window head will open a prompt to enter iframe url + // -------------------------------------------------------- + $(el_window_head).on('click', function(e){ + if(e.altKey && e.shiftKey && el_window_app_iframe !== null){ + let url = prompt("Enter URL", options.iframe_url); + if(url){ + $(el_window_app_iframe).attr('src', url); + } + } + }) + // -------------------------------------------------------- + // Head Context Menu + // -------------------------------------------------------- + $(el_window_head).bind("contextmenu taphold", function (event) { + // dimiss taphold on regular devices + if(event.type==='taphold' && !isMobile.phone && !isMobile.tablet) + return; + + const $target = $(event.target); + + // Cases in which native ctx menu should be preserved + if(options.allow_native_ctxmenu || $target.hasClass('allow-native-ctxmenu') || $target.is('input') || $target.is('textarea')) + return true; + + // custom ctxmenu for all other elements + event.preventDefault(); + + // If window has no head, don't show ctxmenu + if(!options.has_head) + return; + + let menu_items = []; + // ------------------------------------------- + // Maximize/Minimize + // ------------------------------------------- + if(options.is_resizable){ + menu_items.push({ + html: $(el_window).attr('data-is_maximized') === '0' ? 'Maximize' : 'Restore', + onClick: function(){ + // maximize window + scale_window(el_window); + } + }); + menu_items.push({ + html: 'Minimize', + onClick: function(){ + $(el_window).hideWindow(); + } + }); + // - + menu_items.push('-') + } + // ------------------------------------------- + // Close + // ------------------------------------------- + menu_items.push({ + html: 'Close', + onClick: function(){ + $(el_window).close(); + } + }); + + UIContextMenu({ + parent_element: el_window_head, + items: menu_items, + parent_id: win_id, + }) + }) + + // -------------------------------------------------------- + // Body Context Menu + // -------------------------------------------------------- + $(el_window_body).bind("contextmenu taphold", function (event) { + // dimiss taphold on regular devices + if(event.type==='taphold' && !isMobile.phone && !isMobile.tablet) + return; + + const $target = $(event.target); + + // Cases in which native ctx menu should be preserved + if(options.allow_native_ctxmenu || $target.hasClass('allow-native-ctxmenu') || $target.is('input') || $target.is('textarea')) + return true + + // custom ctxmenu for all other elements + event.preventDefault(); + if(options.allow_context_menu && event.target === el_window_body){ + // Regular directories + if($(el_window).attr('data-path') !== trash_path){ + UIContextMenu({ + parent_element: el_window_body, + items: [ + // ------------------------------------------- + // Sort by + // ------------------------------------------- + { + html: "Sort by", + items: [ + { + html: `Name`, + icon: $(el_window).attr('data-sort_by') === 'name' ? '✓' : '', + onClick: async function(){ + sort_items(el_window_body, 'name', $(el_window).attr('data-sort_order')); + set_sort_by($(el_window).attr('data-uid'), 'name', $(el_window).attr('data-sort_order')) + } + }, + { + html: `Date modified`, + icon: $(el_window).attr('data-sort_by') === 'modified' ? '✓' : '', + onClick: async function(){ + sort_items(el_window_body, 'modified', $(el_window).attr('data-sort_order')); + set_sort_by($(el_window).attr('data-uid'), 'modified', $(el_window).attr('data-sort_order')) + } + }, + { + html: `Type`, + icon: $(el_window).attr('data-sort_by') === 'type' ? '✓' : '', + onClick: async function(){ + sort_items(el_window_body, 'type', $(el_window).attr('data-sort_order')); + set_sort_by($(el_window).attr('data-uid'), 'type', $(el_window).attr('data-sort_order')) + } + }, + { + html: `Size`, + icon: $(el_window).attr('data-sort_by') === 'size' ? '✓' : '', + onClick: async function(){ + sort_items(el_window_body, 'size', $(el_window).attr('data-sort_order')); + set_sort_by($(el_window).attr('data-uid'), 'size', $(el_window).attr('data-sort_order')) + } + }, + // ------------------------------------------- + // - + // ------------------------------------------- + '-', + { + html: `Ascending`, + icon: $(el_window).attr('data-sort_order') === 'asc' ? '✓' : '', + onClick: async function(){ + const sort_by = $(el_window).attr('data-sort_by') + sort_items(el_window_body, sort_by, 'asc'); + set_sort_by($(el_window).attr('data-uid'), sort_by, 'asc') + } + }, + { + html: `Descending`, + icon: $(el_window).attr('data-sort_order') === 'desc' ? '✓' : '', + onClick: async function(){ + const sort_by = $(el_window).attr('data-sort_by') + sort_items(el_window_body, sort_by, 'desc'); + set_sort_by($(el_window).attr('data-uid'), sort_by, 'desc') + } + }, + + ] + }, + // ------------------------------------------- + // Refresh + // ------------------------------------------- + { + html: "Refresh", + onClick: function(){ + refresh_item_container(el_window_body, options); + } + }, + // ------------------------------------------- + // - + // ------------------------------------------- + '-', + // ------------------------------------------- + // New + // ------------------------------------------- + window.new_context_menu_item($(el_window).attr('data-path'), el_window_body), + // ------------------------------------------- + // - + // ------------------------------------------- + '-', + // ------------------------------------------- + // Paste + // ------------------------------------------- + { + html: "Paste", + disabled: (clipboard.length === 0 || $(el_window).attr('data-path') === '/') ? true : false, + onClick: function(){ + if(clipboard_op === 'copy') + copy_clipboard_items($(el_window).attr('data-path'), el_window_body); + else if(clipboard_op === 'move') + move_clipboard_items(el_window_body) + } + }, + // ------------------------------------------- + // Upload Here + // ------------------------------------------- + { + html: "Upload Here", + disabled: $(el_window).attr('data-path') === '/' ? true : false, + onClick: function(){ + init_upload_using_dialog(el_window_body, $(el_window).attr('data-path') + '/'); + } + }, + // ------------------------------------------- + // Request Files + // ------------------------------------------- + // { + // html: "Request Files", + // onClick: function(){ + // UIWindowRequestFiles({dir_path: $(el_window).attr('data-path')}) + // } + // }, + // ------------------------------------------- + // - + // ------------------------------------------- + '-', + // ------------------------------------------- + // Publish As Website + // ------------------------------------------- + { + html: 'Publish As Website', + disabled: !options.is_dir, + onClick: async function () { + if (window.require_email_verification_to_publish_website) { + if (window.user.is_temp && + !await UIWindowSaveAccount({ + send_confirmation_code: true, + message: 'Please create an account to proceed.', + window_options: { + backdrop: true, + close_on_backdrop_click: false, + } + })) + return; + else if (!window.user.email_confirmed && !await UIWindowEmailConfirmationRequired()) + return; + } + UIWindowPublishWebsite($(el_window).attr('data-uid'), $(el_window).attr('data-name'), $(el_window).attr('data-path')); + } + }, + // ------------------------------------------- + // Deploy as App + // ------------------------------------------- + { + html: 'Deploy as App', + disabled: !options.is_dir, + onClick: async function () { + launch_app({ + name: 'dev-center', + file_path: $(el_window).attr('data-path'), + file_uid: $(el_window).attr('data-uid'), + params: { + source_path: $(el_window).attr('data-path'), + } + }) + + } + }, + // ------------------------------------------- + // - + // ------------------------------------------- + '-', + // ------------------------------------------- + // Properties + // ------------------------------------------- + { + html: "Properties", + onClick: function(){ + let window_height = 500; + let window_width = 450; + + let left = mouseX; + left -= 200; + left = left > (window.innerWidth - window_width)? (window.innerWidth - window_width) : left; + + let top = mouseY; + top = top > (window.innerHeight - (window_height + window.taskbar_height + window.toolbar_height))? (window.innerHeight - (window_height + window.taskbar_height + window.toolbar_height)) : top; + + + UIWindowItemProperties(options.title, options.path, options.uid, left, top, window_width, window_height); + } + }, + ] + }); + } + // Trash conext menu + else{ + UIContextMenu({ + parent_element: el_window_body, + items: [ + // ------------------------------------------- + // Empty Trash + // ------------------------------------------- + { + html: "Empty Trash", + disabled: false, + onClick: async function(){ + const alert_resp = await UIAlert({ + message: `Are you sure you want to permanently delete the items in Trash?`, + buttons:[ + { + label: 'Yes', + value: 'yes', + type: 'primary', + }, + { + label: 'No', + value: 'no', + }, + ] + }) + if(alert_resp === 'no') + return; + + // todo this has to be case-insensitive but the `i` selector doesn't work on ^= + $(`.item[data-path^="${html_encode(trash_path)}/"]`).each(function(){ + delete_item(this); + }) + // update other clients + if(window.socket){ + window.socket.emit('trash.is_empty', {is_empty: true}); + } + // use the 'empty trash' icon + $(`.item[data-path="${html_encode(trash_path)}" i], .item[data-shortcut_to_path="${html_encode(trash_path)}" i]`).find('.item-icon > img').attr('src', window.icons['trash.svg']); + } + }, + ] + }); + } + } + }); + // -------------------------------------------------------- + // Head Context Menu + // -------------------------------------------------------- + if(options.has_head){ + $(el_window_head).bind("contextmenu taphold", function (event) { + event.preventDefault(); + return false; + }) + } + + // -------------------------------------------------------- + // Droppable sidebar items + // -------------------------------------------------------- + $(el_window).find('.window-sidebar-item').each(function (index){ + // todo only continue if this item is a dir + const el_item = this; + $(el_item).dragster({ + enter: function (dragsterEvent, event) { + $(el_item).addClass('item-selected'); + }, + leave: function (dragsterEvent, event) { + $(el_item).removeClass('item-selected'); + }, + drop: function (dragsterEvent, event) { + const e = event.originalEvent; + $(el_item).removeClass('item-selected'); + // if files were dropped... + if(e.dataTransfer?.items?.length > 0){ + upload_items(e.dataTransfer.items, $(el_item).attr('data-path')) + } + + e.stopPropagation(); + e.preventDefault(); + return false; + } + }); + }) + + //set styles + $(el_window_body).css(options.body_css); + + // is fullpage? + if(options.is_fullpage){ + $(el_window).hide() + setTimeout(function(){ + enter_fullpage_mode(el_window); + $(el_window).show() + }, 5); + } + + return el_window; +} + +function delete_window_element (el_window){ + // if this is the active element, set it to null + if(active_element === el_window){ + active_element = null; + } + // remove DOM element + $(el_window).remove(); + // if no other windows open, reset window_counter + // resetting window counter is important so that next window opens at the center of the screen + if($('.window').length === 0) + window.window_counter = 0; +} + + +$(document).on('click', '.window-sidebar-item', async function(e){ + const el_window = $(this).closest('.window'); + const parent_win_id = $(el_window).attr('data-id'); + const item_path = $(this).attr('data-path'); + + // ctrl/cmd + click will open in new window + if(e.metaKey || e.ctrlKey){ + UIWindow({ + path: item_path, + title: path.basename(item_path), + icon: await item_icon({is_dir: true, path: item_path}), + // todo + // uid: $(el_item).attr('data-uid'), + is_dir: true, + // todo + // sort_by: $(el_item).attr('data-sort_by'), + app: 'explorer', + // top: options.maximized ? 0 : undefined, + // left: options.maximized ? 0 : undefined, + // height: options.maximized ? `calc(100% - ${window.taskbar_height + 1}px)` : undefined, + // width: options.maximized ? `100%` : undefined, + }); + } + // update window path only if it's a new path AND no ctrl/cmd key pressed + else if(item_path !== $(el_window).attr('data-path')){ + window_nav_history[parent_win_id] = window_nav_history[parent_win_id].slice(0, window_nav_history_current_position[parent_win_id] + 1); + window_nav_history[parent_win_id].push(item_path); + window_nav_history_current_position[parent_win_id]++; + + update_window_path(el_window, item_path); + } +}) + +$(document).on('contextmenu', '.window-sidebar', function(e){ + e.preventDefault(); + e.stopPropagation(); + return false; +}) + +$(document).on('contextmenu taphold', '.window-sidebar-item', function(event){ + // dismiss taphold on regular devices + if(event.type==='taphold' && !isMobile.phone && !isMobile.tablet) + return; + + event.preventDefault(); + event.stopPropagation(); + // todo + // $(this).addClass('window-sidebar-item-highlighted'); + const item = this; + UIContextMenu({ + parent_element: $(this), + items: [ + //-------------------------------------------------- + // Open + //-------------------------------------------------- + { + html: "Open", + onClick: function(){ + $(item).trigger('click'); + } + }, + //-------------------------------------------------- + // Open in New Window + //-------------------------------------------------- + { + html: "Open in New Window", + onClick: async function(){ + let item_path = $(item).attr('data-path'); + + UIWindow({ + path: item_path, + title: path.basename(item_path), + icon: await item_icon({is_dir: true, path: item_path}), + // todo + // uid: $(el_item).attr('data-uid'), + is_dir: true, + // todo + // sort_by: $(el_item).attr('data-sort_by'), + app: 'explorer', + // top: options.maximized ? 0 : undefined, + // left: options.maximized ? 0 : undefined, + // height: options.maximized ? `calc(100% - ${window.taskbar_height + 1}px)` : undefined, + // width: options.maximized ? `100%` : undefined, + }); + } + } + ] + }); + return false; +}) + +$(document).on('dblclick', '.window .ui-resizable-handle', function(e){ + let el_window = $(this).closest('.window'); + // bottom + if($(this).hasClass('ui-resizable-s')){ + let height = window.innerHeight - $(el_window).position().top - window.taskbar_height -1; + $(el_window).height(height); + } + + // top + else if($(this).hasClass('ui-resizable-n')){ + let height = $(el_window).height() + $(el_window).position().top - window.toolbar_height; + $(el_window).css({ + height: height, + top: window.toolbar_height, + }); + } + // right + else if($(this).hasClass('ui-resizable-e')){ + let width = window.innerWidth - $(el_window).position().left; + $(el_window).css({ + width: width, + }); + } + // left + else if($(this).hasClass('ui-resizable-w')){ + let width = $(el_window).width() + $(el_window).position().left; + $(el_window).css({ + width: width, + left: 0 + }); + } + // bottom left + else if($(this).hasClass('ui-resizable-sw')){ + let width = $(el_window).width() + $(el_window).position().left; + let height = window.innerHeight - $(el_window).position().top - window.taskbar_height -1; + $(el_window).css({ + width: width, + height: height, + left: 0 + }); + } + // bottom right + else if($(this).hasClass('ui-resizable-se')){ + let width = window.innerWidth - $(el_window).position().left; + let height = window.innerHeight - $(el_window).position().top - window.taskbar_height -1; + $(el_window).css({ + width: width, + height: height, + }); + } + // top right + else if($(this).hasClass('ui-resizable-ne')){ + let width = window.innerWidth - $(el_window).position().left; + let height = $(el_window).height() + $(el_window).position().top - window.toolbar_height; + $(el_window).css({ + width: width, + height: height, + top: window.toolbar_height, + }); + } + // top left + else if($(this).hasClass('ui-resizable-nw')){ + let width = $(el_window).width() + $(el_window).position().left; + let height = $(el_window).height() + $(el_window).position().top - window.toolbar_height; + $(el_window).css({ + width: width, + height: height, + top: window.toolbar_height, + left:0, + }); + } + +}) + +$(document).on('click', '.window-navbar-path', function(e){ + if(!$(e.target).hasClass('window-navbar-path')) + return; + + $(e.target).hide(); + $(e.target).siblings('.window-navbar-path-input').show().select(); +}) +$(document).on('blur', '.window-navbar-path-input', function(e){ + $(e.target).hide(); + $(e.target).siblings('.window-navbar-path').show().select(); +}) + +$(document).on('keyup', '.window-navbar-path-input', function(e){ + if (e.key === 'Enter' || e.keyCode === 13) { + update_window_path($(e.target).closest('.window'), $(e.target).val()); + $(e.target).hide(); + $(e.target).siblings('.window-navbar-path').show().select(); + } +}) + + +$(document).on('click', '.window-navbar-path-dirname', function(e){ + const $el_parent_window = $(this).closest('.window'); + const parent_win_id = $($el_parent_window).attr('data-id'); + + // open in new window + if(e.metaKey || e.ctrlKey){ + const dirpath = $(this).attr('data-path'); + UIWindow({ + path: dirpath, + title: dirpath === '/' ? root_dirname : path.basename(dirpath), + icon: window.icons['folder.svg'], + // uid: $(el_item).attr('data-uid'), + is_dir: true, + app: 'explorer', + }); + } + // only change dir if target is not the same as current path + else if($el_parent_window.attr('data-path') !== $(this).attr('data-path')){ + window_nav_history[parent_win_id] = window_nav_history[parent_win_id].slice(0, window_nav_history_current_position[parent_win_id]+1); + window_nav_history[parent_win_id].push($(this).attr('data-path')); + window_nav_history_current_position[parent_win_id] = window_nav_history[parent_win_id].length - 1; + update_window_path($el_parent_window, $(this).attr('data-path')); + } +}) + +$(document).on('contextmenu taphold', '.window-navbar', function(event){ + // don't disable system ctxmenu on the address bar input + if($(event.target).hasClass('window-navbar-path-input')) + return; + + // dismiss taphold on regular devices + if(event.type==='taphold' && !isMobile.phone && !isMobile.tablet) + return; + + event.preventDefault(); + event.stopPropagation(); + return false; +}) + +$(document).on('contextmenu taphold', '.window-navbar-path-dirname', function(event){ + // dismiss taphold on regular devices + if(event.type==='taphold' && !isMobile.phone && !isMobile.tablet) + return; + + event.preventDefault(); + const menu_items = []; + const el = this; + // ------------------------------------------- + // Open + // ------------------------------------------- + menu_items.push({ + html: 'Open', + onClick: ()=>{ + $(this).trigger('click'); + } + }); + // ------------------------------------------- + // Open in New Window + // (only if the item is on a window) + // ------------------------------------------- + menu_items.push({ + html: 'Open in New Window', + onClick: function(){ + UIWindow({ + path: $(el).attr('data-path'), + title: $(el).attr('data-path') === '/' ? root_dirname : path.basename($(el).attr('data-path')), + icon: window.icons['folder.svg'], + uid: $(el).attr('data-uid'), + is_dir: true, + app: 'explorer', + }); + } + }); + // ------------------------------------------- + // - + // ------------------------------------------- + menu_items.push('-'), + // ------------------------------------------- + // Paste + // ------------------------------------------- + menu_items.push({ + html: "Paste", + disabled: clipboard.length > 0 ? false : true, + onClick: function(){ + if(clipboard_op === 'copy') + copy_clipboard_items($(el).attr('data-path'), null); + else if(clipboard_op === 'move') + move_clipboard_items(null, $(el).attr('data-path')) + } + }) + + UIContextMenu({ + parent_element: $(this), + items: menu_items + }); +}) + +// if the click is on the mask, bring focus to the active child window +$(document).on('click', '.window-disable-mask', async function(e){ + e.stopPropagation(); + e.preventDefault(); + return false; +}) + +// -------------------------------------------------------- +// Navbar Dir Droppable +// -------------------------------------------------------- +window.navbar_path_droppable = (el_window)=>{ + $(el_window).find('.window-navbar-path-dirname').droppable({ + accept: '.item', + tolerance: 'pointer', + drop: function( event, ui ) { + // check if item was actually dropped on this navbar path + if($(mouseover_window).attr('data-id') !== $(el_window).attr('data-id')){ + return; + } + const items_to_move = [] + + // first item + items_to_move.push(ui.draggable); + + // all subsequent items + const cloned_items = document.getElementsByClassName('item-selected-clone'); + for(let i =0; i { + create_shortcut( + path.basename($(item_to_move).attr('data-path')), + $(item_to_move).attr('data-is_dir') === '1', + $(this).attr('data-path'), + null, + $(item_to_move).attr('data-shortcut_to') === '' ? $(item_to_move).attr('data-uid') : $(item_to_move).attr('data-shortcut_to'), + $(item_to_move).attr('data-shortcut_to_path') === '' ? $(item_to_move).attr('data-path') : $(item_to_move).attr('data-shortcut_to_path'), + ); + }); + } + // move items + else{ + move_items(items_to_move, $(this).attr('data-path')); + } + + $('.item-container').droppable('enable') + $(this).removeClass('window-navbar-path-dirname-active'); + + return false; + }, + over: function(event, ui){ + // check if item was actually hovered over this window + if($(mouseover_window).attr('data-id') !== $(el_window).attr('data-id')) + return; + + // Don't do anything if the dragged item is NOT a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + + // highlight this dirname + $(this).addClass('window-navbar-path-dirname-active'); + $('.ui-draggable-dragging').css('opacity', 0.2) + $('.item-selected-clone').css('opacity', 0.2) + + // disable all window bodies + $('.item-container').droppable( 'disable' ) + }, + out: function(event, ui){ + // Don't do anything if the dragged element is NOT a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + + // unselect directory if item is dragged out + $(this).removeClass('window-navbar-path-dirname-active'); + $('.ui-draggable-dragging').css('opacity', 'initial') + $('.item-selected-clone').css('opacity', 'initial') + + $('.item-container').droppable( 'enable' ) + } + }); +} + +/** + * Constructs a XSS-safe string that represents a navigation bar path. + * The result is a string with HTML span elements for each directory in the path, each accompanied by a separator icon. + * Each span element has a `data-path` attribute holding the encoded path to that directory, and contains the encoded directory name as text. + * The root directory name is a constant defined in globals.js, represented as 'root_dirname'. + * + * @param {string} abs_path - The absolute path to be displayed in the navigation bar. It should be a string with directories separated by slashes ('/'). + * + * @returns {string} A string of HTML spans and separators, each span representing a directory in the navigation bar. + * + */ +window.navbar_path = (abs_path)=>{ + const dirs = (abs_path === '/' ? [''] : abs_path.split('/')); + const dirpaths = (abs_path === '/' ? ['/'] : []) + const path_seperator_html = ``; + if(dirs.length > 1){ + for(let i=0; i${html_encode(window.root_dirname)}`; + for(let k=1; k${html_encode(dirs[k])}`; + } + return str; +} + +window.update_window_path = async function(el_window, target_path){ + const win_id = $(el_window).attr('data-id'); + const el_window_navbar_forward_btn = $(el_window).find('.window-navbar-btn-forward'); + const el_window_navbar_back_btn = $(el_window).find('.window-navbar-btn-back'); + const el_window_navbar_up_btn = $(el_window).find('.window-navbar-btn-up'); + const el_window_body = $(el_window).find('.window-body'); + const el_window_item_container = $(el_window).find('.item-container'); + const el_window_navbar_path_input = $(el_window).find('.window-navbar-path-input'); + const is_dir = ($(el_window).attr('data-is_dir') === '1' || $(el_window).attr('data-is_dir') === 'true'); + const old_path = $(el_window).attr('data-path'); + + // update sidebar items' active status + $(el_window).find(`.window-sidebar-item`).removeClass('window-sidebar-item-active'); + $(el_window).find(`.window-sidebar-item[data-path="${html_encode(target_path)}"]`).addClass('window-sidebar-item-active'); + + // clean + $(el_window).find('.explore-table-headers-th > .header-sort-icon').html(''); + + if(is_dir){ + // if nav history for this window is empty, disable forward btn + if(window_nav_history[win_id] && window_nav_history[win_id].length - 1 === window_nav_history_current_position[win_id]) + $(el_window_navbar_forward_btn).addClass('window-navbar-btn-disabled'); + // ... else, enable forawrd btn + else + $(el_window_navbar_forward_btn).removeClass('window-navbar-btn-disabled'); + + // disable back button if path is root + if(window_nav_history_current_position[win_id] === 0) + $(el_window_navbar_back_btn).addClass('window-navbar-btn-disabled'); + // ... enable back btn in all other cases + else + $(el_window_navbar_back_btn).removeClass('window-navbar-btn-disabled'); + + // disabled Up button if this is root + if(target_path === '/') + $(el_window_navbar_up_btn).addClass('window-navbar-btn-disabled'); + // ... enable back btn in all other cases + else + $(el_window_navbar_up_btn).removeClass('window-navbar-btn-disabled'); + + $(el_window_item_container).attr('data-path', target_path); + $(el_window).find('.window-navbar-path').html(navbar_path(target_path, window.user.username)); + + // empty body to be filled with the results of /readdir + $(el_window_body).find('.item').removeItems() + + // add the 'Detail View' table header + if($(el_window).find('.explore-table-headers').length === 0) + $(el_window_body).prepend(window.explore_table_headers()); + + // 'Detail View' table header is hidden by default + $(el_window).find('.explore-table-headers').hide(); + + // system directories with custom icons and predefined names + if(target_path === window.desktop_path){ + $(el_window).find('.window-head-icon').attr('src', window.icons['folder-desktop.svg']); + $(el_window).find('.window-head-title').text('Desktop') + }else if (target_path === window.home_path){ + $(el_window).find('.window-head-icon').attr('src', window.icons['folder-home.svg']); + $(el_window).find('.window-head-title').text('Home') + }else if (target_path === window.docs_path){ + $(el_window).find('.window-head-icon').attr('src', window.icons['folder-documents.svg']); + $(el_window).find('.window-head-title').text('Documents') + }else if (target_path === window.videos_path){ + $(el_window).find('.window-head-icon').attr('src', window.icons['folder-videos.svg']); + $(el_window).find('.window-head-title').text('Videos') + }else if (target_path === window.pictures_path){ + $(el_window).find('.window-head-icon').attr('src', window.icons['folder-pictures.svg']); + $(el_window).find('.window-head-title').text('Pictures') + }// root folder of a shared user? + else if((target_path.split('/').length - 1) === 1 && target_path !== '/'+window.user.username) + $(el_window).find('.window-head-icon').attr('src', window.icons['shared.svg']); + else + $(el_window).find('.window-head-icon').attr('src', window.icons['folder.svg']); + } + + $(el_window).attr('data-path', html_encode(target_path)); + $(el_window).attr('data-name', html_encode(path.basename(target_path))); + + // /stat + if(target_path !== '/'){ + try{ + puter.fs.stat(target_path, function(fsentry){ + $(el_window).removeClass('window-' + $(el_window).attr('data-uid')); + $(el_window).addClass('window-' + fsentry.id); + $(el_window).attr('data-uid', fsentry.id); + $(el_window).attr('data-sort_by', fsentry.sort_by ?? 'name'); + $(el_window).attr('data-sort_order', fsentry.sort_order ?? 'asc'); + $(el_window).attr('data-layout', fsentry.layout ?? 'icons'); + $(el_window_item_container).attr('data-uid', fsentry.id); + // title + if (target_path === window.home_path) + $(el_window).find('.window-head-title').text('Home') + else + $(el_window).find('.window-head-title').text(fsentry.name); + // data-name + $(el_window).attr('data-name', html_encode(fsentry.name)); + // data-path + $(el_window).attr('data-path', html_encode(target_path)); + $(el_window_navbar_path_input).val(target_path); + $(el_window_navbar_path_input).attr('data-path', target_path); + // update layout + update_window_layout(el_window, fsentry.layout); + // update explore header if in details view + if(fsentry.layout === 'details'){ + update_details_layout_sort_visuals(el_window, fsentry.sort_by, fsentry.sort_order); + } + }); + }catch(err){ + UIAlert(err.responseText) + + // todo optim: this is dumb because updating the window should only happen if this /readdir request is successful, + // in that case there is no need for using update_window_path on error!! + update_window_path(el_window, old_path); + } + } + // path is '/' (global root) + else{ + $(el_window).removeClass('window-' + $(el_window).attr('data-uid')); + $(el_window).addClass('window-null'); + $(el_window).attr('data-uid', 'null'); + $(el_window).attr('data-name', ''); + $(el_window).find('.window-head-title').text(root_dirname); + } + + if(is_dir){ + refresh_item_container(el_window_body); + navbar_path_droppable(el_window) + } + + update_explorer_footer_selected_items_count(el_window); +} + +// -------------------------------------------------------- +// Sidebar Item Droppable +// -------------------------------------------------------- +window.sidebar_item_droppable = (el_window)=>{ + $(el_window).find('.window-sidebar-item').droppable({ + accept: '.item', + tolerance: 'pointer', + drop: function( event, ui ) { + // check if item was actually dropped on this navbar path + if($(mouseover_window).attr('data-id') !== $(el_window).attr('data-id')){ + return; + } + const items_to_move = [] + + // first item + items_to_move.push(ui.draggable); + + // all subsequent items + const cloned_items = document.getElementsByClassName('item-selected-clone'); + for(let i =0; i { + create_shortcut( + path.basename($(item_to_move).attr('data-path')), + $(item_to_move).attr('data-is_dir') === '1', + $(this).attr('data-path'), + null, + $(item_to_move).attr('data-shortcut_to') === '' ? $(item_to_move).attr('data-uid') : $(item_to_move).attr('data-shortcut_to'), + $(item_to_move).attr('data-shortcut_to_path') === '' ? $(item_to_move).attr('data-path') : $(item_to_move).attr('data-shortcut_to_path'), + ); + }); + } + // move items + else{ + move_items(items_to_move, $(this).attr('data-path')); + } + + $('.item-container').droppable('enable') + $(this).removeClass('window-sidebar-item-drag-active'); + + return false; + }, + over: function(event, ui){ + // check if item was actually hovered over this window + if($(mouseover_window).attr('data-id') !== $(el_window).attr('data-id')) + return; + + // Don't do anything if the dragged item is NOT a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + + // highlight this item + $(this).addClass('window-sidebar-item-drag-active'); + $('.ui-draggable-dragging').css('opacity', 0.2) + $('.item-selected-clone').css('opacity', 0.2) + + // disable all window bodies + $('.item-container').droppable( 'disable' ) + }, + out: function(event, ui){ + // Don't do anything if the dragged element is NOT a UIItem + if(!$(ui.draggable).hasClass('item')) + return; + + // unselect item if item is dragged out + $(this).removeClass('window-sidebar-item-drag-active'); + $('.ui-draggable-dragging').css('opacity', 'initial') + $('.item-selected-clone').css('opacity', 'initial') + + $('.item-container').droppable( 'enable' ) + } + }); +} + +// closes a window +$.fn.close = async function(options) { + options = options || {}; + $(this).each(async function() { + const el_iframe = $(this).find('.window-app-iframe'); + // tell child app that this window is about to close, get its response + if(el_iframe.length > 0 && el_iframe.attr('data-appUsesSDK') === 'true'){ + if(!options.bypass_iframe_messaging){ + const resp = await sendWindowWillCloseMsg(el_iframe.get(0)); + if(!resp.msg){ + return false; + } + } + } + + // Process window close if this is a window + if($(this).hasClass('window')){ + const win_id = parseInt($(this).attr('data-id')); + let window_uuid = $(this).attr('data-element_uuid'); + // remove all instances of win_id from window_stack + _.pullAll(window_stack, [win_id]); + // taskbar update + let open_window_count = parseInt($(`.taskbar-item[data-app="${$(this).attr('data-app')}"]`).attr('data-open-windows')); + // update open window count of corresponding taskbar item + if(open_window_count > 0){ + $(`.taskbar-item[data-app="${$(this).attr('data-app')}"]`).attr('data-open-windows', open_window_count - 1); + } + // decide whether to remove taskbar item + if(open_window_count === 1){ + $(`.taskbar-item[data-app="${$(this).attr('data-app')}"] .active-taskbar-indicator`).hide(); + remove_taskbar_item($(`.taskbar-item[data-app="${$(this).attr('data-app')}"][data-keep-in-taskbar="false"]`)); + } + // if no more windows of this app are open, remove taskbar item + if(open_window_count - 1 === 0) + $(`.taskbar-item[data-app="${$(this).attr('data-app')}"] .active-taskbar-indicator`).hide(); + // if a fullpage window is closed, show desktop and taskbar + if($(this).attr('data-is_fullpage') === '1'){ + exit_fullpage_mode(); + } + + // FileDialog closed + if($(this).hasClass('window-filedialog') || $(this).attr('data-disable_parent_window') === 'true'){ + // re-enable this FileDialog's parent window + $(`.window[data-element_uuid="${$(this).attr('data-parent_uuid')}"]`).addClass('window-active'); + $(`.window[data-element_uuid="${$(this).attr('data-parent_uuid')}"]`).removeClass('window-disabled'); + $(`.window[data-element_uuid="${$(this).attr('data-parent_uuid')}"]`).find('.window-disable-mask').hide(); + // bring focus back to app iframe, if needed + $(`.window[data-element_uuid="${$(this).attr('data-parent_uuid')}"]`).focusWindow(); + } + // Other types of windows closed + else{ + // close any open FileDialogs belonging to this window + $(`.window-filedialog[data-parent_uuid="${window_uuid}"]`).close(); + // bring focus to the last window in the window-stack (only if not minimized) + if(!_.isEmpty(window_stack)){ + const $last_window_in_stack = $(`.window[data-id="${window_stack[window_stack.length - 1]}"]`); + // check if previous window is not minimized + if($last_window_in_stack !== null && $last_window_in_stack.attr('data-is_minimized') !== '1' && $last_window_in_stack.attr('data-is_minimized') !== 'true'){ + $(`.window[data-id="${window_stack[window_stack.length - 1]}"]`).focusWindow(); + } + // otherwise, change URL/Title to desktop + else{ + window.history.replaceState(null, document.title, '/'); + document.title = 'Puter'; + } + // if it's explore + if($last_window_in_stack.attr('data-app') && $last_window_in_stack.attr('data-app').toLowerCase() === 'explorer'){ + window.history.replaceState(null, document.title, '/'); + document.title = 'Puter'; + } + } + // otherwise, change URL/Title to desktop + else{ + window.history.replaceState(null, document.title, '/'); + document.title = 'Puter'; + } + } + // close child windows + $(`.window[data-parent_uuid="${window_uuid}"]`).close(); + // remove backdrop + $(this).closest('.window-backdrop').remove(); + // remove DOM element + if(options?.shrink_to_target){ + // get target location + const target_pos = $(options.shrink_to_target).position(); + const target_size = $(options.shrink_to_target).get(0).getBoundingClientRect(); + + // animate window to target location + $(this).animate({ + width: `1`, + height: `1`, + top: target_pos.top + target_size.height / 2, + left: target_pos.left + target_size.width / 2, + }, 300, () => { + // remove DOM element + delete_window_element(this); + }); + } + else if(window.animate_window_closing){ + // start shrink animation + $(this).css({ + 'transition': 'transform 400ms', + 'transform': 'scale(0)', + }); + // remove DOM element after fadeout animation + $(this).fadeOut(80, function(){ + delete_window_element(this); + }) + }else{ + delete_window_element(this); + } + } + // focus back to desktop? + if(_.isEmpty(window_stack)){ + // The following is to make sure the iphone keyboard is dismissed when the last window is closed + if(isMobile.phone || isMobile.tablet){ + document.activeElement.blur(); + $("input").blur(); + } + // focus back to desktop + $('.desktop').find('.item-blurred').removeClass('item-blurred'); + active_item_container = $('.desktop.item-container').get(0); + } + }) + + return this; +}; + +window.scale_window = (el_window)=>{ + //maximize + if ($(el_window).attr('data-is_maximized') !== '1') { + // save original size and position + let el_window_rect = el_window.getBoundingClientRect(); + $(el_window).attr({ + 'data-left-before-maxim': el_window_rect.left + 'px', + 'data-top-before-maxim': el_window_rect.top + 'px', + 'data-width-before-maxim': $(el_window).css('width'), + 'data-height-before-maxim': $(el_window).css('height'), + 'data-is_maximized': '1', + }); + + // shrink icon + $(el_window).find('.window-scale-btn>img').attr('src', window.icons['scale-down-3.svg']); + + // set new size and position + $(el_window).css({ + 'top': toolbar_height+'px', + 'left': '0', + 'width': '100%', + 'height': `calc(100% - ${window.taskbar_height + window.toolbar_height + 1}px)`, + 'transform': 'none', + }); + } + //shrink + else { + // set size and position to original before maximization + $(el_window).css({ + 'top': $(el_window).attr('data-top-before-maxim'), + 'left': $(el_window).attr('data-left-before-maxim'), + 'width': $(el_window).attr('data-width-before-maxim'), + 'height': $(el_window).attr('data-height-before-maxim'), + 'transform': 'none', + }); + + // maximize icon + $(el_window).find('.window-scale-btn>img').attr('src', window.icons['scale.svg']); + + $(el_window).attr({ + 'data-is_maximized': 0, + }); + } + + // record window size and position before scaling + $(el_window).attr({ + 'data-orig-width': $(el_window).width(), + 'data-orig-height': $(el_window).height(), + 'data-orig-top': $(el_window).position().top, + 'data-orig-left': $(el_window).position().left, + 'data-is_minimized': false, + }) +} + +window.update_explorer_footer_item_count = function(el_window){ + //update dir count in explorer footer + let item_count = $(el_window).find('.item').length; + $(el_window).find('.explorer-footer .explorer-footer-item-count').html(item_count + ' item' + (item_count == 0 || item_count > 1 ? 's' : '')); +} + +window.update_explorer_footer_selected_items_count = function(el_window){ + //update dir count in explorer footer + let item_count = $(el_window).find('.item-selected').length; + if(item_count > 0){ + $(el_window).find('.explorer-footer-seperator, .explorer-footer-selected-items-count').show(); + $(el_window).find('.explorer-footer .explorer-footer-selected-items-count').html(item_count + ' item' + (item_count == 0 || item_count > 1 ? 's' : '') + ' selected'); + }else{ + $(el_window).find('.explorer-footer-seperator, .explorer-footer-selected-items-count').hide(); + } +} + +window.set_sort_by = function(item_uid, sort_by, sort_order){ + if(sort_order !== 'asc' && sort_order !== 'desc') + sort_order = 'asc'; + + $.ajax({ + url: api_origin + "/set_sort_by", + type: 'POST', + data: JSON.stringify({ + sort_by: sort_by, + item_uid: item_uid, + sort_order: sort_order, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (){ + } + }) + // update the sort_by & sort_order attr of every matching element + $(`[data-uid="${item_uid}"]`).attr({ + 'data-sort_by': sort_by, + 'data-sort_order': sort_order, + }); +} + +window.explore_table_headers = function(){ + let h = ``; + h += `
    `; + h += `
    Name
    `; + h += `
    Modified
    `; + h += `
    Size
    `; + h += `
    Type
    `; + h += `
    `; + return h; +} + +window.update_window_layout = function(el_window, layout){ + layout = layout ?? 'icons'; + + if(layout === 'icons'){ + $(el_window).find('.explore-table-headers').hide(); + $(el_window).find('.item-container').removeClass('item-container-list'); + $(el_window).find('.item-container').removeClass('item-container-details'); + $(el_window).find('.window-navbar-layout-settings').attr('src', window.icons['layout-icons.svg']); + $(el_window).attr('data-layout', layout) + } + else if(layout === 'list'){ + $(el_window).find('.explore-table-headers').hide(); + $(el_window).find('.item-container').removeClass('item-container-details'); + $(el_window).find('.item-container').addClass('item-container-list'); + $(el_window).find('.window-navbar-layout-settings').attr('src', window.icons['layout-list.svg']) + $(el_window).attr('data-layout', layout) + } + else if(layout === 'details'){ + $(el_window).find('.explore-table-headers').show(); + $(el_window).find('.item-container').removeClass('item-container-list'); + $(el_window).find('.item-container').addClass('item-container-details'); + $(el_window).find('.window-navbar-layout-settings').attr('src', window.icons['layout-details.svg']) + $(el_window).attr('data-layout', layout) + } +} + +$.fn.showWindow = async function(options) { + $(this).each(async function() { + if($(this).hasClass('window')){ + // show window + const el_window = this; + $(el_window).css({ + 'transition': `top 0.2s, left 0.2s, bottom 0.2s, right 0.2s, width 0.2s, height 0.2s`, + top: $(el_window).attr('data-orig-top') + 'px', + left: $(el_window).attr('data-orig-left') + 'px', + width: $(el_window).attr('data-orig-width') + 'px', + height: $(el_window).attr('data-orig-height') + 'px', + }); + $(el_window).css('z-index', ++last_window_zindex); + + setTimeout(() => { + $(this).focusWindow(); + }, 80); + + // remove `transitions` a good while after setting css to make sure + // it doesn't interfere with an ongoing animation + setTimeout(() => { + $(el_window).css('transition', 'none'); + }, 250); + } + }) + return this; +}; + +window.show_or_hide_empty_folder_message = function(el_item_container){ + // if the item container is the desktop, don't show/hide the empty message + if($(el_item_container).hasClass('desktop')) + return; + + // if the item container is empty, show the empty message + if($(el_item_container).has('.item').length === 0){ + $(el_item_container).find('.explorer-empty-message').show(); + } + // if the item container is not empty, hide the empty message + else{ + $(el_item_container).find('.explorer-empty-message').hide(); + } +} + +$.fn.focusWindow = function(event) { + if(this.hasClass('window')){ + const $app_iframe = $(this).find('.window-app-iframe'); + $('.window').not(this).removeClass('window-active'); + $(this).addClass('window-active'); + // disable pointer events on all other windows' iframes, except for this window's iframe + $('.window-app-iframe').not($app_iframe).css('pointer-events', 'none'); + // bring this window to front, only if it's not stay_on_top + if($(this).attr('data-stay_on_top') !== 'true'){ + $(this).css('z-index', ++last_window_zindex); + } + // if this window has a parent, bring them to the front too + if($(this).attr('data-parent_uuid') !== 'null'){ + $(`.window[data-element_uuid="${$(this).attr('data-parent_uuid')}"]`).css('z-index', last_window_zindex); + } + // if this window has child windows, bring them to the front too + if($(this).attr('data-element_uuid') !== 'null'){ + $(`.window[data-parent_uuid="${$(this).attr('data-element_uuid')}"]`).css('z-index', ++last_window_zindex); + } + // + // if this has an iframe, focus on it + if(!$(this).hasClass('window-disabled') && $app_iframe.length > 0){ + $($app_iframe).css('pointer-events', 'all'); + $app_iframe.get(0)?.focus({preventScroll:true}); + $app_iframe.get(0)?.contentWindow?.focus({preventScroll:true}); + // todo check if iframe is using SDK before sending messages + $app_iframe.get(0).contentWindow.postMessage({msg: "focus"}, '*'); + var rect = $app_iframe.get(0).getBoundingClientRect(); + // send click event to iframe, if this focus event was triggered by a click or similar mouse event + if( + event !== undefined && + (event.type === 'click' || event.type === 'dblclick' || event.type === 'contextmenu' || event.type === 'mousedown' || event.type === 'mouseup' || event.type === 'mousemove') + ){ + $app_iframe.get(0).contentWindow.postMessage({msg: "click", x: (mouseX - rect.left), y: (mouseY - rect.top)}, '*'); + } + } + // set active_item_container + active_item_container = $(this).find('.item-container').get(0); + // grey out all selected items on other windows/desktop + $('.item-container').not(active_item_container).find('.item-selected').addClass('item-blurred'); + // update window-stack + window_stack.push(parseInt($(this).attr('data-id'))); + // remove blurred class from items on this window + $(active_item_container).find('.item-blurred').removeClass('item-blurred'); + //change window URL + const update_window_url = $(this).attr('data-update_window_url'); + if(update_window_url === 'true' || update_window_url === null){ + window.history.replaceState({window_id: $(this).attr('data-id')}, '', '/app/'+$(this).attr('data-app')); + document.title = $(this).attr('data-name'); + } + $(`.taskbar .taskbar-item[data-app="${$(this).attr('data-app')}"]`).addClass('taskbar-item-active'); + }else{ + $('.window').find('.item-selected').addClass('item-blurred'); + $('.desktop').find('.item-blurred').removeClass('item-blurred'); + } + + return this; +} + +// hides a window +$.fn.hideWindow = async function(options) { + $(this).each(async function() { + if($(this).hasClass('window')){ + // get taskbar item location + const taskbar_item_pos = $(`.taskbar .taskbar-item[data-app="${$(this).attr('data-app')}"]`).position(); + + $(this).attr({ + 'data-orig-width': $(this).width(), + 'data-orig-height': $(this).height(), + 'data-orig-top': $(this).position().top, + 'data-orig-left': $(this).position().left, + 'data-is_minimized': true, + }) + + $(this).css({ + 'transition': `top 0.2s, left 0.2s, bottom 0.2s, right 0.2s, width 0.2s, height 0.2s`, + width: `0`, + height: `0`, + top: 'calc(100% - 60px)', + left: taskbar_item_pos.left + 29, + }); + + // remove transitions a good while after setting css to make sure + // it doesn't interfere with an ongoing animation + setTimeout(() => { + $(this).css({ + 'transition': 'none', + 'transform': 'none' + }); + }, 250); + + // update title and window URL + window.history.replaceState(null, document.title, '/'); + document.title = 'Puter'; + } + }) + return this; +}; + +$(document).on('click', '.explore-table-headers-th', function(e){ + let sort_by = 'name'; + let sort_icon = ``; + + // current sort order + let sort_order = $(e.target).closest('.window').attr('data-sort_order') ?? 'asc'; + + // flip sort order + if(sort_order === 'asc'){ + sort_order = 'desc'; + sort_icon = ``; + }else if(sort_order === 'desc'){ + sort_icon = ``; + sort_order = 'asc'; + } + + // remove active class from all headers + $(e.target).closest('.window').find('.explore-table-headers-th').removeClass('explore-table-headers-th-active'); + // remove icons from all headers + $(e.target).closest('.window').find('.header-sort-icon').html(''); + + // add active class to this header + $(e.target).addClass('explore-table-headers-th-active'); + + // set sort icon + $(e.target).closest('.window').find('.explore-table-headers-th-active > .header-sort-icon').html(sort_icon); + + // set sort_by + if($(e.target).hasClass('explore-table-headers-th--name')){ + sort_by = 'name'; + }else if($(e.target).hasClass('explore-table-headers-th--modified')){ + sort_by = 'modified'; + }else if($(e.target).hasClass('explore-table-headers-th--size')){ + sort_by = 'size'; + }else if($(e.target).hasClass('explore-table-headers-th--type')){ + sort_by = 'type'; + } + + // sort + sort_items($(e.target).closest('.window-body'), sort_by, sort_order); + set_sort_by($(e.target).closest('.window').attr('data-uid'), sort_by, sort_order) +}) + +window.set_layout = function(item_uid, layout){ + $.ajax({ + url: api_origin + "/set_layout", + type: 'POST', + data: JSON.stringify({ + item_uid: item_uid, + layout: layout, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (){ + if(layout === 'details'){ + let el_window = $(`.window[data-uid="${item_uid}"]`); + if(el_window.length > 0){ + let sort_by = el_window.attr('data-sort_by'); + let sort_order = el_window.attr('data-sort_order'); + update_details_layout_sort_visuals(el_window, sort_by, sort_order); + } + } + } + }) +} + +window.update_details_layout_sort_visuals = function(el_window, sort_by, sort_order){ + let sort_icon = ''; + $(el_window).find('.explore-table-headers-th > .header-sort-icon').html(''); + + if(!sort_order || sort_order === 'asc') + sort_icon = ``; + else if(sort_order === 'desc') + sort_icon = ``; + + if(!sort_by || sort_by === 'name'){ + $(el_window).find('.explore-table-headers-th').removeClass('explore-table-headers-th-active'); + $(el_window).find('.explore-table-headers-th--name').addClass('explore-table-headers-th-active'); + $(el_window).find('.explore-table-headers-th--name > .header-sort-icon').html(sort_icon); + }else if(sort_by === 'size'){ + $(el_window).find('.explore-table-headers-th').removeClass('explore-table-headers-th-active'); + $(el_window).find('.explore-table-headers-th--size').addClass('explore-table-headers-th-active'); + $(el_window).find('.explore-table-headers-th--size > .header-sort-icon').html(sort_icon); + }else if(sort_by === 'modified'){ + $(el_window).find('.explore-table-headers-th').removeClass('explore-table-headers-th-active'); + $(el_window).find('.explore-table-headers-th--modified').addClass('explore-table-headers-th-active'); + $(el_window).find('.explore-table-headers-th--modified > .header-sort-icon').html(sort_icon); + }else if(sort_by === 'type'){ + $(el_window).find('.explore-table-headers-th').removeClass('explore-table-headers-th-active'); + $(el_window).find('.explore-table-headers-th--type').addClass('explore-table-headers-th-active'); + $(el_window).find('.explore-table-headers-th--type > .header-sort-icon').html(sort_icon); + } +} + +// This is a hack to fix the issue where the window scrolls to the bottom when an app scrolls. +// this is due to an issue with iframes being able to hijack the scroll event for the parent object. +// w3c is working on a fix for this, but it's not ready yet. +// more info here: https://github.com/w3c/webappsec-permissions-policy/issues/171 +document.addEventListener('scroll', function (event) { + if($(event.target).hasClass('window-app') || $(event.target).hasClass('window-app-iframe') || $(event.target?.activeElement).hasClass('window-app-iframe')){ + setTimeout(function(){ + // scroll window back to top + $('.window-app').scrollTop(0); + // some times it's document that scrolls, so we need to check that too + $(document).scrollTop(0); + }, 1); + } +}, true); + +export default UIWindow; \ No newline at end of file diff --git a/src/UI/UIWindowChangePassword.js b/src/UI/UIWindowChangePassword.js new file mode 100644 index 00000000..5cee42e6 --- /dev/null +++ b/src/UI/UIWindowChangePassword.js @@ -0,0 +1,110 @@ +import UIWindow from './UIWindow.js' + +async function UIWindowChangePassword(){ + const internal_id = window.uuidv4(); + let h = ''; + h += `
    `; + // error msg + h += `
    `; + // success msg + h += `
    `; + // current password + h += `
    `; + h += ``; + h += ``; + h += `
    `; + // new password + h += `
    `; + h += ``; + h += ``; + h += `
    `; + // confirm new password + h += `
    `; + h += ``; + h += ``; + h += `
    `; + + // Change Password + h += ``; + h += `
    `; + + const el_window = await UIWindow({ + title: 'Change Password', + app: 'change-passowrd', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + width: 350, + height: 'auto', + dominant: true, + show_in_taskbar: false, + onAppend: function(this_window){ + $(this_window).find(`.current-password`).get(0).focus({preventScroll:true}); + }, + window_class: 'window-publishWebsite', + body_css: { + width: 'initial', + height: '100%', + 'background-color': 'rgb(245 247 249)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.change-password-btn').on('click', function(e){ + const current_password = $(el_window).find('.current-password').val(); + const new_password = $(el_window).find('.new-password').val(); + const confirm_new_password = $(el_window).find('.confirm-new-password').val(); + + let data; + + if(current_password === '' || new_password === '' || confirm_new_password === ''){ + $(el_window).find('.form-error-msg').html('All fields are required.'); + $(el_window).find('.form-error-msg').fadeIn(); + return; + } + else if(new_password !== confirm_new_password){ + $(el_window).find('.form-error-msg').html('`New Password` and `Confirm New Password` do not match.'); + $(el_window).find('.form-error-msg').fadeIn(); + return; + } + + $(el_window).find('.form-error-msg').hide(); + + $.ajax({ + url: api_origin + "/passwd", + type: 'POST', + async: true, + headers: { + "Authorization": "Bearer "+auth_token + }, + contentType: "application/json", + data: JSON.stringify({ + old_pass: current_password, + new_pass: new_password, + }), + success: function (data){ + $(el_window).find('.form-success-msg').html('Password changed successfully.'); + $(el_window).find('.form-success-msg').fadeIn(); + $(el_window).find('input').val(''); + }, + error: function (err){ + $(el_window).find('.form-error-msg').html(err.responseText); + $(el_window).find('.form-error-msg').fadeIn(); + } + }); + }) +} + +export default UIWindowChangePassword \ No newline at end of file diff --git a/src/UI/UIWindowChangeUsername.js b/src/UI/UIWindowChangeUsername.js new file mode 100644 index 00000000..76178ac0 --- /dev/null +++ b/src/UI/UIWindowChangeUsername.js @@ -0,0 +1,111 @@ +import UIWindow from './UIWindow.js' +import update_username_in_gui from '../helpers/update_username_in_gui.js' + +async function UIWindowChangeUsername(){ + const internal_id = window.uuidv4(); + let h = ''; + h += `
    `; + // error msg + h += `
    `; + // success msg + h += `
    `; + // new username + h += `
    `; + h += ``; + h += ``; + h += `
    `; + + // Change Username + h += ``; + h += `
    `; + + const el_window = await UIWindow({ + title: 'Change Username', + app: 'change-username', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + width: 350, + height: 'auto', + dominant: true, + show_in_taskbar: false, + onAppend: function(this_window){ + $(this_window).find(`.new-username`).get(0)?.focus({preventScroll:true}); + }, + window_class: 'window-publishWebsite', + body_css: { + width: 'initial', + height: '100%', + 'background-color': 'rgb(245 247 249)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.change-username-btn').on('click', function(e){ + // hide previous error/success msg + $(el_window).find('.form-success-msg, .form-success-msg').hide(); + + const new_username = $(el_window).find('.new-username').val(); + + if(!new_username){ + $(el_window).find('.form-error-msg').html('All fields are required.'); + $(el_window).find('.form-error-msg').fadeIn(); + return; + } + + $(el_window).find('.form-error-msg').hide(); + + // disable button + $(el_window).find('.change-username-btn').addClass('disabled'); + // disable input + $(el_window).find('.new-username').attr('disabled', true); + + $.ajax({ + url: api_origin + "/change_username", + type: 'POST', + async: true, + headers: { + "Authorization": "Bearer "+auth_token + }, + contentType: "application/json", + data: JSON.stringify({ + new_username: new_username, + }), + success: function (data){ + $(el_window).find('.form-success-msg').html('Username updated successfully.'); + $(el_window).find('.form-success-msg').fadeIn(); + $(el_window).find('input').val(''); + // update auth data + update_username_in_gui(new_username); + // update username + window.user.username = new_username; + // enable button + $(el_window).find('.change-username-btn').removeClass('disabled'); + // enable input + $(el_window).find('.new-username').attr('disabled', false); + }, + error: function (err){ + $(el_window).find('.form-error-msg').html(html_encode(err.responseJSON?.message)); + $(el_window).find('.form-error-msg').fadeIn(); + // enable button + $(el_window).find('.change-username-btn').removeClass('disabled'); + // enable input + $(el_window).find('.new-username').attr('disabled', false); + } + }); + }) +} + +export default UIWindowChangeUsername \ No newline at end of file diff --git a/src/UI/UIWindowClaimReferral.js b/src/UI/UIWindowClaimReferral.js new file mode 100644 index 00000000..31890910 --- /dev/null +++ b/src/UI/UIWindowClaimReferral.js @@ -0,0 +1,55 @@ +import UIWindow from './UIWindow.js' +import UIWindowSaveAccount from './UIWindowSaveAccount.js'; + +async function UIWindowClaimReferral(options){ + let h = ''; + + h += `
    `; + h += `
    ×
    `; + h += ``; + h += `

    You have been referred to Puter by a friend!

    `; + h += `

    Create an account and confirm your email address to receive 1 GB of free storage. Your friend will get 1 GB of free storage too.

    `; + h += ``; + h += `
    `; + + const el_window = await UIWindow({ + title: `Refer a friend!`, + icon: null, + uid: null, + is_dir: false, + body_content: h, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_draggable: true, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: true, + allow_user_select: true, + onAppend: function(el_window){ + }, + width: 400, + dominant: true, + window_css: { + height: 'initial', + }, + body_css: { + padding: '10px', + width: 'initial', + 'max-height': 'calc(100vh - 200px)', + 'background-color': 'rgb(241 246 251)', + 'backdrop-filter': 'blur(3px)', + 'padding': '10px 20px 20px 20px', + 'height': 'initial', + } + }); + + $(el_window).find('.create-account-ref-btn').on('click', function(e){ + UIWindowSaveAccount(); + $(el_window).close(); + }) +} + +export default UIWindowClaimReferral \ No newline at end of file diff --git a/src/UI/UIWindowColorPicker.js b/src/UI/UIWindowColorPicker.js new file mode 100644 index 00000000..291b4ff1 --- /dev/null +++ b/src/UI/UIWindowColorPicker.js @@ -0,0 +1,110 @@ +import UIWindow from './UIWindow.js' + +async function UIWindowColorPicker(options){ + // set sensible defaults + if(arguments.length > 0){ + // if first argument is a string, then assume it is the default color + if(isString(arguments[0])){ + options = {}; + options.default = arguments[0]; + } + } + options = options ?? {}; + + return new Promise(async (resolve) => { + let colorPicker; + + let h = ``; + h += `
    `; + h += `
    `; + // picker + h += `
    `; + h += `
    `; + h += `
    `; + + // Select button + h += `` + h += ``; + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: 'Select color…', + app: 'color-picker', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_draggable: true, + is_droppable: false, + is_resizable: false, + stay_on_top: false, + allow_native_ctxmenu: true, + allow_user_select: true, + ...options.window_options, + width: 350, + dominant: true, + on_close: async ()=>{ + resolve(false) + }, + onAppend: function(window){ + colorPicker = new iro.ColorPicker($(window).find('.picker').get(0), { + layout: [ + { + component: iro.ui.Box, + options: { + layoutDirection: 'horizontal', + width: 265, + height: 265, + } + }, + { + component: iro.ui.Slider, + options: { + sliderType: 'alpha', + layoutDirection: 'horizontal', + height: 265, + width:265, + } + }, + { + component: iro.ui.Slider, + options: { + sliderType: 'hue', + } + }, + ], + // Set the initial color to pure red + color: options.default ?? "#f00", + }); + }, + window_class: 'window-login', + window_css:{ + height: 'initial', + }, + body_css: { + width: 'initial', + padding: '0', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.select-btn').on('click', function(e){ + resolve({color: colorPicker.color.hex8String}); + $(el_window).close(); + }) + $(el_window).find('.font-selector').on('click', function(e){ + $(el_window).find('.font-selector').removeClass('font-selector-active'); + $(this).addClass('font-selector-active'); + }) + }) +} + +export default UIWindowColorPicker \ No newline at end of file diff --git a/src/UI/UIWindowConfirmDownload.js b/src/UI/UIWindowConfirmDownload.js new file mode 100644 index 00000000..eab63325 --- /dev/null +++ b/src/UI/UIWindowConfirmDownload.js @@ -0,0 +1,73 @@ +import UIWindow from './UIWindow.js' + +// todo do this using uid rather than item_path, since item_path is way mroe expensive on the DB +async function UIWindowConfirmDownload(options){ + return new Promise(async (resolve) => { + let h = ''; + h += `
    `; + // Confirm download + h +=`
    `; + // Message + h += `

    Do you want to download this file?

    `; + h += `
    `; + h += ``; + h += `
    `; + // Item information + h += `
    `; + // Name + h += `

    Name: ${options.name ?? options.url}

    `; + // Type + h += `

    Type: ${options.is_dir === '1' || options.is_dir === 'true' ? 'Folder' : options.type ?? 'Unknown File Type'}

    `; + // Source + h += `

    From: ${options.source}

    `; + h += `
    `; + h += `
    `; + // Download + h += ``; + // Cancel + h += ``; + h +=`
    `; + + const el_window = await UIWindow({ + title: `Upload`, + icon: window.icons[`app-icon-uploader.svg`], + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + window_class: 'window-upload-progress', + width: 450, + dominant: true, + window_css:{ + height: 'initial', + }, + body_css: { + padding: '22px', + width: 'initial', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }); + + $(el_window).find('.btn-download-confirm').on('click submit', function(e){ + $(el_window).close(); + resolve(true); + }) + + $(el_window).find('.btn-download-cancel').on('click submit', function(e){ + $(el_window).close(); + resolve(false); + }) + }) +} + +export default UIWindowConfirmDownload \ No newline at end of file diff --git a/src/UI/UIWindowCopyProgress.js b/src/UI/UIWindowCopyProgress.js new file mode 100644 index 00000000..47e38939 --- /dev/null +++ b/src/UI/UIWindowCopyProgress.js @@ -0,0 +1,63 @@ +import UIWindow from './UIWindow.js' + +// todo do this using uid rather than item_path, since item_path is way mroe expensive on the DB +async function UIWindowCopyProgress(options){ + let h = ''; + h += `
    `; + h += `
    `; + // spinner + h +=`circle anim`; + // Progress report + h +=`
    `; + // msg + h += `Copying `; + h += ``; + h += `
    `; + // progress + h += `
    `; + h += `
    `; + h += `
    `; + // cancel + // h += ``; + h +=`
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: `Copying`, + icon: window.icons[`app-icon-copying.svg`], + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + window_class: 'window-copy-progress', + width: 450, + dominant: true, + window_css:{ + height: 'initial', + }, + body_css: { + padding: '22px', + width: 'initial', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }); + + $(el_window).find('.copy-cancel-btn').on('click', function(e){ + operation_cancelled[options.operation_id] = true; + $(el_window).close(); + }) + + return el_window; +} + +export default UIWindowCopyProgress \ No newline at end of file diff --git a/src/UI/UIWindowDesktopBGSettings.js b/src/UI/UIWindowDesktopBGSettings.js new file mode 100644 index 00000000..69a9dab6 --- /dev/null +++ b/src/UI/UIWindowDesktopBGSettings.js @@ -0,0 +1,189 @@ +import UIWindow from './UIWindow.js' + +async function UIWindowDesktopBGSettings(){ + return new Promise(async (resolve) => { + let h = ''; + const original_background_css = $('body').attr('style'); + let bg_url = window.desktop_bg_url, + bg_color = window.desktop_bg_color, + bg_fit = window.desktop_bg_fit; + + h += `
    `; + + // type + h += ``; + h += ``; + + // Picture + h += `
    `; + h += ``; + h += ``; + h += ``; + h += ``; + h += `
    ` + + // Color + h += `
    `; + h += ``; + h += `
    `; + h += `
    `; + h += `
    `; + h += `
    `; + h += `
    `; + h += `
    `; + h += `
    `; + h += `
    `; + h += `
    `; + h += `
    `; + h += `
    `; + h += `
    `; + + h += `
    ` + h += ``; + h += ``; + h += `
    `; + + h += `
    `; + + const el_window = await UIWindow({ + title: 'Change Desktop Background…', + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: true, + allow_user_select: true, + onAppend: function(this_window){ + $(this_window).find(`.access-recipient`).focus(); + }, + window_class: 'window-give-access', + width: 350, + window_css: { + height: 'initial', + }, + body_css: { + width: 'initial', + height: '100%', + 'background-color': 'rgb(245 247 249)', + 'backdrop-filter': 'blur(3px)', + } + }) + + if(window.desktop_bg_url !== undefined && window.desktop_bg_url !== null){ + $(el_window).find('.desktop-bg-settings-wrapper').hide(); + $(el_window).find('.desktop-bg-settings-picture').show(); + $(el_window).find('.desktop-bg-type').val('picture'); + }else if(window.desktop_bg_color !== undefined && window.desktop_bg_color !== null){ + $(el_window).find('.desktop-bg-settings-wrapper').hide(); + $(el_window).find('.desktop-bg-settings-color').show(); + $(el_window).find('.desktop-bg-type').val('color'); + }else{ + $(el_window).find('.desktop-bg-settings-wrapper').hide(); + $(el_window).find('.desktop-bg-settings-picture').show(); + $(el_window).find('.desktop-bg-type').val('picture'); + } + + $(el_window).find('.desktop-bg-color-block:not(.desktop-bg-color-block-palette').on('click', async function(e){ + window.set_desktop_background({color: $(this).attr('data-color')}) + }) + $(el_window).find('.desktop-bg-color-block-palette input').on('change', async function(e){ + window.set_desktop_background({color: $(this).val()}) + }) + $(el_window).on('file_opened', function(e){ + let selected_file = Array.isArray(e.detail) ? e.detail[0] : e.detail; + const fit = $(el_window).find('.desktop-bg-fit').val(); + bg_url = selected_file.read_url; + bg_fit = fit; + bg_color = undefined; + window.set_desktop_background({url: bg_url, fit: bg_fit}) + }) + + $(el_window).find('.desktop-bg-fit').on('change', function(e){ + const fit = $(this).val(); + bg_fit = fit; + window.set_desktop_background({fit: fit}) + }) + + $(el_window).find('.desktop-bg-type').on('change', function(e){ + const type = $(this).val(); + if(type === 'picture'){ + $(el_window).find('.desktop-bg-settings-wrapper').hide(); + $(el_window).find('.desktop-bg-settings-picture').show(); + }else if(type==='color'){ + $(el_window).find('.desktop-bg-settings-wrapper').hide(); + $(el_window).find('.desktop-bg-settings-color').show(); + } + }) + + $(el_window).find('.apply').on('click', async function(e){ + // /set-desktop-bg + try{ + $.ajax({ + url: api_origin + "/set-desktop-bg", + type: 'POST', + data: JSON.stringify({ + url: window.desktop_bg_url, + color: window.desktop_bg_color, + fit: window.desktop_bg_fit, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + }) + $(el_window).close(); + resolve(true); + }catch(err){ + } + }) + + $(el_window).find('.browse').on('click', function(){ + // open dialog + UIWindow({ + path: '/' + window.user.username + '/Desktop', + // this is the uuid of the window to which this dialog will return + parent_uuid: $(el_window).attr('data-element_uuid'), + allowed_file_types: ['image/*'], + show_maximize_button: false, + show_minimize_button: false, + title: 'Open', + is_dir: true, + is_openFileDialog: true, + selectable_body: false, + }); + }) + + $(el_window).find('.cancel').on('click', function(){ + $('body').attr('style', original_background_css); + $(el_window).close(); + resolve(true); + }) + }) +} + +export default UIWindowDesktopBGSettings \ No newline at end of file diff --git a/src/UI/UIWindowDownloadDirProg.js b/src/UI/UIWindowDownloadDirProg.js new file mode 100644 index 00000000..57719890 --- /dev/null +++ b/src/UI/UIWindowDownloadDirProg.js @@ -0,0 +1,53 @@ +import UIWindow from './UIWindow.js' + +async function UIWindowDownloadDirProg(options){ + options = options ?? {}; + + let h = ''; + // Loading spinner + h +=`circle anim`; + h += `

    ${options.defaultText ?? 'Preparing...'}

    `; + + const el_window = await UIWindow({ + title: 'Instant Login!', + app: 'instant-login', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + backdrop: false, + width: 460, + height: 'auto', + dominant: true, + show_in_taskbar: false, + draggable_body: true, + onAppend: function(this_window){ + }, + window_class: 'window-qr', + body_css: { + width: 'initial', + height: '100px', + 'background-color': 'rgb(245 247 249)', + 'backdrop-filter': 'blur(3px)', + 'display': 'flex', + "flex-direction": 'row', + 'justify-content': 'center', + 'align-items': 'center', + } + }) + + return el_window; +} + +export default UIWindowDownloadDirProg \ No newline at end of file diff --git a/src/UI/UIWindowDownloadProgress.js b/src/UI/UIWindowDownloadProgress.js new file mode 100644 index 00000000..685d35af --- /dev/null +++ b/src/UI/UIWindowDownloadProgress.js @@ -0,0 +1,63 @@ +import UIWindow from './UIWindow.js' + +// todo do this using uid rather than item_path, since item_path is way mroe expensive on the DB +async function UIWindowDownloadProgress(options){ + let h = ''; + h += `
    `; + h += `
    `; + // Spinner + h +=`circle anim`; + // Progress report + h +=`
    `; + // msg + h += `Downloading ${options.item_name ?? ''}`; + h += `
    `; + // Progress + h += `
    `; + h += `
    `; + h += `
    `; + // Cancel + h += ``; + h +=`
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: `Upload`, + icon: window.icons[`app-icon-uploader.svg`], + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + window_class: 'window-upload-progress', + width: 450, + dominant: true, + window_css:{ + height: 'initial', + }, + body_css: { + padding: '22px', + width: 'initial', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }); + + // cancel download button clicked + $(el_window).find('.download-cancel-btn').on('click', function(){ + operation_cancelled[options.operation_id] = true; + $(el_window).close(); + }) + + return el_window; +} + +export default UIWindowDownloadProgress \ No newline at end of file diff --git a/src/UI/UIWindowEmailConfirmationRequired.js b/src/UI/UIWindowEmailConfirmationRequired.js new file mode 100644 index 00000000..b2c687aa --- /dev/null +++ b/src/UI/UIWindowEmailConfirmationRequired.js @@ -0,0 +1,258 @@ +import UIWindow from './UIWindow.js' +import UIAlert from './UIAlert.js' + +function UIWindowEmailConfirmationRequired(options){ + return new Promise(async (resolve) => { + options = options ?? {}; + let final_code = ''; + let is_checking_code = false; + + const submit_btn_txt = 'Confirm Email' + let h = ''; + h += `
    ×
    `; + h += `
    `; + h += ``; + h += `

    Confirm Your Email Address

    `; + h += `
    `; + h += `

    To continue, please enter the 6-digit confirmation code sent to ${window.user.email}

    `; + h += `
    `; + h += `
    + + + + + + + +
    `; + h += ``; + h += `
    `; + h += `
    `; + h += `Re-send Confirmation Code`; + if(options.logout_in_footer){ + h += ` • `; + h += `Log Out`; + } + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: null, + backdrop: options.backdrop ?? false, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_draggable: options.is_draggable ?? true, + is_droppable: false, + is_resizable: false, + stay_on_top: options.stay_on_top ?? false, + allow_native_ctxmenu: true, + allow_user_select: true, + backdrop: true, + width: 390, + dominant: true, + onAppend: function(el_window){ + $(el_window).find('.digit-input').first().focus(); + }, + window_class: 'window-item-properties', + window_css:{ + height: 'initial', + }, + body_css: { + padding: '30px', + width: 'initial', + height: 'initial', + 'background-color': 'rgb(247 251 255)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.digit-input').first().focus(); + + $(el_window).find('.email-confirm-btn').on('click submit', function(e){ + e.preventDefault(); + e.stopPropagation(); + + $(el_window).find('.email-confirm-btn').prop('disabled', true); + $(el_window).find('.error').hide(); + + // Check if already checking code to prevent multiple requests + if(is_checking_code) + return; + // Confirm button + is_checking_code = true; + + // set animation + $(el_window).find('.email-confirm-btn').html(`circle anim`); + + setTimeout(() => { + $.ajax({ + url: api_origin + "/confirm-email", + type: 'POST', + data: JSON.stringify({ + code: final_code, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (res){ + if(res.email_confirmed){ + $(el_window).close(); + refresh_user_data(window.auth_token) + resolve(true); + }else{ + $(el_window).find('.error').html('Invalid confirmation code.'); + $(el_window).find('.error').fadeIn(); + $(el_window).find('.digit-input').val(''); + $(el_window).find('.digit-input').first().focus(); + $(el_window).find('.email-confirm-btn').prop('disabled', false); + $(el_window).find('.email-confirm-btn').html(submit_btn_txt); + } + }, + error: function(res){ + $(el_window).find('.error').html(res.responseJSON.error); + $(el_window).find('.error').fadeIn(); + $(el_window).find('.digit-input').val(''); + $(el_window).find('.digit-input').first().focus(); + $(el_window).find('.email-confirm-btn').prop('disabled', false); + $(el_window).find('.email-confirm-btn').html(submit_btn_txt); + }, + complete: function(){ + is_checking_code = false; + } + }) + }, 1000); + }) + + // send email confirmation + $(el_window).find('.send-conf-email').on('click', function(e){ + $.ajax({ + url: api_origin + "/send-confirm-email", + type: 'POST', + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: async function (res){ + await UIAlert({ + message: `A new confirmation code has been sent to ${window.user.email}.`, + body_icon: window.icons['c-check.svg'], + stay_on_top: true, + backdrop: true, + }) + $(el_window).find('.digit-input').first().focus(); + }, + complete: function(){ + } + }) + }) + + // logout + $(el_window).find('.conf-email-log-out').on('click', function(e){ + logout(); + $(el_window).close(); + }) + + // Elements + const numberCodeForm = document.querySelector('[data-number-code-form]'); + const numberCodeInputs = [...numberCodeForm.querySelectorAll('[data-number-code-input]')]; + + // Event listeners + numberCodeForm.addEventListener('input', ({ target }) => { + if(!target.value.length) { return target.value = null; } + const inputLength = target.value.length; + let currentIndex = Number(target.dataset.numberCodeInput); + if(inputLength === 2){ + const inputValues = target.value.split(''); + target.value = inputValues[0]; + } + else if (inputLength > 1) { + const inputValues = target.value.split(''); + + inputValues.forEach((value, valueIndex) => { + const nextValueIndex = currentIndex + valueIndex; + + if (nextValueIndex >= numberCodeInputs.length) { return; } + + numberCodeInputs[nextValueIndex].value = value; + }); + currentIndex += inputValues.length - 2; + } + + const nextIndex = currentIndex + 1; + + if (nextIndex < numberCodeInputs.length) { + numberCodeInputs[nextIndex].focus(); + } + + // Concatenate all inputs into one string to create the final code + final_code = ''; + for(let i=0; i< numberCodeInputs.length; i++){ + final_code += numberCodeInputs[i].value; + } + // Automatically submit if 6 digits entered + if(final_code.length === 6){ + $(el_window).find('.email-confirm-btn').prop('disabled', false); + $(el_window).find('.email-confirm-btn').trigger('click'); + } + }); + + numberCodeForm.addEventListener('keydown', (e) => { + const { code, target } = e; + + const currentIndex = Number(target.dataset.numberCodeInput); + const previousIndex = currentIndex - 1; + const nextIndex = currentIndex + 1; + + const hasPreviousIndex = previousIndex >= 0; + const hasNextIndex = nextIndex <= numberCodeInputs.length - 1 + + switch (code) { + case 'ArrowLeft': + case 'ArrowUp': + if (hasPreviousIndex) { + numberCodeInputs[previousIndex].focus(); + } + e.preventDefault(); + break; + + case 'ArrowRight': + case 'ArrowDown': + if (hasNextIndex) { + numberCodeInputs[nextIndex].focus(); + } + e.preventDefault(); + break; + case 'Backspace': + if (!e.target.value.length && hasPreviousIndex) { + numberCodeInputs[previousIndex].value = null; + numberCodeInputs[previousIndex].focus(); + } + break; + default: + break; + } + }); + }) +} + +export default UIWindowEmailConfirmationRequired \ No newline at end of file diff --git a/src/UI/UIWindowFeedback.js b/src/UI/UIWindowFeedback.js new file mode 100644 index 00000000..e92ef318 --- /dev/null +++ b/src/UI/UIWindowFeedback.js @@ -0,0 +1,80 @@ +import UIWindow from './UIWindow.js' + +async function UIWindowQR(options){ + return new Promise(async (resolve) => { + options = options ?? {}; + + let h = ''; + h += `
    `; + // success + h += ``; + // form + h += ``; + h += `
    `; + + const el_window = await UIWindow({ + title: 'Contact Us', + app: 'feedback', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + width: 350, + height: 'auto', + dominant: true, + show_in_taskbar: false, + onAppend: function(this_window){ + $(this_window).find('.feedback-message').get(0).focus({preventScroll:true}); + }, + window_class: 'window-feedback', + body_css: { + width: 'initial', + height: '100%', + 'background-color': 'rgb(245 247 249)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.send-feedback-btn').on('click', function(e){ + const message = $(el_window).find('.feedback-message').val(); + if(message) + $(this).prop('disabled', true); + $.ajax({ + url: api_origin + "/contactUs", + type: 'POST', + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + data: JSON.stringify({ + message: message, + }), + success: async function (data){ + $(el_window).find('.feedback-form').hide(); + $(el_window).find('.feedback-sent-success').show(100); + } + }) + }) + }) +} + +export default UIWindowQR \ No newline at end of file diff --git a/src/UI/UIWindowFontPicker.js b/src/UI/UIWindowFontPicker.js new file mode 100644 index 00000000..24432e91 --- /dev/null +++ b/src/UI/UIWindowFontPicker.js @@ -0,0 +1,103 @@ +import UIWindow from './UIWindow.js' + +let fontAvailable = new Set(); +const font_list = new Set([ + // Windows 10 + 'Arial', 'Arial Black', 'Bahnschrift', 'Calibri', 'Cambria', 'Cambria Math', 'Candara', 'Comic Sans MS', 'Consolas', 'Constantia', 'Corbel', 'Courier New', 'Ebrima', 'Franklin Gothic Medium', 'Gabriola', 'Gadugi', 'Georgia', 'HoloLens MDL2 Assets', 'Impact', 'Ink Free', 'Javanese Text', 'Leelawadee UI', 'Lucida Console', 'Lucida Sans Unicode', 'Malgun Gothic', 'Marlett', 'Microsoft Himalaya', 'Microsoft JhengHei', 'Microsoft New Tai Lue', 'Microsoft PhagsPa', 'Microsoft Sans Serif', 'Microsoft Tai Le', 'Microsoft YaHei', 'Microsoft Yi Baiti', 'MingLiU-ExtB', 'Mongolian Baiti', 'MS Gothic', 'MV Boli', 'Myanmar Text', 'Nirmala UI', 'Palatino Linotype', 'Segoe MDL2 Assets', 'Segoe Print', 'Segoe Script', 'Segoe UI', 'Segoe UI Historic', 'Segoe UI Emoji', 'Segoe UI Symbol', 'SimSun', 'Sitka', 'Sylfaen', 'Symbol', 'Tahoma', 'Times New Roman', 'Trebuchet MS', 'Verdana', 'Webdings', 'Wingdings', 'Yu Gothic', + // macOS + 'American Typewriter', 'Andale Mono', 'Arial', 'Arial Black', 'Arial Narrow', 'Arial Rounded MT Bold', 'Arial Unicode MS', 'Avenir', 'Avenir Next', 'Avenir Next Condensed', 'Baskerville', 'Big Caslon', 'Bodoni 72', 'Bodoni 72 Oldstyle', 'Bodoni 72 Smallcaps', 'Bradley Hand', 'Brush Script MT', 'Chalkboard', 'Chalkboard SE', 'Chalkduster', 'Charter', 'Cochin', 'Comic Sans MS', 'Copperplate', 'Courier', 'Courier New', 'Didot', 'DIN Alternate', 'DIN Condensed', 'Futura', 'Geneva', 'Georgia', 'Gill Sans', 'Helvetica', 'Helvetica Neue', 'Herculanum', 'Hoefler Text', 'Impact', 'Lucida Grande', 'Luminari', 'Marker Felt', 'Menlo', 'Microsoft Sans Serif', 'Monaco', 'Noteworthy', 'Optima', 'Palatino', 'Papyrus', 'Phosphate', 'Rockwell', 'Savoye LET', 'SignPainter', 'Skia', 'Snell Roundhand', 'Tahoma', 'Times', 'Times New Roman', 'Trattatello', 'Trebuchet MS', 'Verdana', 'Zapfino', +].sort()); + +// filter through available system fonts +(async () => { + await document.fonts.ready; + + for (const font of font_list.values()) { + if (document.fonts.check(`12px "${font}"`)) { + fontAvailable.add(font); + } + } +})(); + +async function UIWindowFontPicker(options){ + // set sensible defaults + if(arguments.length > 0){ + // if first argument is a string, then assume it is the default color + if(isString(arguments[0])){ + options = {}; + options.default = arguments[0]; + } + } + options = options || {}; + + return new Promise(async (resolve) => { + let h = ``; + h += `
    `; + h += `
    `; + h += `
    `; + fontAvailable.forEach(element => { + h += `

    ${element}

    `; // 👉️ one, two, three, four + }); + h += `
    `; + + // Select + h += `` + h += ``; + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: 'Select font…', + app: 'font-picker', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_draggable: true, + is_droppable: false, + is_resizable: false, + stay_on_top: false, + allow_native_ctxmenu: true, + allow_user_select: true, + ...options.window_options, + width: 350, + dominant: true, + on_close: ()=>{ + resolve(false) + }, + onAppend: function(window){ + let active_font = $(window).find('.font-selector-active'); + if(active_font.length > 0){ + scrollParentToChild($(window).find('.font-list').get(0), active_font.get(0)); + } + }, + window_class: 'window-login', + window_css:{ + height: 'initial', + }, + body_css: { + width: 'initial', + padding: '0', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.select-btn').on('click', function(e){ + resolve({fontFamily: $(el_window).find('.font-selector-active').attr('data-font-family')}); + $(el_window).close(); + }) + $(el_window).find('.font-selector').on('click', function(e){ + $(el_window).find('.font-selector').removeClass('font-selector-active'); + $(this).addClass('font-selector-active'); + }) + }) +} + +export default UIWindowFontPicker \ No newline at end of file diff --git a/src/UI/UIWindowGetCopyLink.js b/src/UI/UIWindowGetCopyLink.js new file mode 100644 index 00000000..022f9dae --- /dev/null +++ b/src/UI/UIWindowGetCopyLink.js @@ -0,0 +1,100 @@ +import UIWindow from './UIWindow.js' +import UIPopover from './UIPopover.js' + +async function UIWindowGetCopyLink(options){ + let h = ''; + let copy_btn_text = 'Copy Link'; + let copied_btn_text = 'Copied!'; + const signature = await puter.fs.sign(null, {uid: options.uid, action: 'read'}) + const url = `${gui_origin}/?name=${encodeURIComponent(options.name)}&is_dir=${encodeURIComponent(options.is_dir)}&download=${encodeURIComponent(signature.items.read_url)}`; + + h += `
    `; + h += `

    Share the following link with anyone and they will be able to receive a copy of ${html_encode(options.name)}

    `; + h += ``; + h += `` + h += ``; + h += `
    `; + + const el_window = await UIWindow({ + title: `Get Copy Link`, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: true, + allow_user_select: true, + onAppend: function(el_window){ + }, + width: 500, + dominant: true, + window_css: { + height: 'initial', + }, + body_css: { + padding: '10px', + width: 'initial', + 'max-height': 'calc(100vh - 200px)', + 'background-color': 'rgb(241 246 251)', + 'backdrop-filter': 'blur(3px)', + 'padding': '10px 20px 20px 20px', + 'height': 'initial', + } + }); + + $(el_window).find('.window-body .downloadable-link').val(url); + + $(el_window).find('.window-body .share-copy-link-on-social').on('click', function(e){ + const social_links = socialLink({url: url, title: `Get a copy of '${options.name}' on Puter.com!`, description: `Get a copy of '${options.name}' on Puter.com!`}); + + let social_links_html = ``; + social_links_html += `
    `; + social_links_html += `

    Share to

    ` + social_links_html += `` + social_links_html += `` + social_links_html += `` + social_links_html += `` + social_links_html += `` + social_links_html += `` + social_links_html += '
    '; + + UIPopover({ + content: social_links_html, + snapToElement: this, + parent_element: this, + // width: 300, + height: 100, + position: 'bottom', + }); + }) + + $(el_window).find('.window-body .copy-downloadable-link').on('click', async function(e){ + var copy_btn = this; + if (navigator.clipboard) { + // Get link text + const selected_text = $(el_window).find('.window-body .downloadable-link').val(); + // copy selected text to clipboard + await navigator.clipboard.writeText(selected_text); + } + else{ + // Get the text field + $(el_window).find('.window-body .downloadable-link').select(); + // Copy the text inside the text field + document.execCommand('copy'); + } + + $(this).html(copied_btn_text); + setTimeout(function(){ + $(copy_btn).html(copy_btn_text); + }, 1000); + }); +} + +export default UIWindowGetCopyLink \ No newline at end of file diff --git a/src/UI/UIWindowItemProperties.js b/src/UI/UIWindowItemProperties.js new file mode 100644 index 00000000..8603586e --- /dev/null +++ b/src/UI/UIWindowItemProperties.js @@ -0,0 +1,226 @@ +import UIWindow from './UIWindow.js' + +// todo do this using uid rather than item_path, since item_path is way mroe expensive on the DB +async function UIWindowItemProperties(item_name, item_path, item_uid, left, top, width, height){ + let h = ''; + h += `
    `; + // tabs + h += `
    `; + h += `
    General
    `; + h += `
    Versions
    `; + h += `
    `; + + h+= `
    `; + h += ``; + h += ``; + h += ``; + h += ``; + h += ``; + h += ``; + h += ``; + h += ``; + h += ``; + h += ``; + h += ``; + h += ``; + h += ``; + h += ``; + h += `
    Name
    Path
    Original Name
    Original Path
    Shortcut to
    UID
    Type
    Size
    Modified
    Created
    Versions
    Associated Websites`; + h += `
    Access Granted To
    `; + h += `
    `; + + h += `
    ` + h += `
    `; + h += `
    `; + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: `${item_name} properties`, + app: item_uid+'-account', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: true, + allow_user_select: true, + left: left, + top: top, + width: width, + height: height, + onAppend: function(el_window){ + }, + width: 450, + window_class: 'window-item-properties', + window_css:{ + // height: 'initial', + }, + body_css: { + padding: '10px', + width: 'initial', + height: 'calc(100% - 50px)', + 'background-color': 'rgb(241 242 246)', + 'backdrop-filter': 'blur(3px)', + 'content-box': 'content-box', + } + }) + + // item props tab click handler + $(el_window).find('.item-props-tab-btn').click(function(e){ + // unselect all tabs + $(el_window).find('.item-props-tab-btn').removeClass('item-props-tab-selected'); + // select this tab + $(this).addClass('item-props-tab-selected'); + // unselect all tab contents + $(el_window).find('.item-props-tab-content').removeClass('item-props-tab-content-selected'); + // select this tab content + $(el_window).find(`.item-props-tab-content[data-tab="${$(this).attr('data-tab')}"]`).addClass('item-props-tab-content-selected'); + }) + + + // /stat + puter.fs.stat({ + uid: item_uid, + returnSubdomains: true, + returnPermissions: true, + returnVersions: true, + returnSize: true, + success: function (fsentry){ + // hide versions tab if item is a directory + if(fsentry.is_dir){ + $(el_window).find('[data-tab="versions"]').hide(); + } + // name + $(el_window).find('.item-prop-val-name').html(fsentry.name); + // path + $(el_window).find('.item-prop-val-path').html(item_path); + // original name & path + if(fsentry.metadata){ + try{ + let metadata = JSON.parse(fsentry.metadata); + if(metadata.original_name){ + $(el_window).find('.item-prop-val-original-name').html(metadata.original_name); + $(el_window).find('.item-prop-original-name').show(); + } + if(metadata.original_path){ + $(el_window).find('.item-prop-val-original-path').html(metadata.original_path); + $(el_window).find('.item-prop-original-path').show(); + } + }catch(e){} + } + + // shortcut to + if(fsentry.shortcut_to && fsentry.shortcut_to_path){ + $(el_window).find('.item-prop-val-shortcut-to').html(fsentry.shortcut_to_path); + } + // uid + $(el_window).find('.item-prop-val-uid').html(fsentry.id); + // type + $(el_window).find('.item-prop-val-type').html(fsentry.is_dir ? 'Directory' : (fsentry.type === null ? '-' : fsentry.type)); + // size + $(el_window).find('.item-prop-val-size').html(fsentry.size === null || fsentry.size === undefined ? '-' : byte_format(fsentry.size)); + // modified + $(el_window).find('.item-prop-val-modified').html(fsentry.modified === 0 ? '-' : timeago.format(fsentry.modified*1000)); + // created + $(el_window).find('.item-prop-val-created').html(fsentry.created === 0 ? '-' : timeago.format(fsentry.created*1000)); + // subdomains + if(fsentry.subdomains && fsentry.subdomains.length > 0 ){ + fsentry.subdomains.forEach(subdomain => { + $(el_window).find('.item-prop-val-websites').append(`

    ${subdomain.address} (disassociate)

    `); + }); + } + else{ + $(el_window).find('.item-prop-val-websites').append('-'); + } + // versions + if(fsentry.versions && fsentry.versions.length > 0 ){ + fsentry.versions.reverse().forEach(version => { + $(el_window).find('.item-props-version-list') + .append(`
    ${version.user? version.user.username : ''} • ${timeago.format(version.timestamp*1000)}

    ${version.id}

    `); + }); + } + else{ + $(el_window).find('.item-props-version-list').append('-'); + } + + // owner + $(el_window).find('.item-prop-val-permissions').append(`

    ${(fsentry.owner.email === undefined || fsentry.owner.email === null) ? fsentry.owner.username : fsentry.owner.email} (owner)

    `); + + // other users with access + if(fsentry.permissions && fsentry.permissions.length > 0 ){ + fsentry.permissions.forEach(perm => { + let h = ``; + // username/email + h += `

    ${perm.email ?? perm.username} `; + // remove + h += `(remove)`; + $(el_window).find('.item-prop-val-permissions').append(h); + }); + } + else{ + $(el_window).find('.item-prop-val-permissions').append('-'); + } + + $(el_window).find(`.disassociate-website-link`).on('click', function(e){ + puter.hosting.update( + $(e.target).attr('data-subdomain'), + null).then(()=>{ + $(el_window).find(`.item-prop-website-entry[data-uuid="${$(e.target).attr('data-uuid')}"]`).remove(); + if($(el_window).find(`.item-prop-website-entry`).length === 0){ + $(el_window).find(`.item-prop-val-websites`).html('-'); + // remove the website badge from all instances of the dir + $(`.item[data-uid="${item_uid}"]`).find('.item-has-website-badge').fadeOut(200); + } + } + ) + }) + + $(el_window).find('.remove-permission-link').on('click', function(e){ + const el_remove_perm_link= this; + const perm_uid = $(el_remove_perm_link).attr('data-perm-uid'); + $.ajax({ + url: api_origin + "/remove-perm", + type: 'POST', + async: true, + contentType: "application/json", + data: JSON.stringify({ + uid: perm_uid, + }), + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: async function (res){ + $(el_window).find(`.item-prop-perm-entry[data-perm-uid="${perm_uid}"]`).remove(); + + if($(el_window).find(`.item-prop-perm-entry`).length === 0){ + $(el_window).find(`.item-prop-val-permissions`).html('-'); + // todo is it better to combine the following two queriesinto one css selector? + $(`.item[data-uid="${item_uid}"]`).find(`.item-is-shared`).fadeOut(200); + // todo optim do this only if item is a directory + // todo this has to be case-insensitive but the `i` selector doesn't work on ^= + $(`.item[data-path^="${item_path}/"]`).find(`.item-is-shared`).fadeOut(200); + } + }, + complete: function(){ + } + }) + }) + } + }) +} + +export default UIWindowItemProperties \ No newline at end of file diff --git a/src/UI/UIWindowLogin.js b/src/UI/UIWindowLogin.js new file mode 100644 index 00000000..5ecbd747 --- /dev/null +++ b/src/UI/UIWindowLogin.js @@ -0,0 +1,171 @@ +import UIWindow from './UIWindow.js' +import UIWindowSignup from './UIWindowSignup.js' +import UIWindowRecoverPassword from './UIWindowRecoverPassword.js' + +async function UIWindowLogin(options){ + options = options ?? {}; + options.reload_on_success = options.reload_on_success ?? false; + options.has_head = options.has_head ?? true; + options.send_confirmation_code = options.send_confirmation_code ?? false; + + return new Promise(async (resolve) => { + const internal_id = window.uuidv4(); + let h = ``; + h += `

    `; + if(!options.has_head && options.show_close_button !== false) + h += `
    ×
    `; + h += `
    `; + // title + h += `

    Log In

    `; + // login form + h += ``; + h += `
    `; + // create account link + if(options.show_signup_button === undefined || options.show_signup_button){ + h += `
    `; + h += ``; + h += `
    `; + } + h += `
    `; + + const el_window = await UIWindow({ + title: null, + app: 'login', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_draggable: options.is_draggable ?? true, + is_droppable: false, + is_resizable: false, + stay_on_top: false, + allow_native_ctxmenu: true, + allow_user_select: true, + ...options.window_options, + width: 350, + dominant: true, + on_close: ()=>{ + resolve(false) + }, + onAppend: function(this_window){ + $(this_window).find(`.email_or_username`).get(0).focus({preventScroll:true}); + }, + window_class: 'window-login', + window_css:{ + height: 'initial', + }, + body_css: { + width: 'initial', + padding: '0', + 'background-color': 'rgb(255 255 255)', + 'backdrop-filter': 'blur(3px)', + 'display': 'flex', + 'flex-direction': 'column', + 'justify-content': 'center', + 'align-items': 'center', + } + }) + + $(el_window).find('.forgot-password-link').on('click', function(e){ + UIWindowRecoverPassword({ + window_options: { + backdrop: true, + close_on_backdrop_click: false, + } + }); + }) + + $(el_window).find('.login-btn').on('click', function(e){ + const email_username = $(el_window).find('.email_or_username').val(); + const password = $(el_window).find('.password').val(); + let data; + + if(is_email(email_username)){ + data = JSON.stringify({ + email: email_username, + password: password + }) + }else{ + data = JSON.stringify({ + username: email_username, + password: password + }) + } + + $(el_window).find('.login-error-msg').hide(); + + let headers = {}; + if(window.custom_headers) + headers = window.custom_headers; + + $.ajax({ + url: gui_origin + "/login", + type: 'POST', + async: false, + headers: headers, + contentType: "application/json", + data: data, + success: function (data){ + update_auth_data(data.token, data.user); + + if(options.reload_on_success){ + window.onbeforeunload = null; + window.location.replace('/'); + }else + resolve(true); + $(el_window).close(); + }, + error: function (err){ + $(el_window).find('.login-error-msg').html(err.responseText); + $(el_window).find('.login-error-msg').fadeIn(); + } + }); + }) + + $(el_window).find('.login-form').on('submit', function(e){ + e.preventDefault(); + e.stopPropagation(); + return false; + }) + + $(el_window).find('.signup-c2a-clickable').on('click', async function(e){ + //destroy this window + $(el_window).close(); + // create Signup window + const signup = await UIWindowSignup({ + referrer: options.referrer, + show_close_button: options.show_close_button, + reload_on_success: options.reload_on_success, + window_options: options.window_options, + send_confirmation_code: options.send_confirmation_code, + }); + if(signup) + resolve(true); + }) + }) +} + +export default UIWindowLogin \ No newline at end of file diff --git a/src/UI/UIWindowLoginInProgress.js b/src/UI/UIWindowLoginInProgress.js new file mode 100644 index 00000000..02690b8a --- /dev/null +++ b/src/UI/UIWindowLoginInProgress.js @@ -0,0 +1,59 @@ +import UIWindow from './UIWindow.js' + +async function UIWindowLoginInProgress(options){ + return new Promise(async (resolve) => { + options = options ?? {}; + + let h = ''; + h += ``; + + const el_window = await UIWindow({ + title: 'Instant Login!', + app: 'change-passowrd', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + width: 350, + height: 'auto', + dominant: true, + show_in_taskbar: false, + backdrop: true, + stay_on_top: true, + onAppend: function(this_window){ + }, + window_class: 'window-login-progress', + body_css: { + width: 'initial', + height: '100%', + 'background-color': 'rgb(245 247 249)', + 'backdrop-filter': 'blur(3px)', + } + }) + + setTimeout(() => { + $(el_window).close(); + }, 3000); + }) +} + +export default UIWindowLoginInProgress \ No newline at end of file diff --git a/src/UI/UIWindowMoveProgress.js b/src/UI/UIWindowMoveProgress.js new file mode 100644 index 00000000..cade5a59 --- /dev/null +++ b/src/UI/UIWindowMoveProgress.js @@ -0,0 +1,63 @@ +import UIWindow from './UIWindow.js' + +// todo do this using uid rather than item_path, since item_path is way mroe expensive on the DB +async function UIWindowMoveProgress(options){ + let h = ''; + h += `
    `; + h += `
    `; + // spinner + h +=`circle anim`; + // Progress report + h +=`
    `; + // msg + h += `Moving `; + h += ``; + h += `
    `; + // progress + h += `
    `; + h += `
    `; + h += `
    `; + // cancel + // h += ``; + h +=`
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: `moveing`, + icon: window.icons[`app-icon-moveing.svg`], + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + window_class: 'window-move-progress', + width: 450, + dominant: true, + window_css:{ + height: 'initial', + }, + body_css: { + padding: '22px', + width: 'initial', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }); + + $(el_window).find('.move-cancel-btn').on('click', function(e){ + operation_cancelled[options.operation_id] = true; + $(el_window).close(); + }) + + return el_window; +} + +export default UIWindowMoveProgress \ No newline at end of file diff --git a/src/UI/UIWindowMyWebsites.js b/src/UI/UIWindowMyWebsites.js new file mode 100644 index 00000000..ebc5986c --- /dev/null +++ b/src/UI/UIWindowMyWebsites.js @@ -0,0 +1,178 @@ +import UIWindow from './UIWindow.js' +import UIContextMenu from './UIContextMenu.js' +import UIAlert from './UIAlert.js' + +async function UIWindowMyWebsites(options){ + let h = ''; + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: `My Websites`, + app: 'my-websites', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: true, + allow_user_select: true, + width: 400, + dominant: true, + onAppend: function(el_window){ + }, + window_css:{ + }, + body_css: { + padding: '10px', + width: 'initial', + 'background-color': 'rgba(231, 238, 245)', + 'backdrop-filter': 'blur(3px)', + 'padding-bottom': 0, + 'height': '351px', + 'box-sizing': 'border-box', + } + }); + + // /sites + let init_ts = Date.now(); + let loading = setTimeout(function(){ + $(el_window).find('.window-body').html(`

    Loading...

    `); + }, 1000); + + puter.hosting.list().then(function (sites){ + setTimeout(function(){ + // clear loading + clearTimeout(loading); + // user has sites + if(sites.length > 0){ + let h =''; + for(let i=0; i< sites.length; i++){ + h += `
    `; + h += `${sites[i].subdomain}.puter.site`; + h += ``; + // there is a directory associated with this site + if(sites[i].root_dir){ + h += `

    `; + h+= ``; + h+= `${sites[i].root_dir.path}`; + h += `

    `; + h += `

    `; + h += ``; + h += `Disassociate Folder`; + h += `

    `; + } + h += `

    No directory associated with this address.

    `; + h += `
    `; + } + $(el_window).find('.window-body').html(h); + } + // has no sites + else{ + $(el_window).find('.window-body').html(`

    You haven't published any websites!

    `); + } + }, Date.now() - init_ts < 1000 ? 0 : 2000); + }) +} + +$(document).on('click', '.mywebsites-dir-path', function(e){ + e = e.target; + UIWindow({ + path: $(e).attr('data-path'), + title: $(e).attr('data-name'), + icon: window.icons['folder.svg'], + uid: $(e).attr('data-uuid'), + is_dir: true, + app: 'explorer', + }); +}) + +$(document).on('click', '.mywebsites-site-setting', function(e){ + const pos = e.target.getBoundingClientRect(); + UIContextMenu({ + parent_element: e.target, + position: {top: pos.top+25, left: pos.left-193}, + items: [ + //-------------------------------------------------- + // Release Address + //-------------------------------------------------- + { + html: `Release Address`, + onClick: async function(){ + const alert_resp = await UIAlert({ + message: `Are you sure you want to release this address?`, + buttons:[ + { + label: 'Yes, Release It', + type: 'primary', + }, + { + label: 'Cancel' + }, + ] + }) + if(alert_resp !== 'Yes, Release It'){ + return; + } + + $.ajax({ + url: api_origin + "/delete-site", + type: 'POST', + data: JSON.stringify({ + site_uuid: $(e.target).attr('data-site-uuid'), + }), + async: false, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (){ + $(`.mywebsites-card[data-uuid="${$(e.target).attr('data-site-uuid')}"]`).fadeOut(); + } + }) + } + } + ] + }); +}) + +$(document).on('click', '.mywebsites-dis-dir', function(e){ + puter.hosting.delete( + // dir + $(e.target).attr('data-dir-uuid'), + // hostname + $(e.target).attr('data-site-uuid'), + // success + function (){ + $(`.mywebsites-no-dir-notice[data-site-uuid="${$(e.target).attr('data-site-uuid')}"]`).show(); + $(`.mywebsites-dir-path[data-uuid="${$(e.target).attr('data-dir-uuid')}"]`).remove(); + // remove the website badge from all instances of the dir + $(`.item[data-uid="${$(e.target).attr('data-dir-uuid')}"]`).find('.item-has-website-badge').fadeOut(300); + $(e.target).hide(); + } + ) +}) +export default UIWindowMyWebsites \ No newline at end of file diff --git a/src/UI/UIWindowNewFolderProgress.js b/src/UI/UIWindowNewFolderProgress.js new file mode 100644 index 00000000..653ab580 --- /dev/null +++ b/src/UI/UIWindowNewFolderProgress.js @@ -0,0 +1,56 @@ +import UIWindow from './UIWindow.js' + +// todo do this using uid rather than item_path, since item_path is way mroe expensive on the DB +async function UIWindowNewFolderProgress(options){ + let h = ''; + h += `
    `; + h += `
    `; + // spinner + h +=`circle anim`; + // message + h +=`
    `; + // text + h += `Taking a little longer than usual. Please wait...`; + h += `
    `; + h +=`
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: `Creating New Folder`, + icon: window.icons[`app-icon-newfolder.svg`], + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + window_class: 'window-newfolder-progress', + width: 450, + dominant: true, + window_css:{ + height: 'initial', + }, + body_css: { + padding: '22px', + width: 'initial', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }); + + $(el_window).find('.newfolder-cancel-btn').on('click', function(e){ + operation_cancelled[options.operation_id] = true; + $(el_window).close(); + }) + + return el_window; +} + +export default UIWindowNewFolderProgress \ No newline at end of file diff --git a/src/UI/UIWindowNewPassword.js b/src/UI/UIWindowNewPassword.js new file mode 100644 index 00000000..f647d8a3 --- /dev/null +++ b/src/UI/UIWindowNewPassword.js @@ -0,0 +1,126 @@ +import UIWindow from './UIWindow.js' +import UIAlert from './UIAlert.js' +import UIWindowLogin from './UIWindowLogin.js' + +async function UIWindowNewPassword(options){ + return new Promise(async (resolve) => { + options = options ?? {}; + + const internal_id = window.uuidv4(); + let h = ''; + h += `
    `; + // error msg + h += `
    `; + // success msg + h += `
    `; + // new password + h += `
    `; + h += ``; + h += ``; + h += `
    `; + // confirm new password + h += `
    `; + h += ``; + h += ``; + h += `
    `; + + // Change Password + h += ``; + h += `
    `; + + const el_window = await UIWindow({ + title: 'Set New Password', + app: 'change-passowrd', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + width: 350, + height: 'auto', + dominant: true, + show_in_taskbar: false, + onAppend: function(this_window){ + $(this_window).find(`.new-password`).get(0)?.focus({preventScroll:true}); + }, + window_class: 'window-publishWebsite', + body_css: { + width: 'initial', + height: '100%', + 'background-color': 'rgb(245 247 249)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.change-password-btn').on('click', function(e){ + const new_password = $(el_window).find('.new-password').val(); + const confirm_new_password = $(el_window).find('.confirm-new-password').val(); + + if(new_password === '' || confirm_new_password === ''){ + $(el_window).find('.form-error-msg').html('All fields are required.'); + $(el_window).find('.form-error-msg').fadeIn(); + return; + } + else if(new_password !== confirm_new_password){ + $(el_window).find('.form-error-msg').html('`New Password` and `Confirm New Password` do not match.'); + $(el_window).find('.form-error-msg').fadeIn(); + return; + } + + $(el_window).find('.form-error-msg').hide(); + + $.ajax({ + url: api_origin + "/set-pass-using-token", + type: 'POST', + async: true, + contentType: "application/json", + data: JSON.stringify({ + password: new_password, + token: options.token, + user_id: options.user, + }), + success: async function (data){ + $(el_window).close(); + await UIAlert({ + message: 'Password changed successfully.', + body_icon: window.icons['c-check.svg'], + stay_on_top: true, + backdrop: true, + buttons:[ + { + label: 'Proceed to Login', + type: 'primary', + }, + ], + window_options: { + backdrop: true, + close_on_backdrop_click: false, + } + }) + await UIWindowLogin({ + reload_on_success: true, + window_options:{ + has_head: false + } + }); + }, + error: function (err){ + $(el_window).find('.form-error-msg').html(err.responseText); + $(el_window).find('.form-error-msg').fadeIn(); + } + }); + }) + }) +} + +export default UIWindowNewPassword \ No newline at end of file diff --git a/src/UI/UIWindowProgressEmptyTrash.js b/src/UI/UIWindowProgressEmptyTrash.js new file mode 100644 index 00000000..433f7b14 --- /dev/null +++ b/src/UI/UIWindowProgressEmptyTrash.js @@ -0,0 +1,56 @@ +import UIWindow from './UIWindow.js' + +// todo do this using uid rather than item_path, since item_path is way mroe expensive on the DB +async function UIWindowProgressEmptyTrash(options){ + let h = ''; + h += `
    `; + h += `
    `; + // spinner + h +=`circle anim`; + // message + h +=`
    `; + // text + h += `Emptying the Trash...`; + h += `
    `; + h +=`
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: `Creating New Folder`, + icon: window.icons[`app-icon-newfolder.svg`], + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + window_class: 'window-newfolder-progress', + width: 450, + dominant: true, + window_css:{ + height: 'initial', + }, + body_css: { + padding: '22px', + width: 'initial', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }); + + $(el_window).find('.newfolder-cancel-btn').on('click', function(e){ + operation_cancelled[options.operation_id] = true; + $(el_window).close(); + }) + + return el_window; +} + +export default UIWindowProgressEmptyTrash \ No newline at end of file diff --git a/src/UI/UIWindowPublishWebsite.js b/src/UI/UIWindowPublishWebsite.js new file mode 100644 index 00000000..11f78d9b --- /dev/null +++ b/src/UI/UIWindowPublishWebsite.js @@ -0,0 +1,116 @@ +import UIWindow from './UIWindow.js' +import UIWindowMyWebsites from './UIWindowMyWebsites.js' + +async function UIWindowPublishWebsite(target_dir_uid, target_dir_name, target_dir_path){ + let h = ''; + h += `
    `; + // success + h += `
    `; + h += ``; + h += `

    ${target_dir_name} has been published to:

    `; + h += `

    `; + h += ``; + h+= `
    `; + // form + h += `
    `; + // error msg + h += `
    `; + // subdomain + h += `
    `; + h += ``; + h += `
    https://.${window.hosting_domain}
    `; + h += `
    `; + // uid + h += ``; + // Publish + h += `` + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: 'Publish Website', + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: true, + allow_user_select: true, + width: 450, + dominant: true, + onAppend: function(this_window){ + $(this_window).find(`.publish-website-subdomain`).val(generate_identifier()); + $(this_window).find(`.publish-website-subdomain`).get(0).focus({preventScroll:true}); + }, + window_class: 'window-publishWebsite', + window_css:{ + height: 'initial' + }, + body_css: { + width: 'initial', + height: '100%', + 'background-color': 'rgb(245 247 249)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.publish-btn').on('click', function(e){ + // todo do some basic validation client-side + + //Subdomain + let subdomain = $(el_window).find('.publish-website-subdomain').val(); + + // disable 'Publish' button + $(el_window).find('.publish-btn').prop('disabled', true); + + puter.hosting.create( + subdomain, + target_dir_path).then((res)=>{ + $(el_window).find('.window-publishWebsite-form').hide(100, function(){ + let url = 'https://' + subdomain + '.' + window.hosting_domain + '/'; + $(el_window).find('.publishWebsite-published-link').attr('href', url); + $(el_window).find('.publishWebsite-published-link').text(url); + $(el_window).find('.window-publishWebsite-success').show(100) + $(`.item[data-uid="${target_dir_uid}"] .item-has-website-badge`).show(); + }); + + // find all items whose path starts with target_dir_path + $(`.item[data-path^="${target_dir_path}"]`).each(function(){ + // show the link badge + $(this).find('.item-has-website-url-badge').show(); + // update item's website_url attribute + $(this).attr('data-website_url', url + $(this).attr('data-path').substring(target_dir_path.length)); + }) + + update_sites_cache(); + }).catch((err)=>{ + $(el_window).find('.publish-website-error-msg').html( + err.message + ( + err.code === 'subdomain_limit_reached' ? + ' Manage Your Subdomains' : '' + ) + ); + $(el_window).find('.publish-website-error-msg').fadeIn(); + // re-enable 'Publish' button + $(el_window).find('.publish-btn').prop('disabled', false); + }) + }) + + $(el_window).find('.publish-window-ok-btn').on('click', function(){ + $(el_window).close(); + }) +} + +$(document).on('click', '.manage-your-websites-link', async function(e){ + UIWindowMyWebsites(); +}) + + +export default UIWindowPublishWebsite \ No newline at end of file diff --git a/src/UI/UIWindowQR.js b/src/UI/UIWindowQR.js new file mode 100644 index 00000000..a8be4275 --- /dev/null +++ b/src/UI/UIWindowQR.js @@ -0,0 +1,61 @@ +import UIWindow from './UIWindow.js' + +async function UIWindowQR(options){ + return new Promise(async (resolve) => { + options = options ?? {}; + + let h = ''; + // close button containing the multiplication sign + h += `
    ×
    `; + h += `
    `; + h += `

    Scan the code below to log into this session from other devices

    `; + h += `
    `; + + const el_window = await UIWindow({ + title: 'Instant Login!', + app: 'instant-login', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + backdrop: true, + width: 350, + height: 'auto', + dominant: true, + show_in_taskbar: false, + draggable_body: true, + onAppend: function(this_window){ + }, + window_class: 'window-qr', + body_css: { + width: 'initial', + height: '100%', + 'background-color': 'rgb(245 247 249)', + 'backdrop-filter': 'blur(3px)', + } + }) + + // generate auth token QR code + new QRCode($(el_window).find('.otp-qr-code').get(0), { + text: window.gui_origin + '?auth_token=' + window.auth_token, + width: 155, + height: 155, + colorDark : "#000000", + colorLight : "#ffffff", + correctLevel : QRCode.CorrectLevel.H + }); + }) +} + +export default UIWindowQR \ No newline at end of file diff --git a/src/UI/UIWindowRecoverPassword.js b/src/UI/UIWindowRecoverPassword.js new file mode 100644 index 00000000..2bba22a2 --- /dev/null +++ b/src/UI/UIWindowRecoverPassword.js @@ -0,0 +1,110 @@ +import UIWindow from './UIWindow.js' +import UIAlert from './UIAlert.js' + +function UIWindowRecoverPassword(options){ + return new Promise(async (resolve) => { + options = options ?? {}; + + let h = ''; + h += `
    `; + h += `

    Recover Password

    `; + h += `
    `; + h += `

    `; + h += `
    `; + h += ``; + h += ``; + h += ``; + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: null, + backdrop: options.backdrop ?? false, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: options.has_head ?? true, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_draggable: options.is_draggable ?? true, + is_droppable: false, + is_resizable: false, + stay_on_top: options.stay_on_top ?? false, + allow_native_ctxmenu: true, + allow_user_select: true, + width: 350, + dominant: true, + ...options.window_options, + onAppend: function(el_window){ + $(el_window).find('.pass-recovery-username-or-email').first().focus(); + }, + window_class: 'window-item-properties', + window_css:{ + height: 'initial', + }, + body_css: { + padding: '10px', + width: 'initial', + height: 'initial', + 'background-color': 'rgba(231, 238, 245)', + 'backdrop-filter': 'blur(3px)', + } + }) + $(el_window).find('.pass-recovery-form').on('submit', function(e){ + e.preventDefault(); + e.stopPropagation(); + return false; + }) + + // Send recovery email + $(el_window).find('.send-recovery-email').on('click', function(e){ + let email, username; + let input = $(el_window).find('.pass-recovery-username-or-email').val(); + if(is_email(input)) + email = input; + else + username = input; + + // todo validation before sending + $.ajax({ + url: api_origin + "/send-pass-recovery-email", + type: 'POST', + async: true, + contentType: "application/json", + data: JSON.stringify({ + email: email, + username: username, + }), + statusCode: { + 401: function () { + logout(); + }, + }, + success: async function (res){ + $(el_window).close(); + await UIAlert({ + message: res.message, + body_icon: window.icons['c-check.svg'], + stay_on_top: true, + backdrop: true, + window_options: { + backdrop: true, + close_on_backdrop_click: false, + } + }) + }, + error: function (err){ + $(el_window).find('.error').html(err.responseText); + $(el_window).find('.error').fadeIn(); + }, + complete: function(){ + } + }) + }) + }) +} + +export default UIWindowRecoverPassword \ No newline at end of file diff --git a/src/UI/UIWindowRefer.js b/src/UI/UIWindowRefer.js new file mode 100644 index 00000000..fcafa383 --- /dev/null +++ b/src/UI/UIWindowRefer.js @@ -0,0 +1,102 @@ +import UIWindow from './UIWindow.js' +import UIPopover from './UIPopover.js' + +async function UIWindowRefer(options){ + let h = ''; + let copy_btn_text = 'Copy Link'; + let copied_btn_text = 'Copied!'; + const url = `${gui_origin}/?r=${user.referral_code}`; + + h += `
    `; + h += `
    ×
    `; + h += ``; + h += `

    Get 1 GB for every friend who creates and confirms an account on Puter. Your friend will get 1 GB too!

    `; + h += ``; + h += ``; + h += `` + h += ``; + h += `
    `; + + const el_window = await UIWindow({ + title: `Refer a friend!`, + icon: null, + uid: null, + is_dir: false, + body_content: h, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_draggable: true, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: true, + allow_user_select: true, + onAppend: function(el_window){ + }, + width: 500, + dominant: true, + window_css: { + height: 'initial', + }, + body_css: { + padding: '10px', + width: 'initial', + 'max-height': 'calc(100vh - 200px)', + 'background-color': 'rgb(241 246 251)', + 'backdrop-filter': 'blur(3px)', + 'padding': '10px 20px 20px 20px', + 'height': 'initial', + } + }); + + $(el_window).find('.window-body .downloadable-link').val(url); + + $(el_window).find('.window-body .share-copy-link-on-social').on('click', function(e){ + const social_links = socialLink({url: url, title: `Get 1 GB of free storage on Puter.com!`, description: `Get 1 GB of free storage on Puter.com!`}); + + let social_links_html = ``; + social_links_html += `
    `; + social_links_html += `

    Share to

    ` + social_links_html += `` + social_links_html += `` + social_links_html += `` + social_links_html += `` + social_links_html += `` + social_links_html += `` + social_links_html += '
    '; + + UIPopover({ + content: social_links_html, + snapToElement: this, + parent_element: this, + // width: 300, + height: 100, + position: 'bottom', + }); + }) + + $(el_window).find('.window-body .copy-downloadable-link').on('click', async function(e){ + var copy_btn = this; + if (navigator.clipboard) { + // Get link text + const selected_text = $(el_window).find('.window-body .downloadable-link').val(); + // copy selected text to clipboard + await navigator.clipboard.writeText(selected_text); + } + else{ + // Get the text field + $(el_window).find('.window-body .downloadable-link').select(); + // Copy the text inside the text field + document.execCommand('copy'); + } + + $(this).html(copied_btn_text); + setTimeout(function(){ + $(copy_btn).html(copy_btn_text); + }, 1000); + }); +} + +export default UIWindowRefer \ No newline at end of file diff --git a/src/UI/UIWindowRequestFiles.js b/src/UI/UIWindowRequestFiles.js new file mode 100644 index 00000000..d5356cf0 --- /dev/null +++ b/src/UI/UIWindowRequestFiles.js @@ -0,0 +1,75 @@ +import UIWindow from './UIWindow.js' + +async function UIWindowRequestFiles(options){ + let h = ''; + h += `
    `; + h += `

    File Request Link:

    `; + h += ``; + h += `
    `; + + const el_window = await UIWindow({ + title: `Request Files`, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: false, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: true, + allow_user_select: true, + width: 400, + dominant: true, + onAppend: function(el_window){ + }, + window_class: 'window-item-properties', + window_css:{ + height: 'initial', + }, + body_css: { + padding: '10px', + width: 'initial', + 'max-height': 'calc(100vh - 200px)', + 'background-color': 'rgba(231, 238, 245)', + 'backdrop-filter': 'blur(3px)', + 'padding-bottom': 0, + 'height': 'initial', + } + }); + + //check if there is a fr token available + let stat = await puter.fs.stat(options.dir_path); + if(stat.file_request_url !== undefined && stat.file_request_url !== null && stat.file_request_url !== ''){ + $(el_window).find('.filereq-link').html(stat.file_request_url); + } + // generate new fr url + else{ + $.ajax({ + url: api_origin + "/filereq", + type: 'POST', + data: JSON.stringify({ + dir_path: options.dir_path + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function (){ + logout(); + }, + }, + success: function (filereq){ + $(el_window).find('.filereq-link').html(filereq.url); + } + }); + } +} + +export default UIWindowRequestFiles \ No newline at end of file diff --git a/src/UI/UIWindowRequestPermission.js b/src/UI/UIWindowRequestPermission.js new file mode 100644 index 00000000..80b850c7 --- /dev/null +++ b/src/UI/UIWindowRequestPermission.js @@ -0,0 +1,125 @@ +import UIWindow from './UIWindow.js' + +async function UIWindowRequestPermission(options){ + options = options ?? {}; + options.reload_on_success = options.reload_on_success ?? false; + return new Promise(async (resolve) => { + let drivers = [ + { + name: 'puter-chat-completion', + human_name: 'AI Chat Completion', + description: 'This app wants to generate text using AI. This may incur costs on your behalf.', + }, + { + name: 'puter-image-generation', + human_name: 'AI Image Generation', + description: 'This app wants to generate images using AI. This may incur costs on your behalf.', + }, + { + name: 'puter-kvstore', + human_name: 'Puter Storage', + description: 'This app wants to securely store data in your Puter account. This app will not be able to access your personal data or data stored by other apps.', + } + + ] + + let parts = options.permission.split(":"); + let driver_name = parts[1]; + let action_name = parts[2]; + + function findDriverByName(driverName) { + return drivers.find(driver => driver.name === driverName); + } + + let driver = findDriverByName(driver_name); + + if(driver === undefined){ + resolve(false); + return; + } + + let h = ``; + h += `
    `; + h += `
    `; + // title + h += `

    "${html_encode(options.app_uid ?? options.origin)}" would Like to use ${html_encode(driver.human_name)}

    `; + // todo show the real description of action + h += `

    ${html_encode(driver.description)}

    `; + // Allow/Don't Allow + h += ``; + h += ``; + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: null, + app: 'request-authorization', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_draggable: true, + is_droppable: false, + is_resizable: false, + stay_on_top: false, + allow_native_ctxmenu: true, + allow_user_select: true, + ...options.window_options, + width: 350, + dominant: true, + on_close: ()=>{ + resolve(false) + }, + onAppend: function(this_window){ + }, + window_class: 'window-login', + window_css:{ + height: 'initial', + }, + body_css: { + width: 'initial', + padding: '0', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.app-auth-allow').on('click', async function(e){ + $(this).addClass('disabled'); + + try{ + const res = await fetch( window.api_origin + "/auth/grant-user-app", { + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer " + window.auth_token, + }, + "body": JSON.stringify({ + app_uid: options.app_uid, + origin: options.origin, + permission: options.permission + }), + "method": "POST", + }); + }catch(err){ + console.error(err); + resolve(err); + } + + resolve(true); + }) + + $(el_window).find('.app-auth-dont-allow').on('click', function(e){ + $(this).addClass('disabled'); + $(el_window).close(); + resolve(false); + }) + }) +} + +export default UIWindowRequestPermission \ No newline at end of file diff --git a/src/UI/UIWindowSaveAccount.js b/src/UI/UIWindowSaveAccount.js new file mode 100644 index 00000000..312ff135 --- /dev/null +++ b/src/UI/UIWindowSaveAccount.js @@ -0,0 +1,167 @@ +import UIWindow from './UIWindow.js' +import UIWindowEmailConfirmationRequired from './UIWindowEmailConfirmationRequired.js' + +async function UIWindowSaveAccount(options){ + const internal_id = window.uuidv4(); + options = options ?? {}; + options.reload_on_success = options.reload_on_success ?? false; + options.send_confirmation_code = options.send_confirmation_code ?? false; + + return new Promise(async (resolve) => { + let h = ''; + h += `
    `; + // success + h += ``; + + // form + h += ``; + h += `
    `; + + const el_window = await UIWindow({ + title: null, + icon: null, + uid: null, + app: 'save-account', + single_instance: true, + is_dir: false, + body_content: h, + has_head: true, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_draggable: true, + is_droppable: false, + is_resizable: false, + stay_on_top: false, + allow_native_ctxmenu: true, + allow_user_select: true, + width: 350, + dominant: true, + show_in_taskbar: false, + ...options.window_options, + onAppend: function(this_window){ + if(options.default_username) + $(this_window).find('.email').get(0).focus({preventScroll:true}); + else + $(this_window).find('.username').get(0).focus({preventScroll:true}); + }, + window_class: 'window-save-account', + window_css:{ + height: 'initial', + }, + on_close: ()=>{ + resolve(false) + }, + body_css: { + width: 'initial', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.signup-btn').on('click', function(e){ + // todo do some basic validation client-side + + //Username + let username = $(el_window).find('.username').val(); + + //Email + let email = $(el_window).find('.email').val(); + + //Password + let password = $(el_window).find('.password').val(); + + // disable 'Create Account' button + $(el_window).find('.signup-btn').prop('disabled', true); + + $.ajax({ + url: api_origin + "/save_account", + type: 'POST', + async: true, + contentType: "application/json", + data: JSON.stringify({ + username: username, + email: email, + password: password, + referrer: options.referrer, + send_confirmation_code: options.send_confirmation_code, + }), + headers: { + "Authorization": "Bearer "+auth_token + }, + success: async function (data){ + update_auth_data(data.token, data.user) + + //close this window + if(data.user.email_confirmation_required){ + let is_verified = await UIWindowEmailConfirmationRequired({ + stay_on_top: true, + has_head: true + }); + resolve(is_verified); + }else{ + resolve(true); + } + + $(el_window).find('.save-account-form').hide(100, ()=>{ + $(el_window).find('.save-account-success').show(100); + }) + }, + error: function (err){ + $(el_window).find('.signup-error-msg').html(err.responseText); + $(el_window).find('.signup-error-msg').fadeIn(); + // re-enable 'Create Account' button + $(el_window).find('.signup-btn').prop('disabled', false); + } + }); + }) + + $(el_window).find('.signup-form').on('submit', function(e){ + e.preventDefault(); + e.stopPropagation(); + return false; + }) + + $(el_window).find('.save-account-success-ok-btn').on('click', ()=>{ + $(el_window).close(); + }) + + //remove login window + $(el_window).find('.signup-c2a-clickable').parents('.window').close(); + }) +} + +export default UIWindowSaveAccount \ No newline at end of file diff --git a/src/UI/UIWindowSelfhostedWaitlist.js b/src/UI/UIWindowSelfhostedWaitlist.js new file mode 100644 index 00000000..cf814ca9 --- /dev/null +++ b/src/UI/UIWindowSelfhostedWaitlist.js @@ -0,0 +1,92 @@ +import UIWindow from './UIWindow.js' + +async function UIWindowSelfhostedWaitlist(options){ + options = options ?? {}; + options.reload_on_success = options.reload_on_success ?? false; + + return new Promise(async (resolve) => { + getItem({ + key: "joined_selfhosted_waitlist", + success: async function(resp){ + if(resp.value){ + $(el_window).find('.join-waitlist-btn').hide(); + $(el_window).find('.waitlist-success-msg').show(); + }else{ + $(el_window).find('.join-waitlist-btn').show(); + $(el_window).find('.waitlist-success-msg').hide(); + } + } + }) + + let h = ``; + h += `
    `; + h += `
    `; + // title + h += ``; + h += `

    Self-Hosted Puter is Coming soon!

    `; + h += `

    Join the waitlist for the launch of Self-Hosted Puter!

    `; + // error msg + h += ``; + // success + h += `
    You've been added to the waitlist and will receive a notification when it's your turn.
    `; + // waitlist + h += ``; + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: null, + app: 'waitlist', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_draggable: true, + is_droppable: false, + is_resizable: false, + stay_on_top: false, + allow_native_ctxmenu: true, + allow_user_select: true, + ...options.window_options, + width: 350, + dominant: true, + on_close: ()=>{ + resolve(false) + }, + onAppend: function(this_window){ + }, + window_class: 'window-login', + window_css:{ + height: 'initial', + }, + body_css: { + width: 'initial', + padding: '0', + height: 245, + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }) + + $(el_window).find('.join-waitlist-btn').on('click', function(e){ + $(this).addClass('disabled'); + setItem({ + key: "joined_selfhosted_waitlist", + value: true, + success: async function(){ + $(el_window).find('.join-waitlist-btn').hide(); + $(el_window).find('.waitlist-success-msg').show(); + } + }) + }) + + }) +} + +export default UIWindowSelfhostedWaitlist \ No newline at end of file diff --git a/src/UI/UIWindowSessionList.js b/src/UI/UIWindowSessionList.js new file mode 100644 index 00000000..ea60cb22 --- /dev/null +++ b/src/UI/UIWindowSessionList.js @@ -0,0 +1,138 @@ +import UIWindow from './UIWindow.js' +import UIWindowLogin from './UIWindowLogin.js' +import UIWindowSignup from './UIWindowSignup.js' + +async function UIWindowSessionList(options){ + options = options ?? {}; + options.reload_on_success = options.reload_on_success ?? true; + + return new Promise(async (resolve) => { + let h = ''; + h += `
    `; + h += `
    Signing in...
    ` + h += `
    `; + h += `

    Sign in with Puter

    ` + for (let index = 0; index < logged_in_users.length; index++) { + const l_user = logged_in_users[index]; + h += `
    ${l_user.username}
    `; + } + h += `
    `; + + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: 'Session List!', + app: 'session-list', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + has_head: false, + selectable_body: false, + draggable_body: options.draggable_body ?? true, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + width: 350, + height: 'auto', + dominant: true, + show_in_taskbar: false, + update_window_url: false, + cover_page: options.cover_page ?? false, + onAppend: function(this_window){ + }, + window_class: 'window-session-list', + body_css: { + width: 'initial', + height: '100%', + 'background-color': 'rgb(245 247 249)', + 'backdrop-filter': 'blur(3px)', + 'display': 'flex', + 'flex-direction': 'column', + 'justify-content': 'center', + } + }) + $(el_window).find('.login-c2a-session-list').on('click', async function(e){ + const login = await UIWindowLogin({ + referrer: options.referrer, + reload_on_success: options.reload_on_success, + window_options: options.window_options, + cover_page: options.cover_page ?? false, + has_head: options.has_head, + send_confirmation_code: options.send_confirmation_code, + window_options: { + has_head: false, + cover_page: options.cover_page ?? false, + } + }); + if(login){ + if(options.reload_on_success){ + // disable native browser exit confirmation + window.onbeforeunload = null; + // refresh + location.reload(); + }else{ + resolve(login); + } + } + }) + $(el_window).find('.signup-c2a-session-list').on('click', async function(e){ + $('.signup-c2a-clickable').parents('.window').close(); + // create Signup window + const signup = await UIWindowSignup({ + referrer: options.referrer, + reload_on_success: options.reload_on_success, + window_options: options.window_options, + send_confirmation_code: options.send_confirmation_code, + window_options: { + has_head: false, + cover_page: options.cover_page ?? false, + } + + }); + if(signup){ + if(options.reload_on_success){ + // disable native browser exit confirmation + window.onbeforeunload = null; + // refresh + location.reload(); + }else{ + resolve(signup); + } + } + }) + + $(el_window).find('.session-entry').on('click', function(e){ + $(el_window).find('.loading').css({display: 'flex'}); + + setTimeout(() => { + let selected_uuid = $(this).attr('data-uuid'); + let selected_user; + for (let index = 0; index < window.logged_in_users.length; index++) { + const l_user = logged_in_users[index]; + if(l_user.uuid === selected_uuid){ + selected_user = l_user; + } + } + + // new logged in user + update_auth_data(selected_user.auth_token, selected_user); + if(options.reload_on_success){ + // disable native browser exit confirmation + window.onbeforeunload = null; + // refresh + location.reload(); + }else{ + resolve(true); + } + }, 500); + }) + }) +} + +export default UIWindowSessionList \ No newline at end of file diff --git a/src/UI/UIWindowSignup.js b/src/UI/UIWindowSignup.js new file mode 100644 index 00000000..3ff038fb --- /dev/null +++ b/src/UI/UIWindowSignup.js @@ -0,0 +1,186 @@ +import UIWindow from './UIWindow.js' +import UIWindowLogin from './UIWindowLogin.js' +import UIWindowEmailConfirmationRequired from './UIWindowEmailConfirmationRequired.js' + +function UIWindowSignup(options){ + options = options ?? {}; + options.reload_on_success = options.reload_on_success ?? false; + options.has_head = options.has_head ?? true; + options.send_confirmation_code = options.send_confirmation_code ?? false; + + return new Promise(async (resolve) => { + const internal_id = window.uuidv4(); + let h = ''; + h += `
    `; + // logo + h += ``; + // close button + if(!options.has_head && options.show_close_button !== false) + h += `
    ×
    `; + + // Form + h += `
    `; + // title + h += `

    Create Free Account

    `; + // signup form + h += ``; + h += `
    `; + // login link + // create account link + h += `
    `; + h += ``; + h += `
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: null, + app: 'signup', + single_instance: true, + icon: null, + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: true, + selectable_body: false, + allow_context_menu: false, + is_draggable: false, + is_droppable: false, + is_resizable: false, + stay_on_top: false, + allow_native_ctxmenu: true, + allow_user_select: true, + ...options.window_options, + // width: 350, + dominant: false, + center: true, + onAppend: function(el_window){ + $(el_window).find(`.username`).get(0).focus({preventScroll:true}); + }, + window_class: 'window-signup', + window_css:{ + height: 'initial', + }, + body_css: { + width: 'initial', + 'background-color': 'white', + 'backdrop-filter': 'blur(3px)', + 'display': 'flex', + 'flex-direction': 'column', + 'justify-content': 'center', + 'align-items': 'center', + padding: '30px 10px 10px 10px', + } + }) + + $(el_window).find('.login-c2a-clickable').on('click', async function(e){ + $('.login-c2a-clickable').parents('.window').close(); + const login = await UIWindowLogin({ + referrer: options.referrer, + reload_on_success: options.reload_on_success, + window_options: options.window_options, + show_close_button: options.show_close_button, + send_confirmation_code: options.send_confirmation_code, + }); + if(login) + resolve(true); + }) + + $(el_window).find('.signup-btn').on('click', function(e){ + // todo do some basic validation client-side + + //Username + let username = $(el_window).find('.username').val(); + + //Email + let email = $(el_window).find('.email').val(); + + //Password + let password = $(el_window).find('.password').val(); + + //xyzname + let p102xyzname = $(el_window).find('.p102xyzname').val(); + + // disable 'Create Account' button + $(el_window).find('.signup-btn').prop('disabled', true); + + let headers = {}; + if(window.custom_headers) + headers = window.custom_headers; + + $.ajax({ + url: gui_origin + "/signup", + type: 'POST', + async: true, + headers: headers, + contentType: "application/json", + data: JSON.stringify({ + username: username, + referral_code: window.referral_code, + email: email, + password: password, + referrer: options.referrer ?? window.referrerStr, + send_confirmation_code: options.send_confirmation_code, + p102xyzname: p102xyzname, + }), + success: async function (data){ + update_auth_data(data.token, data.user) + + //send out the login event + if(options.reload_on_success){ + window.onbeforeunload = null; + window.location.replace('/'); + }else if(options.send_confirmation_code){ + $(el_window).close(); + let is_verified = await UIWindowEmailConfirmationRequired({stay_on_top: true, has_head: true}); + resolve(is_verified); + }else{ + resolve(true); + } + }, + error: function (err){ + $(el_window).find('.signup-error-msg').html(err.responseText); + $(el_window).find('.signup-error-msg').fadeIn(); + // re-enable 'Create Account' button + $(el_window).find('.signup-btn').prop('disabled', false); + } + }); + }) + + $(el_window).find('.signup-form').on('submit', function(e){ + e.preventDefault(); + e.stopPropagation(); + return false; + }) + + //remove login window + $('.signup-c2a-clickable').parents('.window').close(); + }) +} + +export default UIWindowSignup \ No newline at end of file diff --git a/src/UI/UIWindowUploadProgress.js b/src/UI/UIWindowUploadProgress.js new file mode 100644 index 00000000..d6e01870 --- /dev/null +++ b/src/UI/UIWindowUploadProgress.js @@ -0,0 +1,57 @@ +import UIWindow from './UIWindow.js' + +// todo do this using uid rather than item_path, since item_path is way mroe expensive on the DB +async function UIWindowUploadProgress(options){ + let h = ''; + h += `
    `; + h += `
    `; + // spinner + h +=`circle anim`; + // Progress report + h +=`
    `; + // msg + h += `Preparing for upload...`; + h += `
    `; + // progress + h += `
    `; + h += `
    `; + h += `
    `; + // cancel + h += ``; + h +=`
    `; + h += `
    `; + + const el_window = await UIWindow({ + title: `Upload`, + icon: window.icons[`app-icon-uploader.svg`], + uid: null, + is_dir: false, + body_content: h, + draggable_body: false, + has_head: false, + selectable_body: false, + draggable_body: true, + allow_context_menu: false, + is_resizable: false, + is_droppable: false, + init_center: true, + allow_native_ctxmenu: false, + allow_user_select: false, + window_class: 'window-upload-progress', + width: 450, + dominant: true, + window_css:{ + height: 'initial', + }, + body_css: { + padding: '22px', + width: 'initial', + 'background-color': 'rgba(231, 238, 245, .95)', + 'backdrop-filter': 'blur(3px)', + } + }); + + return el_window; +} + +export default UIWindowUploadProgress \ No newline at end of file diff --git a/src/browserconfig.xml b/src/browserconfig.xml new file mode 100644 index 00000000..92994302 --- /dev/null +++ b/src/browserconfig.xml @@ -0,0 +1,8 @@ + + + + + + + +#ffffff \ No newline at end of file diff --git a/src/css/normalize.css b/src/css/normalize.css new file mode 100644 index 00000000..192eb9ce --- /dev/null +++ b/src/css/normalize.css @@ -0,0 +1,349 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/src/css/style.css b/src/css/style.css new file mode 100644 index 00000000..3800673c --- /dev/null +++ b/src/css/style.css @@ -0,0 +1,3226 @@ +* { + font-family: "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif; + user-select: none; +} + +html, body { + /* disables two fingers back/forward swipe */ + overscroll-behavior-x: none; +} + +body { + background: no-repeat center center fixed; + background-position: center; + background-size: cover; + background-color: #3d4c74; + overflow: hidden; +} + +.embedded-in-3rd-party-website, .embedded-in-popup { + background: none !important; + background-color: #ccccccbe !important; +} + +.disable-user-select { + cursor: default; + -webkit-touch-callout: none !important; + -webkit-user-select: none !important; + -khtml-user-select: none !important; + -moz-user-select: none !important; + -ms-user-select: none !important; + user-select: none !important; +} + +.enable-user-select, .enable-user-select * { + cursor: initial; + -webkit-touch-callout: text !important; + -webkit-user-select: text !important; + -khtml-user-select: text !important; + -moz-user-select: text !important; + -ms-user-select: text !important; + user-select: text !important; +} + +.window-container { + position: fixed; + top: 0; + left: -100000px; + width: 200000px; + height: 200000px; + z-index: -9999; +} + +input[type=text], input[type=password], input[type=email], select { + width: 100%; + padding: 8px; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; + outline: none; + -webkit-font-smoothing: antialiased; + color: #393f46; + font-size: 14px; +} + +/* to prevent auto-zoom on input focus in mobile */ +.device-phone input[type=text], .device-phone input[type=password], .device-phone input[type=email], .device-phone select { + font-size: 17px; +} + +input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, select:focus { + border: 2px solid #01a0fd; + padding: 7px; +} + +/** + * Button + */ + +.button { + color: #666666; + background-color: #eeeeee; + border-color: #eeeeee; + font-size: 14px; + text-decoration: none; + text-align: center; + line-height: 40px; + height: 35px; + padding: 0 30px; + margin: 0; + display: inline-block; + appearance: none; + cursor: pointer; + border: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-color: #b9b9b9; + border-style: solid; + border-width: 1px; + line-height: 35px; + background: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e1e1e1)); + background: linear-gradient(#f6f6f6, #e1e1e1); + -webkit-box-shadow: inset 0px 1px 0px rgb(255 255 255 / 30%), 0 1px 2px rgb(0 0 0 / 15%); + box-shadow: inset 0px 1px 0px rgb(255 255 255 / 30%), 0 1px 2px rgb(0 0 0 / 15%); + border-radius: 4px; + outline: none; +} + +.button:focus-visible { + border-color: rgb(118 118 118); +} + +.button:active, .button.active, .button.is-active, .button.has-open-contextmenu { + text-decoration: none; + background-color: #eeeeee; + border-color: #cfcfcf; + color: #a9a9a9; + -webkit-transition-duration: 0s; + transition-duration: 0s; + -webkit-box-shadow: inset 0 1px 3px rgb(0 0 0 / 20%); + box-shadow: inset 0px 2px 3px rgb(0 0 0 / 36%), 0px 1px 0px white; +} + +.button.disabled, .button.is-disabled, .button:disabled { + top: 0 !important; + background: #EEE !important; + border: 1px solid #DDD !important; + text-shadow: 0 1px 1px white !important; + color: #CCC !important; + cursor: default !important; + appearance: none !important; + pointer-events: none; +} + +.button-action.disabled, .button-action.is-disabled, .button-action:disabled { + background: #55a975 !important; + border: 1px solid #60ab7d !important; + text-shadow: none !important; + color: #CCC !important; +} + +.button-primary.disabled, .button-primary.is-disabled, .button-primary:disabled { + background: #8fc2e7 !important; + border: 1px solid #98adbd !important; + text-shadow: none !important; + color: #f5f5f5 !important; +} + +.button-block { + width: 100%; +} + +.button-primary { + border-color: #088ef0; + background: -webkit-gradient(linear, left top, left bottom, from(#34a5f8), to(#088ef0)); + background: linear-gradient(#34a5f8, #088ef0); + color: white; +} + +.button-danger { + border-color: #f00808; + background: -webkit-gradient(linear, left top, left bottom, from(#f83434), to(#f00808)); + background: linear-gradient(#f83434, #f00808); + color: white; +} + +.button-primary:active, .button-primary.active, .button-primary.is-active, .button-primary-flat:active, .button-primary-flat.active, .button-primary-flat.is-active { + background-color: #2798eb; + border-color: #2798eb; + color: #bedef5; +} + +.button-action { + border-color: #08bf4e; + background: -webkit-gradient(linear, left top, left bottom, from(#29d55d), to(#1ccd60)); + background: linear-gradient(#29d55d, #1ccd60); + color: white; +} + +.button-action:active, .button-action.active, .button-action.is-active, .button-action-flat:active, .button-action-flat.active, .button-action-flat.is-active { + background-color: #27eb41; + border-color: #27eb41; + color: #bef5ca; +} + +.button-giant { + font-size: 28px; + height: 70px; + line-height: 70px; + padding: 0 70px; +} + +.button-jumbo { + font-size: 24px; + height: 60px; + line-height: 60px; + padding: 0 60px; +} + +.button-large { + font-size: 20px; + height: 50px; + line-height: 50px; + padding: 0 50px; +} + +.button-normal { + font-size: 16px; + height: 40px; + line-height: 38px; + padding: 0 40px; +} + +.button-small { + height: 30px; + line-height: 29px; + padding: 0 30px; +} + +.button-tiny { + font-size: 9.6px; + height: 24px; + line-height: 24px; + padding: 0 24px; +} + +.desktop { + display: none; + overflow: hidden; + height: calc(100vh - 60px); + width: 100%; + display: grid; + grid-template-rows: repeat(auto-fill, 109px); + grid-auto-flow: column; + grid-template-columns: repeat(auto-fill, 120px); +} + +.fullpage-mode .window-minimize-btn { + display: none; +} + +.device-phone .desktop { + height: 100vh !important; + height: 100dvh !important; + overflow-x: scroll; +} + +.item-container-list { + display: grid; + overflow-x: scroll !important; + overflow-y: hidden !important; + grid-template-rows: repeat(auto-fill, 18px); + grid-auto-flow: column; + gap: 15px 70px; + padding-top: 5px; +} + +.device-phone .item-container-list { + grid-template-rows: repeat(auto-fill, 55px); + overflow-x: hidden !important; + overflow-y: scroll !important; + grid-auto-flow: unset; +} + +.item-container-details { + overflow-x: scroll !important; + overflow-y: scroll !important; + padding-top: 5px; +} + +.item { + width: 110px; + height: 70px; + user-select: none !important; + -moz-user-select: none !important; + -webkit-user-select: none; + text-align: center; + margin: 15px 5px 30px 5px; + float: left; + position: relative; + scroll-margin: 15px 15px 100px 15px; + pointer-events: all; +} + +.item-disabled { + opacity: 0.7; + pointer-events: none; +} + +.item-container-list .item { + height: initial; + width: max-content; + margin: 0; + pointer-events: all; +} + +.device-phone .item-container-list .item { + height: 50px; + width: 100%; + padding-left: 10px; +} + +.item-container-details .item { + height: initial; + width: max-content; + margin: 0; + pointer-events: all; + width: 100vw; + margin-bottom: 20px; +} + +.explore-table-headers { + display: none; + width: 100vw; + height: 25px; + border-bottom: 1px solid rgb(226, 226, 226); + background-color: #fff; + margin-left: -10px; + padding-top: 0; + margin-top: -7px; + margin-bottom: 8px; + position: sticky; + top: -7px; + z-index: 1; +} + +.device-phone .explore-table-headers { + display: none !important; +} + +.header-sort-icon { + margin-left: 7px; + pointer-events: none; +} + +span.header-sort-icon img { + margin-bottom: -1px; + width: 10px; +} + +.explore-table-headers .explore-table-headers-th { + font-size: 12px; + line-height: 25px; + margin-left: 15px; + color: #555c61; + display: inline-block; +} + +.explore-table-headers-th-active { + font-weight: bold; +} + +.explore-table-headers-th--name { + width: 330px; +} + +.explore-table-headers-th--size { + width: 135px; +} + +.explore-table-headers-th--modified { + width: 135px; +} + +.item-container-details .explore-table-headers { + display: block; +} + +.item-disabled .item-icon, .item-disabled .item-name { + opacity: 0.7; + pointer-events: none; +} + +.item-icon { + display: block; + margin: 0 auto; + padding: 5px; + height: 45px; + width: 45px; + filter: drop-shadow(1px 1px 1px rgba(102, 102, 102, .5)); + display: flex; + justify-content: center; + align-items: center; +} + +.item-container-list .item-icon { + float: left; + height: 15px; + width: 15px; +} + +.device-phone .item-container-list .item-icon { + float: left; + height: 45px; + width: 45px; +} + +.item-container-details .item-icon { + float: left; + height: 15px; + width: 15px; +} + +.device-desktop .item-container-details .item-selected .item-icon { + background-color: transparent; +} + +.item-icon img { + max-height: 45px; + max-width: 45px; +} + +.item-container-list .item-icon img { + max-height: 15px; + max-width: 15px; +} + +.device-phone .item-container-list .item-icon img { + max-height: 45px; + max-width: 45px; +} + +.item-container-details .item-icon img { + max-height: 15px; + max-width: 15px; +} + +.item-icon-thumb { + padding: 1px; + background-color: white; + border: 1px solid #EEE; + border-radius: 3px; +} + +.device-desktop .item-selected .item-icon { + background-color: #d4d4d430; + border-radius: 3px; + filter: drop-shadow(0px 0px 1px rgba(102, 102, 102, 1)); +} + +.item-badges { + position: absolute; + height: 15px; + width: 55px; + text-align: center; + justify-content: right; + display: flex; + top: 38px; + left: 28px; + right: 50%; +} + +.item-container-list .item-badges { + display: none; +} + +.item-container-details .item-badges { + display: none; +} + +.item-badge { + filter: drop-shadow(0px 0px 1px rgba(0, 0, 0, .4)); + display: none; + margin: 1px; + width: 15px; + height: 15px; + box-sizing: border-box; + border-radius: 100%; +} + +.item-badge.item-shortcut { + border-radius: 1px; + background: white; +} + +.item-has-website-badge { + filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, .4)); + display: none; + cursor: pointer; +} + +.item-has-website-url-badge { + cursor: pointer; +} + +.item-has-website-url-badge.has-open-contextmenu { + filter: drop-shadow(0px 0px 1px rgba(0, 0, 0, 1)); +} + +.item-name, .item-name-editor, .item-name-shadow { + font-size: 13px; + color: white; + text-shadow: 0px 0px 3px #00000082, 0px 0px 3px #00000082, 0px 0px 3px #00000082; + -webkit-font-smoothing: antialiased; + padding: 3px; + margin-top: 4px; + display: inline-block; + font-weight: bold; + border-radius: 4px; + line-break: anywhere; + box-sizing: border-box; +} + +.item-name { + transition: opacity 0.2s ease-in-out; + cursor: default; + max-width: 110px; +} + +.item-container-list .item-name { + margin-top: 2px; + float: left; + max-width: initial; +} + +.item-container-details .item-name { + margin-top: 2px; + float: left; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + text-align: left; + max-width: 220px; +} + +.item-name-shadow { + display: none; + max-width: 110px; +} + +.item-name-editor { + background: none; + background-color: white; + text-shadow: none; + color: black; + text-align: center; + border: none; + max-width: 100%; + padding: 1px 3px; + resize: none; + display: none; + margin: 6px auto; + user-select: initial; + position: relative; + box-sizing: border-box; + z-index: 999999999; +} + +.item-container-list .item-name-editor { + width: fit-content !important; + max-width: 200px !important; + text-align: left; + background-color: white !important; +} + +.item-container-list .item-name-editor-active { + background-color: white !important; +} + +.item-container-details .item-name-editor { + width: fit-content !important; + max-width: 200px !important; + text-align: left; + background-color: white !important; + position: absolute; + left: 35px; +} + +.item-container-details .item-name-editor-active { + background-color: white !important; +} + +.item-name-editor-active { + display: block; +} + +.item-attr { + display: none; + position: absolute; + text-align: left; + font-size: 12px; + height: 25px; + line-height: 25px; + width: max-content; + color: #738c9f; +} + +.item-container-details .item-attr { + display: inline; +} + +.device-desktop .item-container-details .item-selected .item-attr { + color: white; +} + +.item-container-details .item-attr--modified { + left: 350px; +} + +.item-container-details .item-attr--size { + left: 500px; +} + +.item-container-details .item-attr--type { + left: 650px; +} + +.window-disabled { + pointer-events: none !important; +} + +.window-disable-mask { + width: 100%; + height: 100%; + position: absolute; + display: none; + background-color: #d1d1d18a; + pointer-events: initial; + z-index: 2; +} + +.device-phone .window-disable-mask, .device-tablet .window-disable-mask { + background-color: #626060a1; +} + +.window-disable-mask .busy-indicator { + -moz-animation: three-quarters-loader 1250ms infinite linear; + -webkit-animation: three-quarters-loader 1250ms infinite linear; + animation: three-quarters-loader 1250ms infinite linear; + border: 5px solid rgb(75, 75, 75); + border-right-color: transparent; + border-radius: 100%; + box-sizing: border-box; + display: inline-block; + position: relative; + overflow: hidden; + text-indent: -9999px; + width: 45px; + height: 45px; + position: absolute; + top: calc(50% - 22px) !important; + left: calc(50% - 22px) !important; + transform: translate(-50%, -50%); + display: none; +} + +.window-body .item .item-name { + color: rgb(73, 73, 73); + text-shadow: none; + font-weight: 500; + font-size: 13px; + margin-left: 3px; +} + +.device-phone .item-container-list .item .item-name { + line-height: 42px; +} + +.window-body .item .item-name-editor { + font-weight: 500; + font-size: 13px; +} + +.device-desktop .item-selected>.item-name, .device-desktop .window-body .item-selected>.item-name { + background-color: #3b56ee; + color: white; +} + +.device-desktop .item-container-details .item-selected { + background-color: #3b56ee; + border-radius: 3px; +} + +.device-desktop .item-selected.item-blurred .item-name { + background-color: #dbdada; + color: rgb(73, 73, 73); + text-shadow: none; +} + +.window-body .item-name-editor { + color: rgb(73, 73, 73); + text-shadow: none; +} + +.explorer-empty-message { + text-align: center; + margin-top: 20px; + color: #a3a3a3; + -webkit-font-smoothing: antialiased; + display: none; +} + +.explorer-loading-spinner { + margin-top: 20px; + font-size: 13px; + display: none; +} + +.explorer-loading-spinner-msg { + text-align: center; + margin-top: 5px; + color: #a3a3a3; + font-size: 15px; + -webkit-font-smoothing: antialiased; +} + +/* Window */ + +.window { + display: none; + position: absolute; + background: transparent; + padding: 0; + border: 1px solid #9a9a9a; + box-shadow: 0px 0px 15px #00000066; + overflow: hidden; + border-radius: 4px; + border: none; + transition: opacity .2s; + user-select: none !important; + -moz-user-select: none !important; + -webkit-user-select: none; +} + +.window[data-is_maximized="1"] { + transform: none; + border-radius: 0; +} + +.window-cover-page { + border-radius: 0; +} + +.device-phone .window[data-is_maximized="1"] { + top: 0 !important; +} + +.device-phone .window:not(.window-alert), .device-tablet .window:not(.window-alert) { + border-radius: 0; + transform: none; + width: 100%; + height: 100dvh !important; + top: 0 !important; +} + +.device-phone .window, .device-tablet .window { + z-index: 9999999 !important; +} + +.device-phone .window-alert, .device-tablet .window-alert { + min-width: 90%; + max-width: 300px; + position: absolute; + left: 50% !important; + top: 50% !important; + transform: translate(-50%, -50%); +} + +.device-tablet .window .window-scale-btn, +.device-phone .window .window-scale-btn, +.device-phone .window .ui-resizable-handle { + display: none !important; +} + +.window-backdrop { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: #00000052; +} + +.window.ui-resizable-resizing { + transition: none; +} + +.window-dragging { + transition: none; +} + +.window-head-draggable { + overflow: hidden; + flex-grow: 1; + display: flex; +} + +.window-head { + overflow: hidden !important; + padding: 0; + background-color: rgba(231, 238, 245, .95); + filter: grayscale(80%); + box-shadow: inset 0px -4px 5px -7px rgb(0 0 0 / 64%); + display: flex; + flex-flow: row; + padding-left: 5px; + margin-bottom: -1px; +} + +.device-phone .window-head { + /* not transparent on mobile */ + background-color: rgba(231, 238, 245); +} + +.window-head, .window-head * { + user-select: none !important; + -moz-user-select: none !important; + -webkit-user-select: none !important; + -ms-user-select: none !important; + cursor: default; +} + +.window-active .window-head { + filter: none !important; +} + +.window-head-title { + float: left; + line-height: 30px; + font-size: 14px; + color: #666d74; + margin-left: 10px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.window-active .window-head-title { + color: #373e44; +} + +.window-head-icon { + float: left; + width: 16px; + height: 16px; + margin-left: 8px; + margin-top: 7px; + margin-right: -5px; + filter: drop-shadow(0px 0px 0.5px rgb(51, 51, 51)); +} + +.window-navbar { + overflow: hidden; + border-bottom: 1px solid #e3e3e3; + padding: 5px 0 5px 1px; + background-color: #fafafa; + height: 48px; + box-sizing: border-box; +} + +.window-navbar-btn { + margin: 7px 6px 0; + cursor: pointer; + width: 17px; + border-radius: 100%; + padding: 3px; + transition: background-color 0.2s ease-in; +} + +.window-navbar-btn:hover, .window-navbar-btn.has-open-contextmenu { + background-color: #dfdfdf; +} + +.window-navbar-btn-disabled { + pointer-events: none; + opacity: 0.5; +} + +.window-navbar-path { + overflow: hidden; + line-height: 35px; + padding-left: 10px; + font-size: 14px; + color: #41484c; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + -webkit-font-smoothing: antialiased; + border: 1px solid #e3e3e3; + border-radius: 3px; + background: #f1f3f4; + box-sizing: border-box; + + user-select: none !important; + -moz-user-select: none !important; + -webkit-user-select: none !important; + -ms-user-select: none !important; + cursor: default; +} + +.device-phone .window-navbar-path { + display: none; +} + +.window-navbar-layout-settings { + width: 30px; + height: 30px; + margin-left: 10px; + margin-top: 3px; +} + +.device-phone .window-navbar-layout-settings { + float: right; + margin-right: 10px; +} + +.window-navbar-path-input { + overflow: hidden; + line-height: 17px; + padding-left: 10px; + font-size: 15px; + color: #41484c; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + /* -webkit-font-smoothing: antialiased; */ + border: 1px solid #00b6ff; + border-radius: 3px; + background: white; + display: none; + box-sizing: border-box; + padding-top: 9px; + padding-bottom: 9px; + outline: 1px solid #00b6ff; +} + +.window-navbar-path-input, .window-navbar-path { + width: calc(100% - 170px); + float: left; +} + +.window-navbar-path-dirname { + cursor: pointer; + font-weight: 500; + padding: 0px 7px; + height: 33px; + display: inline-block; + overflow: initial !important; +} + +.window-navbar-path-dirname-active { + text-decoration: underline; +} + +.window-navbar-path-dirname:hover { + color: #414a4e; + text-decoration: underline; +} + +.path-seperator { + width: 10px; + opacity: 0.2; +} + +.window-body { + width: 100%; + height: calc(100% - 77px); + background-color: white; + overflow: auto; +} + +.window-body.item-container { + box-sizing: border-box; + width: initial; + padding-left: 10px; + border: 3px solid rgba(255, 255, 255, 0); +} + +.item-container-transparent-border { + border-color: transparent !important; +} + +.window-body.item-container-active { + border-color: #bcedff !important; +} + + +.device-phone .window-body.item-container { + padding-left: 0; +} + +.window-sidebar { + min-width: 170px; + height: calc(100% - 28px); + float: left; + border-right: 1px solid #CCC; + padding: 15px 10px; + box-sizing: border-box; + background-color: rgba(231, 238, 245, .95); + overflow-y: scroll; + margin-top: 1px; +} + +.window-sidebar .ui-resizable-e { + right: 0; +} + +.window-filedialog .window-sidebar { + height: calc(100% - 30px); +} + +.window-cover-page.window-filedialog .window-body { + height: calc(100% - 109px) !important; +} + +.window-cover-page .window-sidebar { + height: 100%; +} + +.window-cover-page.window-puter-dialog { + height: 100%; + width: 100%; + top: 0 !important; +} + +.window-cover-page.window-puter-dialog .window-body { + width: 100%; + height: 100%; + padding: 0 !important; +} + +.window-cover-page.window-login, .window-cover-page.window-signup { + height: 100vh !important; + width: 100%; + top: 0 !important; +} + +.window-sidebar-title { + margin: 0; + font-weight: bold; + font-size: 13px; + color: #6d7787; + text-shadow: 1px 1px rgb(247 247 247 / 15%); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + padding-left: 6px; + cursor: default; + margin-top: 20px; + margin-bottom: 5px; +} + +.window-sidebar-title:first-child { + margin-top: 0px; +} + +.window-sidebar-item:hover, .window-sidebar-item.has-open-contextmenu { + background-color: rgba(243, 243, 243, 0.8); + cursor: pointer; +} + +.window-sidebar-item { + margin-bottom: 6px; + margin-top: 2px; + padding: 4px; + border-radius: 3px; + color: #444444; + font-size: 13px; + cursor: pointer; + transition: 0.15s background-color; + box-sizing: border-box; + overflow-x: hidden !important; + overflow-y: hidden !important; + white-space: nowrap; + text-overflow: ellipsis; +} + +.window-sidebar-item-active, .window-sidebar-item-drag-active, .window-sidebar-item-active:hover { + background-color: #fefeff; +} + +.window-sidebar-item-icon { + width: 14px; + height: 14px; + filter: drop-shadow(0px 0px 0.2px rgb(51, 51, 51)); + margin-right: 5px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + margin-bottom: -2px; +} + +.window[data-app="explorer"] .window-body { + height: calc(100% - 107px); +} + +.explorer-footer { + background: white; + overflow: auto; + height: 30px; + font-size: 13px; + line-height: 28px; + padding-left: 10px; + background-color: #fafafa; + border-top: 1px solid #e3e3e3; + color: #505050; + user-select: none !important; + -moz-user-select: none !important; + -webkit-user-select: none !important; + -ms-user-select: none !important; + cursor: default; +} + +.device-phone .explorer-footer { + width: 100%; +} + +.explorer-footer-seperator, .explorer-footer-selected-items-count { + display: none; +} + +.explorer-footer-seperator { + margin: 15px; + color: #CCC; +} + +.window-body-filedialog { + height: calc(100% - 137px); +} + +.window-body-app { + height: calc(100% - 30px); +} + +.fullpage-mode.device-phone .window-body-app { + height: calc(100%); +} + +.window-filedialog-prompt { + height: 60px; + border-top: 1px solid #dbdee3; + background-color: #f3f5f9; + padding: 0 15px; + display: flex; + flex-direction: column; + justify-content: center; +} + +.savefiledialog-filename { + float: left; + margin-right: 10px; + padding: 5px !important; + border-width: 1px !important; + height: 31px; + flex-grow: 1; +} + +.savefiledialog-save-btn, .openfiledialog-open-btn { + margin-left: 10px; +} + +.filedialog-cancel-btn { + margin-left: 10px; +} + +.window-action-btn { + margin-right: 5px; + margin-left: 10px; + padding-bottom: 3px; + opacity: 0.6; +} + +.window-active .window-action-btn { + opacity: 1; +} + +.window-action-btn>img { + width: 18px; + margin-top: 5px; + margin-right: 4px; + margin-left: 4px; + opacity: 0.5; + -webkit-user-drag: none; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; +} + +.window-action-btn:hover>img { + opacity: 1; +} + +.window-scale-btn>img { + width: 15px; + height: 15px; + margin-top: 7px +} + +.window-app-iframe { + width: 100%; + height: 100%; + border: none; + margin: 0; + display: block; + height: calc(100%); + pointer-events: none; + overflow: hidden; +} + +.window-active .window-app-iframe { + pointer-events: all; +} + +.window-disabled .window-app-iframe { + pointer-events: none !important; +} + +.ui-resizable-e, .ui-resizable-w { + cursor: ew-resize; +} + +.ui-resizable-n, .ui-resizable-s { + cursor: ns-resize; +} + +.ui-resizable-ne, .ui-resizable-sw { + cursor: nesw-resize; +} + +.ui-resizable-nw, .ui-resizable-se { + cursor: nwse-resize; +} + +.window>.ui-resizable-nw, .window>.ui-resizable-ne, .window>.ui-resizable-se, .window>.ui-resizable-sw { + width: 15px; + height: 15px; + z-index: 95 !important; +} + +.window-alert-message, .window-prompt-message { + font-size: 15px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: #414650; + text-shadow: 1px 1px #ffffff52; + margin-top: 10px; + word-break: break-word; +} + +.window-alert-message { + text-align: center; +} + +.window-alert-icon { + width: 64px; + margin: 10px auto 20px; + display: block; +} + +.alert-resp-button { + width: 100%; + margin-top: 10px; +} + +.prompt-resp-button { + margin-left: 10px; +} + +.prompt-resp-btn-ok { + width: 110px; +} + +.mywebsites-card { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + position: relative; + border: 1px solid #CCC; + padding: 10px; + margin-bottom: 10px; + border-radius: 4px; + background-color: white; +} + +.mywebsites-address-link { + color: #0d6efd; + text-decoration: none; +} + +.mywebsites-address-link:hover { + text-decoration: underline; +} + +.mywebsites-dir-path { + cursor: pointer; + font-size: 14px; + margin-bottom: 0; +} + +.mywebsites-dir-path img { + width: 16px; + margin-bottom: -3px; + margin-right: 5px; +} + +.mywebsites-dir-path:hover { + text-decoration: underline; +} + +.mywebsites-dis-dir { + cursor: pointer; +} + +.mywebsites-dis-dir:hover { + text-decoration: underline; +} + +.mywebsites-no-dir-notice { + margin-bottom: 0; + color: #7e7e7e; + font-size: 14px; +} + +.mywebsites-release-address { + color: red; + cursor: pointer; + font-size: 13px; +} + +.mywebsites-site-setting { + position: absolute; + right: 5px; + top: 5px; + cursor: pointer; + width: 20px; + height: 20px; +} + +/*********************** + * Context Menu + ***********************/ + +.context-menu { + display: none; + z-index: 9999999999; + position: absolute; + overflow: hidden; + white-space: nowrap; + font-family: sans-serif; + background: #FFF; + color: #333; + border-radius: 2px; + padding: 3px 0; + min-width: 200px; + background-color: rgba(231, 238, 245, .98); + border: 1px solid #e4ebf3de; + box-shadow: 0px 0px 15px #00000066; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} + +.context-menu li { + list-style-type: none; + user-select: none; + cursor: default !important; +} + +.context-menu .context-menu-divider>hr { + margin-top: 5px; + margin-bottom: 5px; + border-bottom: none; + border-top: 1px solid #00000033; +} + +.context-menu .context-menu-item { + padding: 5px; + list-style-type: none; + user-select: none; + font-size: 13px; + height: 25px; + box-sizing: border-box; + position: relative; +} + +.context-menu .context-menu-item .ctx-item-icon { + width: 15px; + height: 15px; + position: absolute; + left: 5px; + top: 5px; + filter: drop-shadow(0px 0px 0.3px rgb(51, 51, 51)); +} + +.submenu-arrow { + width: 15px; + height: 15px; + float: right; +} + +.submenu-arrow-active { + display: none; +} + +.context-menu-item-active .submenu-arrow { + display: none; + pointer-events: none; +} + +.context-menu-item-active .submenu-arrow-active { + display: inline-block; +} + +.context-menu .context-menu-item-active-blurred .submenu-arrow { + display: inline-block; +} + +.context-menu .context-menu-item-active-blurred .submenu-arrow-active { + display: none; + pointer-events: none; +} + +.context-menu .context-menu-item-active { + background-color: rgb(59 134 226); + color: white; + border-radius: 4px; +} + +.context-menu .context-menu-item-active-blurred { + background-color: rgb(199, 205, 212); + color: initial; + border-radius: 4px; + +} + +.context-menu .context-menu-item-disabled, .context-menu .context-menu-item-disabled:hover { + opacity: 0.5; + background-color: transparent; + color: initial; + cursor: initial; +} + +.context-menu-item-icon, .context-menu-item-icon-active { + display: inline-block; + width: 20px; + text-align: center; + margin-right: 5px; + font-size: 14px; + line-height: 5px; +} + +.context-menu-item-icon-active, .contextmenu-label-active { + display: none; +} + +.context-menu .context-menu-item-active .context-menu-item-icon, +.context-menu .context-menu-item-active .contextmenu-label { + display: none; +} + +.context-menu .context-menu-item-active .context-menu-item-icon-active { + display: inline-block; + color: white; +} + +.context-menu .context-menu-item-active .contextmenu-label-active { + display: inline-block; +} + +.draggable-count-badge { + background-color: red; + border: 2px solid white; + border-radius: 100%; + position: absolute; + display: none; + width: 22px; + height: 22px; + text-align: center; + color: white; + font-weight: bold; + z-index: 9999999999; + font-size: 12px; + line-height: 22px; +} + +.selection-area { + background-color: #afafaf36; + border: 1px solid #CCC; +} + +.container { + user-select: none; +} + +label { + display: block; + -webkit-font-smoothing: antialiased; + color: #3a3d40; + margin-bottom: 3px; + text-shadow: 1px 1px #ffffff61; + font-size: 14px; +} + +.toolbar { + float: right; + width: 100%; + background-color: #00000040; + height: 30px; + position: relative; + z-index: 999999; + box-sizing: border-box; + display: flex; + flex-direction: row; + justify-content: flex-end; + align-content: center; + flex-wrap: wrap; + padding-right: 10px +} + +.show-desktop-btn { + color: white; + font-size: 11px !important; + padding: 2px 5px 2px !important; + border: 1px solid; + border-radius: 4px; + height: 18px !important; + width: 90px !important; + margin-top: 2px; + text-decoration: none; + margin-left: 10px !important; + font-weight: 500; +} + +.device-phone .toolbar { + z-index: 1; +} + +@supports ((backdrop-filter: blur())) { + .toolbar { + background-color: #00000040; + backdrop-filter: blur(10px); + } +} + +.toolbar-btn { + padding: 4px; + font-size: 14px; + width: auto; + padding: 0 5px; + margin-left: 20px; + overflow-y: hidden !important; + overflow-x: hidden !important; + background-size: contain; + background-repeat: no-repeat; + background-position: center; + display: inline-block; + width: 22px; + height: 22px; + padding: 3px; + box-sizing: border-box; + background-origin: content-box; + display: flex; + justify-content: center; + align-items: center; + opacity: 0.8; +} + +.toolbar-btn:hover { + opacity: 1; +} + +.user-options-menu-btn.has-open-contextmenu { + background-color: rgb(255 255 255 / 35%); + border-radius: 3px; +} + +.user-options-menu-username { + color: black; + margin-left: 5px; + display: block; + max-width: 70px; + text-overflow: ellipsis; + float: right; + overflow: hidden; +} + +.user-options-menu-username:empty { + margin-left: 0; +} + +.user-options-login-btn, .user-options-create-account-btn { + padding: 0 15px; +} + +.toolbar-btn:hover:not(.has-open-contextmenu) { + background-color: rgb(255 255 255 / 15%); + border-radius: 3px; +} + +.logout-btn { + position: absolute; + right: 7px; + top: 7px; + padding: 4px; + border-radius: 4px; + cursor: pointer; + border: 2px solid #CCC; +} + +.logout-btn img { + width: 20px; + margin-bottom: -5px; +} + +.login-error-msg, .signup-error-msg, .publish-website-error-msg, .form-error-msg { + display: none; + color: red; + border: 1px solid red; + border-radius: 4px; + padding: 9px; + margin-bottom: 15px; + text-align: center; + font-size: 13px; +} + +.error { + display: none; + color: red; + border: 1px solid red; + border-radius: 4px; + padding: 9px; + margin-bottom: 15px; + text-align: center; + font-size: 13px; +} + +.form-success-msg { + display: none; + color: rgb(0, 129, 69); + border: 1px solid rgb(0, 201, 17); + border-radius: 4px; + padding: 9px; + margin-bottom: 15px; + text-align: center; + font-size: 13px; +} + +.publish-btn { + margin-top: 20px; +} + +.window-publishWebsite-success, .window-give-item-access-success { + display: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + height: auto; +} + +.manage-your-websites-link { + color: #007cff; + text-decoration: underline; + cursor: pointer; +} + +.publishWebsite-published-link { + text-decoration: none; + color: #007cff; +} + +.publishWebsite-published-link:hover { + text-decoration: underline; +} + +.publishWebsite-published-link-icon { + display: inline-block; + width: 12px; + margin-left: 5px; + margin-bottom: -1px; + user-select: none !important; +} + +.login-form-title, .signup-form-title { + text-align: center; + margin-top: 0; + padding-bottom: 15px; + font-size: 23px; + font-weight: 400; + margin-bottom: 10px; + color: #657489; + text-shadow: 1px 1px #ffffff1c; +} + +.signup-form-title { + margin-top: 10px; +} + +.signup-c2a-clickable, .login-c2a-clickable { + border: none; + background: none; + display: block; + margin: 0 auto; + cursor: pointer; + font-weight: 400; + -webkit-font-smoothing: antialiased; + color: #4f5a68; + font-size: 20px; +} + +.signup-c2a-clickable:hover, .login-c2a-clickable:hover { + text-decoration: underline; +} + +.p102xyzname, #p102xyzname { + display: none; +} + +.intro-menu-item { + text-decoration: none; + color: #398ce7; + font-weight: 400; +} + +.intro-menu-item:hover { + text-decoration: underline; +} + +.bull { + margin: 10px; + color: #CCC; +} + +.create-account-form-title { + text-align: center; + margin-top: 0; + padding-bottom: 15px; + font-size: 20px; + font-weight: 300; + margin-bottom: 10px; + color: #383e46; +} + +.create-account-desc { + margin-top: 0; + margin-bottom: 30px; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: #2f3f53; +} + +.unsupported-device-notice { + position: absolute; + width: 100%; + height: 100%; + background-color: white; + z-index: 9999999; + display: none; + flex-direction: column; + justify-content: center; + text-align: center; + padding: 30px; + box-sizing: border-box; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.item-props-tabview { + display: flex; + flex-direction: column; + height: 100%; +} + +.item-props-tab-content { + display: none; + padding: 5px 10px; + flex-grow: 1; + border: 1px solid #CCC; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + border-top-right-radius: 3px; + border-top-left-radius: 3px; + margin-top: -1px; +} + +.item-props-tab-content-selected { + display: block; + background-color: white; +} + +.item-props-tab-btn { + display: inline-block; + padding: 10px 15px; + cursor: pointer; + margin-right: 10px; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + border: 1px solid #ffffff00; + margin-bottom: -1px; + color: #374653; +} + +.item-props-tab-selected { + border: 1px solid #CCC; + margin-bottom: -1px; + border-bottom: none; + background-color: white; + position: relative; + color: black; +} + +.item-props-tbl { + font-size: 13px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.item-props-tbl td { + padding-bottom: 10px; + word-break: break-all; +} + +.item-prop-label { + text-align: left; + font-weight: 500; + white-space: nowrap; +} + +.item-prop-original-name, .item-prop-original-path { + display: none; +} + +.item-prop-version-entry:not(:last-child) { + display: inline-block; + width: 100%; + padding-bottom: 10px; + margin-bottom: 10px; + border-bottom: 1px solid #CCC; +} + +.item-prop-val { + padding-left: 10px; +} + +.send-conf-email, .conf-email-log-out { + cursor: pointer; +} + +.email-confirm-code-hyphen { + display: inline-block; + width: 14%; + text-align: center; + font-size: 40px; + font-weight: 300; +} + +.send-conf-email:hover, .conf-email-log-out:hover { + text-decoration: underline; +} + +.remove-permission-link, .disassociate-website-link { + cursor: pointer; + color: red; +} + +.permission-owner-badge { + background-color: #9dacbd; + border-radius: 2px; + padding: 2px 4px; + color: white; + font-size: 13px; +} + +.remove-permission-link:hover, .disassociate-website-link:hover { + text-decoration: underline; +} + +.item-perm-recipient-card { + margin-bottom: 5px; + margin-top: 15px; + padding: 11px; + background-color: white; + border-radius: 3px; + border: 1px solid #e0e0e0; + color: #65707b; +} + +.remove-permission-icon { + display: none; + text-decoration: none !important; + color: rgb(184, 184, 184); +} + +.remove-permission-icon:hover { + color: rgb(109, 109, 109); +} + +.item-perm-recipient-card:hover .remove-permission-icon { + display: block; +} + +.share-recipients { + margin-top: 10px; + max-height: 200px; + overflow: scroll; +} + +.feedback-sent-success { + display: none; + padding: 10px; + margin-bottom: 20px; + border: 1px solid #59d959; + border-radius: 3px; + background-color: #e4f9e4; + position: relative; +} + +.window-give-item-access-success { + display: none; + padding: 10px; + margin-bottom: 20px; + border: 1px solid #59d959; + border-radius: 3px; + background-color: #e4f9e4; + position: relative; +} + +.save-account-success { + display: none; + padding: 30px; + border-radius: 3px; + background-color: #e4f9e4; + position: relative; + color: green; +} + +.hide-sharing-success-alert { + position: absolute; + color: #8d8c8c; + font-size: 20px; + right: 15px; + cursor: pointer; +} + +.hide-sharing-success-alert:hover { + color: black; +} + +.access-recipient { + height: 40px; + background-color: white; + margin-bottom: 5px; + width: 100%; +} + +.item-is-shared { + cursor: pointer; +} + +.session-entry { + cursor: pointer; + padding: 20px; + border: 1px solid #CCC; + border-radius: 3px; + margin-bottom: 10px; + background-color: white; + font-weight: 500; + color: #394d5c; +} + +.session-entry:hover { + border-color: #00a6ff; +} + +.login-c2a-session-list, .signup-c2a-session-list { + cursor: pointer; + font-size: 15px; + color: #636363; +} + +.login-c2a-session-list:hover, .signup-c2a-session-list:hover { + text-decoration: underline; + ; +} + +/***************************************************** + * Taskbar + *****************************************************/ + +.taskbar { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + background-color: rgba(231, 238, 245, .9); + display: flex; + justify-content: center; + z-index: 99999; + box-shadow: 5px 5px 5px 3px #6e6e6e; + overflow: hidden !important; +} + +.taskbar .taskbar-item { + float: left; + position: relative; + overflow: hidden !important; + transition: background-color 0.2s; + display: none; +} + +.taskbar .taskbar-item-sortable-placeholder, .taskbar .taskbar-item { + width: 40px; + height: 40px; + padding: 6px 5px 10px 5px; +} + +.taskbar .taskbar-item .taskbar-icon { + border-radius: 3px; +} + +.taskbar .taskbar-item, .taskbar .taskbar-item * { + -webkit-user-drag: none; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; +} + +.taskbar-item.ui-sortable-helper { + margin-left: 25px; + z-index: 999999999 !important; +} + +.taskbar .taskbar-item:hover .taskbar-icon { + background-color: rgb(255 255 255 / 40%); + transition: background-color 0.2s; +} + +.taskbar .taskbar-item:active .taskbar-icon, +.taskbar .taskbar-item:focus-within .taskbar-icon, +.taskbar .taskbar-item:focus-visible .taskbar-icon, +.taskbar .taskbar-item:focus .taskbar-icon, +.taskbar-item.has-open-contextmenu .taskbar-icon, +.taskbar-item.has-open-popover .taskbar-icon, +.taskbar .taskbar-item.active .taskbar-icon, +.taskbar-item.ui-sortable-helper .taskbar-icon { + background-color: rgb(255 255 255 / 80%) !important; + transition: background-color 0.2s; + filter: none; +} + +.active-taskbar-indicator { + font-size: 18px; + position: absolute; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + bottom: -6px; + display: none; + width: 9px; + height: 3px; + background-color: #686868; + bottom: 8px; + border-radius: 3px; +} + +.taskbar .taskbar-icon img { + width: 100%; + height: 100%; + filter: drop-shadow(0px 0px 0.2px rgb(51, 51, 51)); + padding: 5px; + box-sizing: border-box; +} + +.taskbar-icon { + height: 40px; +} + +#clock { + display: none; + position: absolute; + right: 10px; +} + +.desktop-bg-settings-wrapper { + display: none; + overflow: hidden; +} + +.desktop-bg-color-block { + width: 25px; + height: 25px; + float: left; + margin: 5px; + border: 1px solid #898989; + box-sizing: border-box; + border-radius: 2px; +} + +@supports ((backdrop-filter: blur())) { + .taskbar { + background-color: #ffffff94; + backdrop-filter: blur(10px); + } + + .taskbar .taskbar-icon img { + filter: drop-shadow(0px 0px 0.5px rgb(51, 51, 51)); + } +} + +.ui-tooltip, .arrow:after { + background-color: rgba(231, 238, 245, .92); + backdrop-filter: blur(3px); +} + +.ui-tooltip { + padding: 5px 10px; + border-radius: 2px; + font: 14px "Helvetica Neue", Sans-Serif; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.455); + background-color: rgba(231, 238, 245, .92); + backdrop-filter: blur(3px); +} + +.arrow { + width: 70px; + height: 16px; + overflow: hidden; + position: absolute; + left: 50%; + margin-left: -35px; + bottom: -16px; + border-top: none; +} + +.arrow.top { + top: -16px; + bottom: auto; +} + +.arrow.left { + left: 20%; +} + +.arrow:after { + content: ""; + position: absolute; + left: 20px; + top: -20px; + width: 25px; + height: 25px; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.arrow.top:after { + bottom: -20px; + top: auto; +} + +/******************************************************/ +.font-selector { + padding: 10px; + border-radius: 2px; + margin: 10px 0; + scroll-margin: 10px 0; +} + +.font-selector-active { + color: white; + background-color: #2b62f1; +} + +/******************************************************/ +/* Window Snapping */ +/******************************************************/ +.window-snap-placeholder { + display: none; + transition: all 0.2s; + position: absolute; + box-sizing: border-box; + padding: 10px; + backdrop-filter: blur(5px); +} + +.window-snap-placeholder-inner { + border-radius: 4px; + width: 100%; + height: 100%; + background-color: rgba(245, 245, 245, 0.7); +} + +/***************************************************** + * Popover + *****************************************************/ + +.popover { + position: absolute; + display: none; + z-index: 9999999; + box-sizing: border-box; + border-radius: 4px; + overflow: hidden; + box-shadow: 0px 0px 15px #00000066; +} + +@supports ((backdrop-filter: blur())) { + .launch-popover { + background-color: rgba(231, 238, 245, .92); + backdrop-filter: blur(3px); + } +} + +.popover-apps-item { + clear: both; + margin-bottom: 10px; + overflow: hidden; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + padding: 5px; + +} + +.popover-apps-item:hover { + background-color: #a5c8f3; + border-radius: 4px; +} + +.popover-apps-item img { + float: left; + filter: drop-shadow(0px 0px 0.75px rgb(51, 51, 51)); +} + +.popover-apps-item span { + line-height: 47px; + display: block; + float: left; + margin-left: 10px; +} + +.device-phone .popover { + height: 100vh; + height: 100dvh; + top: 0 !important; + left: 0 !important; + width: 100%; + padding: 0; + margin: 0; +} + +/***************************************************** + * Notification + *****************************************************/ +.notification { + width: 250px; + height: 54px; + position: absolute; + right: 10px; + background: #ffffffcd; + backdrop-filter: blur(5px); + border-radius: 11px; + z-index: 9999999; + box-shadow: 0px 0px 17px -9px #000; + border: 1px solid #d5d5d5; +} + +.notification-close { + position: absolute; + background: white; + border-radius: 100%; + top: -6px; + left: -6px; + width: 13px; + padding: 2px; + filter: drop-shadow(0px 0px 0.5px rgb(51, 51, 51)); + z-index: 99999999; + display: none; +} + +.notification:hover .notification-close { + display: block; +} + +/***************************************************** + * Start + *****************************************************/ +.launch-popover { + width: 530px; + height: 500px; + padding: 20px 20px 20px; + border: 1px solid #bbc2c9; + border-radius: 4px; + background-color: rgba(231, 238, 245, .92); + backdrop-filter: blur(3px); + box-sizing: border-box; + overflow-y: scroll; +} + +.close-launch-popover { + position: absolute; + top: 5px; + right: 10px; + padding: 5px; + display: none; +} + +.device-phone .close-launch-popover { + display: block; +} + +.device-phone .launch-popover { + width: 100vw; + height: 100vh; + height: 100dvh; + background-color: rgba(231, 238, 245); +} + +.start-section-heading { + font-size: 13px; + margin: 0; + padding: 0; + height: 15px; + margin-left: 5px; + margin-right: 5px; + border-bottom: 1px solid #CCC; + padding-bottom: 10px; + color: #677a86; + clear: both; +} + +.start-app-card { + height: 100px; + width: 20%; + float: left; + display: flex; + flex-direction: column; + justify-content: center; + box-sizing: content-box; +} + +.start-app { + width: 70px; + height: 70px; + text-align: center; + overflow: hidden; + margin: 0 auto; + padding: 5px; + display: flex; + flex-direction: column; + justify-content: center; + border-radius: 4px; + transition: 0.1s background-color; +} + +.start-app-icon { + filter: drop-shadow(0px 0px 0.5px rgb(51, 51, 51)); + display: block; + margin: 0 auto; + width: 32px; + height: 32px; + margin-top: 2px; +} + +.start-app.ui-draggable-dragging { + background-color: transparent !important; + width: 40px !important; + height: 40px !important; +} + +.start-app.ui-draggable-dragging img { + width: 26px !important; + height: 26px !important; +} + +.start-app.ui-draggable-dragging .start-app-title { + display: none; +} + +.start-app:hover, .launch-app-selected .start-app { + background-color: #ffffff; +} + +.start-app:active { + background-color: white; +} + +.start-app-title { + font-size: 13px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-overflow: ellipsis; + display: block; + margin-top: 8px; + width: 100%; + box-sizing: border-box; + white-space: nowrap; + overflow: hidden; +} + +/* UIWindowEmailConfirmationRequired */ +.digit-input { + box-sizing: border-box; + width: 12.89%; + height: 50px; + font-size: 25px; + text-align: center; + border-radius: 0.5rem; + -moz-appearance: textfield; + border: 2px solid #9b9b9b; + color: #485660; +} + +.digit-input::-webkit-outer-spin-button, +.digit-input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +.pulse { + display: block; + float: left; + width: 5px; + height: 5px; + border-radius: 50%; + background: #ffffff; + animation: pulse-white 1.5s infinite; + margin: 0; + margin-top: 8px; +} + +.forgot-password-link { + cursor: pointer; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-size: 13px; +} + +.forgot-password-link:hover { + text-decoration: underline; +} + +.pulse-dark { + display: block; + float: left; + width: 5px; + height: 5px; + border-radius: 50%; + background: #3f3f3f; + cursor: pointer; + animation: pulse-dark 1.5s infinite; + margin-top: -7px; + margin-left: 7px; +} + +.context-menu-item-icon-active .pulse { + margin-top: -7px; + margin-left: 7px; +} + +.qr-code-window-close-btn, .generic-close-window-button { + position: absolute; + top: 0px; + right: 0; + font-size: 20px; + cursor: pointer !important; + color: #5f626d; + opacity: 0.5; + cursor: initial; + padding: 2px 10px 0 10px; +} + +.qr-code-window-close-btn:hover, .generic-close-window-button { + opacity: 1; +} + +.otp-qr-code { + width: 100%; + display: flex; + justify-content: center; + flex-direction: column; + align-items: center; + height: 320px; +} + +.otp-qr-code img { + width: 155px; +} + +.perm-title { + text-align: center; + margin-top: 0; + padding-bottom: 15px; + font-size: 20px; + font-weight: 400; + margin-bottom: 10px; + color: #4b586a; + text-shadow: 1px 1px #ffffff1c; +} + +.perm-description { + text-align: center; + font-size: 15px; + -webkit-font-smoothing: antialiased; + padding: 0 10px; + color: #2d3847; + margin-top: 5px; + margin-bottom: 5px; +} + +@-webkit-keyframes pulse-white { + 0% { + -webkit-box-shadow: 0 0 0 0 rgb(255, 255, 255); + } + + 70% { + -webkit-box-shadow: 0 0 0 px rgba(204, 169, 44, 0); + } + + 100% { + -webkit-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0); + } +} + +@keyframes pulse-white { + 0% { + -moz-box-shadow: 0 0 0 0 rgb(255, 255, 255); + box-shadow: 0 0 0 0 rgb(255, 255, 255); + } + + 70% { + -moz-box-shadow: 0 0 0 6px rgba(204, 169, 44, 0); + box-shadow: 0 0 0 6px rgba(204, 169, 44, 0); + } + + 100% { + -moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0); + box-shadow: 0 0 0 0 rgba(204, 169, 44, 0); + } +} + +@-webkit-keyframes pulse-dark { + 0% { + -webkit-box-shadow: 0 0 0 0 #3f3f3f; + } + + 70% { + -webkit-box-shadow: 0 0 0 6px #0267ff00; + } + + 100% { + -webkit-box-shadow: 0 0 0 0 #0267ff00; + } +} + +@keyframes pulse-dark { + 0% { + -moz-box-shadow: 0 0 0 0 #3f3f3f; + box-shadow: 0 0 0 0 #3f3f3f; + } + + 70% { + -moz-box-shadow: 0 0 0 6px #0267ff00; + box-shadow: 0 0 0 6px #0267ff00; + } + + 100% { + -moz-box-shadow: 0 0 0 0 #0267ff00; + box-shadow: 0 0 0 0 #0267ff00; + } +} + +.upload-progress-bar-container, .download-progress-bar-container { + width: 100%; + height: 15px; + border: 1px solid rgb(40 109 157); + background-color: white; + box-shadow: inset -1px 3px 4px #dfdfdf; +} + +.upload-progress-bar, .download-progress-bar { + width: 0; + height: 15px; + background-color: rgb(0 137 255); + transition: 0.4s width; + background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05)); +} + +/* Hide scrollbar for Chrome, Safari and Opera */ +.hide-scrollbar::-webkit-scrollbar { + width: 0 !important; + display: none; +} + +/* Hide scrollbar for IE, Edge and Firefox */ +.hide-scrollbar { + -ms-overflow-style: none; + /* IE and Edge */ + scrollbar-width: none; + /* Firefox */ +} + +/******************************************************/ +.allow-user-select, .allow-user-select * { + user-select: text; +} + +@keyframes spin { + to { + -webkit-transform: rotate(360deg); + } +} + +@-webkit-keyframes spin { + to { + -webkit-transform: rotate(360deg); + } +} + +@supports ((backdrop-filter: blur())) { + .window-head { + background-color: rgba(231, 238, 245, .80); + backdrop-filter: blur(10px); + } + + .device-phone .window-head { + background-color: rgba(231, 238, 245); + backdrop-filter: blur(10px); + } + + .window-sidebar { + background-color: rgb(231 238 245 / 91%); + backdrop-filter: blur(10px); + } + + .window-snap-placeholder { + backdrop-filter: blur(5px); + } + + .context-menu { + background-color: rgb(255 255 255 / 92%); + backdrop-filter: blur(3px); + } + + .popover:not(.device-phone .popover) { + background-color: rgb(238, 243, 248); + backdrop-filter: blur(10px); + } +} + +@-moz-keyframes three-quarters-loader { + 0% { + -moz-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -moz-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@-webkit-keyframes three-quarters-loader { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes three-quarters-loader { + 0% { + -moz-transform: rotate(0deg); + -ms-transform: rotate(0deg); + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -moz-transform: rotate(360deg); + -ms-transform: rotate(360deg); + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +.hidden { + display: none; +} + +.invisible { + visibility: hidden; +} + +.login-progress { + height: 200px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.dl-conf-item-attr { + width: 60px; + text-align: right; + display: inline-block; + margin-right: 10px; +} + +.launch-search { + border-radius: 5px; + background-repeat: no-repeat; + width: 100%; + box-sizing: border-box; + background-color: white; + padding: 5px; + background-size: 20px; + background-position-y: center; + background-position-x: 5px; + padding-left: 35px; + padding-right: 35px; + border: 2px solid #CCC; +} + +.launch-search-clear { + display: none; + position: absolute; + right: 10px; + top: 8px; + opacity: 0.5; +} + +.launch-search-clear:hover { + opacity: 1; +} + +.launch-app-selected {} + + +.website-badge-popover-title { + font-size: 14px; + margin: -10px; + margin-bottom: 5px; + padding: 8px 10px; + background: #e5e5e5; + color: #4b5f6f; +} + +.website-badge-popover-content { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + width: 270px; + padding: 10px; +} + +.website-badge-popover-link, .website-badge-popover-link:visited { + color: #0073ed; + text-decoration: none; + width: 179px; +} + +.website-badge-popover-link:hover { + text-decoration: underline; +} + +/*! + * animate.css - https://animate.style/ + * Version - 4.1.1 + * Licensed under the MIT license - http://opensource.org/licenses/MIT + * + * Copyright (c) 2020 Animate.css + */ +:root { + --animate-duration: 1s; + --animate-delay: 1s; + --animate-repeat: 1; +} + +.animate__animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-duration: var(--animate-duration); + animation-duration: var(--animate-duration); + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +/* Zooming entrances */ +@-webkit-keyframes zoomIn { + from { + opacity: 0; + -webkit-transform: scale3d(0.3, 0.3, 0.3); + transform: scale3d(0.3, 0.3, 0.3); + } + + 50% { + opacity: 1; + } +} + +@keyframes zoomIn { + from { + opacity: 0; + -webkit-transform: scale3d(0.3, 0.3, 0.3); + transform: scale3d(0.3, 0.3, 0.3); + } + + 50% { + opacity: 1; + } +} + +.animate__zoomIn { + -webkit-animation-name: zoomIn; + animation-name: zoomIn; +} + +@-webkit-keyframes fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + + to { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + + to { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.animate__fadeInRight { + -webkit-animation-name: fadeInRight; + animation-name: fadeInRight; +} + +.animate__animated.animate__slow { + -webkit-animation-duration: calc(1s * 2); + animation-duration: calc(1s * 2); + -webkit-animation-duration: calc(var(--animate-duration) * 2); + animation-duration: calc(var(--animate-duration) * 2); +} + +@-webkit-keyframes fadeOutRight { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +@keyframes fadeOutRight { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +.animate__fadeOutRight { + -webkit-animation-name: fadeOutRight; + animation-name: fadeOutRight; +} + +:root { + --animate-duration: 300ms; + /* --animate-delay: 0.9s; */ +} + +.animate__animated.animate__faster { + -webkit-animation-duration: calc(1s / 2); + animation-duration: calc(1s / 2); + -webkit-animation-duration: calc(var(--animate-duration) / 2); + animation-duration: calc(var(--animate-duration) / 2); +} + +.antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.share-copy-link-on-social { + float: right; + width: 30px; + cursor: pointer; + margin-top: 2px; +} + +.copy-link-social-btn { + margin: 10px; + display: inline-block; + width: 20px; + height: 20px; +} + +.copy-link-social-btn img { + width: 20px; + height: 20px; +} + + +.puter-auth-dialog { + outline: none; + display: block; + width: 100% !important; +} + +.puter-auth-dialog { + outline: none; +} + +.puter-auth-dialog-content { + border: 1px solid #e8e8e8; + border-radius: 8px; + padding: 20px; + background: white; + box-shadow: 0 0 9px 1px rgb(0 0 0 / 21%); + padding: 80px 20px; + -webkit-font-smoothing: antialiased; + color: #575762; + position: relative; + background-image: url('data:image/webp;base64,UklGRlAbAABXRUJQVlA4WAoAAAAwAAAA8AIArQEAQUxQSB0AAAABB1ChiAgAKNL//xTR/9T//ve///3vf//73/+ZAwBWUDggDBsAAHAjAZ0BKvECrgE+nUyfTKWkMKsjk3mqEBOJaW6WwjzR/6prSfc95r2ztLOrL7Qmk8WYj6B+qfKm8C//+ufPmvfz/L6dZ/lf/79Rn1D/u8lf1n/h51GW/9DvL9u3/+z8//rLz8rv/Ho91qL//9Tf3+Dt29xsj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LAxtLFUEnwaQ18gb3wxUYIJwE3VkfXA/shqyDSb1+jNg5uBJmQyEgTBHjmHRoLIe/Woh58xTbLtb7IrXITJgvZmFXeSbhjd7ms2Kb0DyyDFPDz1pxEk2VO13dfjgNzw4rRZXDGNxKdW4V8x0ZqfMrs48cLI/j1eOqmLvo3k6gkaYRfrs1ngoVMqazzJrkJYFz8WmsD+K1eEp/LqNxUkodWrAq885E8VeIULxp0u3xb1m7uUnyrHzshPXSnGCDUaxFj6UxoYG6a3Ga7OYz0Sdnw+dQk230G0weEIt9GN3BpWOiGAJZ69w4jr2D+6RkhzNmnY9n1qV05DE1BflAzIDxsPW78jJAFiz5aARulRgVFwgBnMuPWxvLmIXBvAAHy65muvCAsGfVex4ZHKCCv6XnQ2OW9EURTQsdw7Gb8bz9teGINBk3/fz0oAJ5e9QAAAA=='); + background-repeat: no-repeat; + background-position: center center; + background-size: 100% 100%; + background-color: #fff; + height: 100%; + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.puter-auth-dialog * { + max-width: 500px; + font-family: "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif; +} + +.puter-auth-dialog p.about { + text-align: center; + font-size: 17px; + padding: 10px 30px; + font-weight: 400; + -webkit-font-smoothing: antialiased; + color: #404048; + box-sizing: border-box; +} + +.puter-auth-dialog .buttons { + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + margin-top: 20px; + text-align: center; + margin-bottom: 20px; +} + +.launch-auth-popup-footnote { + font-size: 11px; + color: #666; + margin-top: 10px; + /* footer at the bottom */ + position: absolute; + left: 0; + right: 0; + bottom: 10px; + text-align: center; + margin: 0 10px; +} + +.signup-terms { + font-size: 11px; + color: #666; + margin-top: 10px; + bottom: 10px; + text-align: center; + margin: 10px 0 15px; +} + +.puter-auth-dialog .close-btn { + position: absolute; + right: 15px; + top: 10px; + font-size: 17px; + color: #8a8a8a; + cursor: pointer; +} + +.puter-auth-dialog .close-btn:hover { + color: #000; +} + +/** + * ------------------------------------ + * Button + * ------------------------------------ + */ + +.puter-auth-dialog .button { + color: #666666; + background-color: #eeeeee; + border-color: #eeeeee; + font-size: 14px; + text-decoration: none; + text-align: center; + line-height: 40px; + height: 35px; + padding: 0 30px; + margin: 0; + display: inline-block; + appearance: none; + cursor: pointer; + border: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border-color: #b9b9b9; + border-style: solid; + border-width: 1px; + line-height: 35px; + background: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e1e1e1)); + background: linear-gradient(#f6f6f6, #e1e1e1); + -webkit-box-shadow: inset 0px 1px 0px rgb(255 255 255 / 30%), 0 1px 2px rgb(0 0 0 / 15%); + box-shadow: inset 0px 1px 0px rgb(255 255 255 / 30%), 0 1px 2px rgb(0 0 0 / 15%); + border-radius: 4px; + outline: none; + -webkit-font-smoothing: antialiased; +} + +.puter-auth-dialog .button:focus-visible { + border-color: rgb(118 118 118); +} + +.puter-auth-dialog .button:active, .puter-auth-dialog .button.active, .puter-auth-dialog .button.is-active, .puter-auth-dialog .button.has-open-contextmenu { + text-decoration: none; + background-color: #eeeeee; + border-color: #cfcfcf; + color: #a9a9a9; + -webkit-transition-duration: 0s; + transition-duration: 0s; + -webkit-box-shadow: inset 0 1px 3px rgb(0 0 0 / 20%); + box-shadow: inset 0px 2px 3px rgb(0 0 0 / 36%), 0px 1px 0px white; +} + +.puter-auth-dialog .button.disabled, .puter-auth-dialog .button.is-disabled, .puter-auth-dialog .button:disabled { + top: 0 !important; + background: #EEE !important; + border: 1px solid #DDD !important; + text-shadow: 0 1px 1px white !important; + color: #CCC !important; + cursor: default !important; + appearance: none !important; + pointer-events: none; +} + +.puter-auth-dialog .button-action.disabled, .puter-auth-dialog .button-action.is-disabled, .puter-auth-dialog .button-action:disabled { + background: #55a975 !important; + border: 1px solid #60ab7d !important; + text-shadow: none !important; + color: #CCC !important; +} + +.puter-auth-dialog .button-primary.disabled, .puter-auth-dialog .button-primary.is-disabled, .puter-auth-dialog .button-primary:disabled { + background: #8fc2e7 !important; + border: 1px solid #98adbd !important; + text-shadow: none !important; + color: #f5f5f5 !important; +} + +.puter-auth-dialog .button-block { + width: 100%; +} + +.puter-auth-dialog .button-primary { + border-color: #088ef0; + background: -webkit-gradient(linear, left top, left bottom, from(#34a5f8), to(#088ef0)); + background: linear-gradient(#34a5f8, #088ef0); + color: white; +} + +.puter-auth-dialog .button-danger { + border-color: #f00808; + background: -webkit-gradient(linear, left top, left bottom, from(#f83434), to(#f00808)); + background: linear-gradient(#f83434, #f00808); + color: white; +} + +.puter-auth-dialog .button-primary:active, +.puter-auth-dialog .button-primary.active, +.puter-auth-dialog .button-primary.is-active, +.puter-auth-dialog .button-primary-flat:active, +.puter-auth-dialog .button-primary-flat.active, +.puter-auth-dialog .button-primary-flat.is-active { + background-color: #2798eb; + border-color: #2798eb; + color: #bedef5; +} + +.puter-auth-dialog .button-action { + border-color: #08bf4e; + background: -webkit-gradient(linear, left top, left bottom, from(#29d55d), to(#1ccd60)); + background: linear-gradient(#29d55d, #1ccd60); + color: white; +} + +.puter-auth-dialog .button-action:active, +.puter-auth-dialog .button-action.active, +.puter-auth-dialog .button-action.is-active, +.puter-auth-dialog .button-action-flat:active, +.puter-auth-dialog .button-action-flat.active, +.puter-auth-dialog .button-action-flat.is-active { + background-color: #27eb41; + border-color: #27eb41; + color: #bef5ca; +} + +.puter-auth-dialog .button-giant { + font-size: 28px; + height: 70px; + line-height: 70px; + padding: 0 70px; +} + +.puter-auth-dialog .button-jumbo { + font-size: 24px; + height: 60px; + line-height: 60px; + padding: 0 60px; +} + +.puter-auth-dialog .button-large { + font-size: 20px; + height: 50px; + line-height: 50px; + padding: 0 50px; +} + +.puter-auth-dialog .button-normal { + font-size: 16px; + height: 40px; + line-height: 38px; + padding: 0 40px; +} + +.puter-auth-dialog .button-small { + height: 30px; + line-height: 29px; + padding: 0 30px; +} + +.puter-auth-dialog .button-tiny { + font-size: 9.6px; + height: 24px; + line-height: 24px; + padding: 0 24px; +} + +#launch-auth-popup { + margin-left: 10px; + width: 200px; + font-weight: 500; + font-size: 15px; +} + +.puter-auth-dialog .button-auth { + margin-bottom: 10px; +} + +.puter-auth-dialog a, .puter-auth-dialog a:visited { + color: rgb(0 69 238); + text-decoration: none; +} + +.puter-auth-dialog a:hover { + text-decoration: underline; +} + +@media (max-width:480px) { + .puter-auth-dialog-content { + padding: 50px 20px; + } + + .puter-auth-dialog .buttons { + flex-direction: column-reverse; + } + + .puter-auth-dialog p.about { + padding: 10px 0; + } + + .puter-auth-dialog .button-auth { + width: 100% !important; + margin: 0 !important; + margin-bottom: 10px !important; + } +} + +.loading { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + background-color: #ebebebc2; + display: flex; + justify-content: center; + align-items: center; + display: none; +} \ No newline at end of file diff --git a/src/favicon.ico b/src/favicon.ico new file mode 100644 index 00000000..fb6850b9 Binary files /dev/null and b/src/favicon.ico differ diff --git a/src/favicons/android-icon-144x144.png b/src/favicons/android-icon-144x144.png new file mode 100644 index 00000000..d88ef895 Binary files /dev/null and b/src/favicons/android-icon-144x144.png differ diff --git a/src/favicons/android-icon-192x192.png b/src/favicons/android-icon-192x192.png new file mode 100644 index 00000000..18c2afb5 Binary files /dev/null and b/src/favicons/android-icon-192x192.png differ diff --git a/src/favicons/android-icon-36x36.png b/src/favicons/android-icon-36x36.png new file mode 100644 index 00000000..6ea7d639 Binary files /dev/null and b/src/favicons/android-icon-36x36.png differ diff --git a/src/favicons/android-icon-48x48.png b/src/favicons/android-icon-48x48.png new file mode 100644 index 00000000..839af37e Binary files /dev/null and b/src/favicons/android-icon-48x48.png differ diff --git a/src/favicons/android-icon-72x72.png b/src/favicons/android-icon-72x72.png new file mode 100644 index 00000000..39dea976 Binary files /dev/null and b/src/favicons/android-icon-72x72.png differ diff --git a/src/favicons/android-icon-96x96.png b/src/favicons/android-icon-96x96.png new file mode 100644 index 00000000..a2c800a8 Binary files /dev/null and b/src/favicons/android-icon-96x96.png differ diff --git a/src/favicons/apple-icon-114x114.png b/src/favicons/apple-icon-114x114.png new file mode 100644 index 00000000..f614ac1f Binary files /dev/null and b/src/favicons/apple-icon-114x114.png differ diff --git a/src/favicons/apple-icon-120x120.png b/src/favicons/apple-icon-120x120.png new file mode 100644 index 00000000..974bf403 Binary files /dev/null and b/src/favicons/apple-icon-120x120.png differ diff --git a/src/favicons/apple-icon-144x144.png b/src/favicons/apple-icon-144x144.png new file mode 100644 index 00000000..cfc5754d Binary files /dev/null and b/src/favicons/apple-icon-144x144.png differ diff --git a/src/favicons/apple-icon-152x152.png b/src/favicons/apple-icon-152x152.png new file mode 100644 index 00000000..e75238c1 Binary files /dev/null and b/src/favicons/apple-icon-152x152.png differ diff --git a/src/favicons/apple-icon-180x180.png b/src/favicons/apple-icon-180x180.png new file mode 100644 index 00000000..4018c4c8 Binary files /dev/null and b/src/favicons/apple-icon-180x180.png differ diff --git a/src/favicons/apple-icon-57x57.png b/src/favicons/apple-icon-57x57.png new file mode 100644 index 00000000..5847a33d Binary files /dev/null and b/src/favicons/apple-icon-57x57.png differ diff --git a/src/favicons/apple-icon-60x60.png b/src/favicons/apple-icon-60x60.png new file mode 100644 index 00000000..9b6da6c5 Binary files /dev/null and b/src/favicons/apple-icon-60x60.png differ diff --git a/src/favicons/apple-icon-72x72.png b/src/favicons/apple-icon-72x72.png new file mode 100644 index 00000000..d37a8c39 Binary files /dev/null and b/src/favicons/apple-icon-72x72.png differ diff --git a/src/favicons/apple-icon-76x76.png b/src/favicons/apple-icon-76x76.png new file mode 100644 index 00000000..84788d5d Binary files /dev/null and b/src/favicons/apple-icon-76x76.png differ diff --git a/src/favicons/apple-icon-precomposed.png b/src/favicons/apple-icon-precomposed.png new file mode 100644 index 00000000..5eb45b11 Binary files /dev/null and b/src/favicons/apple-icon-precomposed.png differ diff --git a/src/favicons/apple-icon.png b/src/favicons/apple-icon.png new file mode 100644 index 00000000..5eb45b11 Binary files /dev/null and b/src/favicons/apple-icon.png differ diff --git a/src/favicons/browserconfig.xml b/src/favicons/browserconfig.xml new file mode 100644 index 00000000..c5541482 --- /dev/null +++ b/src/favicons/browserconfig.xml @@ -0,0 +1,2 @@ + +#ffffff \ No newline at end of file diff --git a/src/favicons/favicon-16x16.png b/src/favicons/favicon-16x16.png new file mode 100644 index 00000000..5335cd1d Binary files /dev/null and b/src/favicons/favicon-16x16.png differ diff --git a/src/favicons/favicon-32x32.png b/src/favicons/favicon-32x32.png new file mode 100644 index 00000000..a24dfc5a Binary files /dev/null and b/src/favicons/favicon-32x32.png differ diff --git a/src/favicons/favicon-96x96.png b/src/favicons/favicon-96x96.png new file mode 100644 index 00000000..50907041 Binary files /dev/null and b/src/favicons/favicon-96x96.png differ diff --git a/src/favicons/favicon.ico b/src/favicons/favicon.ico new file mode 100644 index 00000000..f0e2d698 Binary files /dev/null and b/src/favicons/favicon.ico differ diff --git a/src/favicons/manifest.json b/src/favicons/manifest.json new file mode 100644 index 00000000..013d4a6a --- /dev/null +++ b/src/favicons/manifest.json @@ -0,0 +1,41 @@ +{ + "name": "App", + "icons": [ + { + "src": "\/android-icon-36x36.png", + "sizes": "36x36", + "type": "image\/png", + "density": "0.75" + }, + { + "src": "\/android-icon-48x48.png", + "sizes": "48x48", + "type": "image\/png", + "density": "1.0" + }, + { + "src": "\/android-icon-72x72.png", + "sizes": "72x72", + "type": "image\/png", + "density": "1.5" + }, + { + "src": "\/android-icon-96x96.png", + "sizes": "96x96", + "type": "image\/png", + "density": "2.0" + }, + { + "src": "\/android-icon-144x144.png", + "sizes": "144x144", + "type": "image\/png", + "density": "3.0" + }, + { + "src": "\/android-icon-192x192.png", + "sizes": "192x192", + "type": "image\/png", + "density": "4.0" + } + ] +} \ No newline at end of file diff --git a/src/favicons/ms-icon-144x144.png b/src/favicons/ms-icon-144x144.png new file mode 100644 index 00000000..cfc5754d Binary files /dev/null and b/src/favicons/ms-icon-144x144.png differ diff --git a/src/favicons/ms-icon-150x150.png b/src/favicons/ms-icon-150x150.png new file mode 100644 index 00000000..ca07e8ea Binary files /dev/null and b/src/favicons/ms-icon-150x150.png differ diff --git a/src/favicons/ms-icon-310x310.png b/src/favicons/ms-icon-310x310.png new file mode 100644 index 00000000..3d60fdcd Binary files /dev/null and b/src/favicons/ms-icon-310x310.png differ diff --git a/src/favicons/ms-icon-70x70.png b/src/favicons/ms-icon-70x70.png new file mode 100644 index 00000000..172a3ba6 Binary files /dev/null and b/src/favicons/ms-icon-70x70.png differ diff --git a/src/globals.js b/src/globals.js new file mode 100644 index 00000000..591436ba --- /dev/null +++ b/src/globals.js @@ -0,0 +1,143 @@ +window.clipboard_op = ''; +window.clipboard = []; +window.window_nav_history = {}; +window.window_nav_history_current_position = {}; +window.progress_tracker = []; +window.upload_item_global_id = 0; + +window.download_progress = []; +window.download_item_global_id = 0; + +window.TRUNCATE_LENGTH = 20; + +// This is the minimum width of the window for the sidebar to be shown +window.window_width_threshold_for_sidebar = 500; + +// the window over which mouse is hovering +window.mouseover_window = null; + +// an active itewm container is the one where keyboard events should work (arrow keys, ...) +window.active_item_container = null; + +window.mouseX = 0; +window.mouseY = 0; + +// get all logged-in users +try{ + window.logged_in_users = JSON.parse(localStorage.getItem("logged_in_users")); +}catch(e){ + window.logged_in_users = []; +} +if(window.logged_in_users === null) + window.logged_in_users = []; + +// this sessions's user +window.auth_token = localStorage.getItem("auth_token"); +try{ + window.user = JSON.parse(localStorage.getItem("user")); +}catch(e){ + window.user = null; +} + +// in case this is the first time user is visiting multi-user feature +if(window.logged_in_users.length === 0 && window.user !== null){ + let tuser = window.user; + tuser.auth_token = window.auth_token + window.logged_in_users.push(tuser); + localStorage.setItem("logged_in_users", window.logged_in_users); +} + +window.last_window_zindex = 1; + +// first visit tracker +window.first_visit_ever = localStorage.getItem("has_visited_before") === null ? true : false; +localStorage.setItem("has_visited_before", true); + +// system paths +if(window.user !== undefined && window.user !== null){ + window.desktop_path = '/' + window.user.username + '/Desktop'; + window.trash_path = '/' + window.user.username + '/Trash'; + window.appdata_path = '/' + window.user.username + '/AppData'; + window.documents_path = '/' + window.user.username + '/Documents'; + window.pictures_path = '/' + window.user.username + '/Photos'; + window.videos_path = '/' + window.user.username + '/Videos'; + window.audio_path = '/' + window.user.username + '/Audio'; + window.home_path = '/' + window.user.username; +} +window.root_dirname = 'Puter'; + +window.window_stack = [] +window.toolbar_height = 30; +window.default_taskbar_height = 50; +window.taskbar_height = window.default_taskbar_height; +window.upload_progress_hide_delay = 500; +window.active_uploads = {}; +window.copy_progress_hide_delay = 1000; +window.busy_indicator_hide_delay = 600; +window.global_element_id = 0; +window.operation_id = 0; +window.operation_cancelled = []; +window.last_enter_pressed_to_rename_ts = 0; +window.window_counter = 0; +window.keypress_item_seach_term = ''; +window.keypress_item_seach_buffer_timeout = undefined; +window.first_visit_animation = false; +window.show_twitter_link = true; +window.animate_window_opening = true; +window.animate_window_closing = true; +window.desktop_loading_fade_delay = (window.first_visit_ever && first_visit_animation ? 6000 : 1000); +window.watchItems = []; +window.appdata_signatures = {}; +window.appCallbackFunctions = []; + +// 'Launch' apps +window.launch_apps = []; +window.launch_apps.recent = [] +window.launch_apps.recommended = [] + +// Is puter being loaded inside an iframe? +if (window.location !== window.parent.location) { + window.is_embedded = true; + // taskbar is not needed in embedded mode + window.taskbar_height = 0; +} else { + window.is_embedded = false; +} + +// calculate desktop height and width +window.desktop_height = window.innerHeight - window.toolbar_height - window.taskbar_height; +window.desktop_width = window.innerWidth; + +// recalculate desktop height and width on window resize +$( window ).on( "resize", function() { + window.desktop_height = window.innerHeight - window.toolbar_height - window.taskbar_height; + window.desktop_width = window.innerWidth; +}); + +// for now `active_element` is basically the last element that was clicked, +// later on though (todo) `active_element` will also be set by keyboard movements +// such as arrow keys, tab key, ... and when creating new windows... +window.active_element = null; + +// The number of recent apps to show in the launch menu +window.launch_recent_apps_count = 10; + +// indicated if the mouse is in one of the window snap zones or not +// if yes, which one? +window.current_active_snap_zone = undefined; + +// +window.is_fullpage_mode = false; + +window.window_border_radius = 4; + +window.sites = []; + +window.feature_flags = { + // if true, the user will be able to create shortcuts to files and directories + create_shortcut: true, + // if true, the user will be asked to confirm before navigating away from Puter only if there is at least one window open + prompt_user_when_navigation_away_from_puter: false, + // if true, the user will be able to zip and download directories + download_directory: true, +} diff --git a/src/helpers.js b/src/helpers.js new file mode 100644 index 00000000..5b4c5696 --- /dev/null +++ b/src/helpers.js @@ -0,0 +1,3241 @@ +import path from "./lib/path.js" +import mime from "./lib/mime.js"; +import UIAlert from './UI/UIAlert.js' +import UIItem from './UI/UIItem.js' +import UIWindow from './UI/UIWindow.js' +import UIWindowLogin from './UI/UIWindowLogin.js'; +import UIWindowSaveAccount from './UI/UIWindowSaveAccount.js'; +import UIWindowConfirmDownload from './UI/UIWindowConfirmDownload.js'; +import UIWindowCopyProgress from './UI/UIWindowCopyProgress.js'; +import UIWindowMoveProgress from './UI/UIWindowMoveProgress.js'; +import UIWindowNewFolderProgress from './UI/UIWindowNewFolderProgress.js'; +import UIWindowDownloadProgress from './UI/UIWindowDownloadProgress.js'; +import UIWindowUploadProgress from './UI/UIWindowUploadProgress.js'; +import UIWindowProgressEmptyTrash from './UI/UIWindowProgressEmptyTrash.js'; +import download from './helpers/download.js'; +import update_username_in_gui from './helpers/update_username_in_gui.js'; +import update_title_based_on_uploads from './helpers/update_title_based_on_uploads.js'; +import content_type_to_icon from './helpers/content_type_to_icon.js'; +import UIWindowDownloadDirProg from './UI/UIWindowDownloadDirProg.js'; + +window.is_auth = ()=>{ + if(localStorage.getItem("auth_token") === null || auth_token === null) + return false; + else + return true; +} + +window.suggest_apps_for_fsentry = async (options)=>{ + let res = await $.ajax({ + url: api_origin + "/suggest_apps", + type: 'POST', + contentType: "application/json", + data: JSON.stringify({ + uid: options.uid ?? undefined, + path: options.path ?? undefined, + }), + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (res){ + if(options.onSuccess && typeof options.onSuccess == "function") + options.onSuccess(res); + } + }); + + return res; +} + +/** + * Formats a binary-byte integer into the human-readable form with units. + * + * @param {integer} bytes + * @returns + */ +window.byte_format = (bytes)=>{ + const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; + if (bytes === 0) return '0 Byte'; + const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); + return (bytes / Math.pow(1024, i)).toFixed(2) + ' ' + sizes[i]; +}; + +/** + * A function that generates a UUID (Universally Unique Identifier) using the version 4 format, + * which are random UUIDs. It uses the cryptographic number generator available in modern browsers. + * + * The generated UUID is a 36 character string (32 alphanumeric characters separated by 4 hyphens). + * It follows the pattern: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where x is any hexadecimal digit + * and y is one of 8, 9, A, or B. + * + * @returns {string} Returns a new UUID v4 string. + * + * @example + * + * let id = window.uuidv4(); // Generate a new UUID + * + */ +window.uuidv4 = ()=>{ + return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c => + (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) + ); +} + +/** + * Checks if the provided string is a valid email format. + * + * @function + * @global + * @param {string} email - The email string to be validated. + * @returns {boolean} `true` if the email is valid, otherwise `false`. + * @example + * window.is_email("test@example.com"); // true + * window.is_email("invalid-email"); // false + */ +window.is_email = (email) => { + const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + return re.test(String(email).toLowerCase()); +} + +/** + * A function that truncates a file name if it exceeds a certain length, while preserving the file extension. + * An ellipsis character '…' is added to indicate the truncation. If the original filename is short enough, + * it is returned unchanged. + * + * @param {string} input - The original filename to be potentially truncated. + * @param {number} max_length - The maximum length for the filename. If the original filename (excluding the extension) exceeds this length, it will be truncated. + * + * @returns {string} The truncated filename with preserved extension if original filename is too long; otherwise, the original filename. + * + * @example + * + * let truncatedFilename = window.truncate_filename('really_long_filename.txt', 10); + * // truncatedFilename would be something like 'really_lo…me.txt' + * + */ +window.truncate_filename = (input, max_length)=>{ + const extname = path.extname('/' + input); + + if ((input.length - 15) > max_length){ + if(extname !== '') + return input.substring(0, max_length) + '…' + input.slice(-1 * (extname.length + 2)); + else + return input.substring(0, max_length) + '…'; + } + return input; +}; + +/** + * A function that scrolls the parent element so that the child element is in view. + * If the child element is already in view, no scrolling occurs. + * The function decides the best scroll direction based on which requires the smaller adjustment. + * + * @param {HTMLElement} parent - The parent HTML element that might be scrolled. + * @param {HTMLElement} child - The child HTML element that should be made viewable. + * + * @returns {void} + * + * @example + * + * let parentElem = document.querySelector('#parent'); + * let childElem = document.querySelector('#child'); + * window.scrollParentToChild(parentElem, childElem); + * // Scrolls parentElem so that childElem is in view + * + */ +window.scrollParentToChild = (parent, child)=>{ + // Where is the parent on page + var parentRect = parent.getBoundingClientRect(); + + // What can you see? + var parentViewableArea = { + height: parent.clientHeight, + width: parent.clientWidth + }; + + // Where is the child + var childRect = child.getBoundingClientRect(); + // Is the child viewable? + var isViewable = (childRect.top >= parentRect.top) && (childRect.bottom <= parentRect.top + parentViewableArea.height); + + // if you can't see the child try to scroll parent + if (!isViewable) { + // Should we scroll using top or bottom? Find the smaller ABS adjustment + const scrollTop = childRect.top - parentRect.top; + const scrollBot = childRect.bottom - parentRect.bottom; + if (Math.abs(scrollTop) < Math.abs(scrollBot)) { + // we're near the top of the list + parent.scrollTop += (scrollTop + 80); + } else { + // we're near the bottom of the list + parent.scrollTop += (scrollBot + 80); + } + } +} + +window.getItem = async function(options){ + return $.ajax({ + url: api_origin + "/getItem", + type: 'POST', + data: JSON.stringify({ + key: options.key, + app: options.app_uid, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (result){ + if(options.success && typeof(options.success) === "function") + options.success(result); + } + }) +} + +window.setItem = async function(options){ + return $.ajax({ + url: api_origin + "/setItem", + type: 'POST', + data: JSON.stringify({ + app: options.app_uid, + key: options.key, + value: options.value, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (fsentry){ + if(options.success && typeof(options.success) === "function") + options.success(fsentry) + } + }) +} + +/** + * Converts a glob pattern to a regular expression, with optional extended or globstar matching. + * + * @param {string} glob - The glob pattern to convert. + * @param {Object} [opts] - Optional options for the conversion. + * @param {boolean} [opts.extended=false] - If true, enables extended matching with single character matching, character ranges, group matching, etc. + * @param {boolean} [opts.globstar=false] - If true, uses globstar matching, where '*' matches zero or more path segments. + * @param {string} [opts.flags] - Regular expression flags to include (e.g., 'i' for case-insensitive). + * @returns {RegExp} The generated regular expression. + * @throws {TypeError} If the provided glob pattern is not a string. + */ +window.globToRegExp = function (glob, opts) { + if (typeof glob !== 'string') { + throw new TypeError('Expected a string'); + } + + var str = String(glob); + + // The regexp we are building, as a string. + var reStr = ""; + + // Whether we are matching so called "extended" globs (like bash) and should + // support single character matching, matching ranges of characters, group + // matching, etc. + var extended = opts ? !!opts.extended : false; + + // When globstar is _false_ (default), '/foo/*' is translated a regexp like + // '^\/foo\/.*$' which will match any string beginning with '/foo/' + // When globstar is _true_, '/foo/*' is translated to regexp like + // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT + // which does not have a '/' to the right of it. + // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but + // these will not '/foo/bar/baz', '/foo/bar/baz.txt' + // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when + // globstar is _false_ + var globstar = opts ? !!opts.globstar : false; + + // If we are doing extended matching, this boolean is true when we are inside + // a group (eg {*.html,*.js}), and false otherwise. + var inGroup = false; + + // RegExp flags (eg "i" ) to pass in to RegExp constructor. + var flags = opts && typeof (opts.flags) === "string" ? opts.flags : ""; + + var c; + for (var i = 0, len = str.length; i < len; i++) { + c = str[i]; + + switch (c) { + case "/": + case "$": + case "^": + case "+": + case ".": + case "(": + case ")": + case "=": + case "!": + case "|": + reStr += "\\" + c; + break; + + case "?": + if (extended) { + reStr += "."; + break; + } + + case "[": + case "]": + if (extended) { + reStr += c; + break; + } + + case "{": + if (extended) { + inGroup = true; + reStr += "("; + break; + } + + case "}": + if (extended) { + inGroup = false; + reStr += ")"; + break; + } + + case ",": + if (inGroup) { + reStr += "|"; + break; + } + reStr += "\\" + c; + break; + + case "*": + // Move over all consecutive "*"'s. + // Also store the previous and next characters + var prevChar = str[i - 1]; + var starCount = 1; + while (str[i + 1] === "*") { + starCount++; + i++; + } + var nextChar = str[i + 1]; + + if (!globstar) { + // globstar is disabled, so treat any number of "*" as one + reStr += ".*"; + } else { + // globstar is enabled, so determine if this is a globstar segment + var isGlobstar = starCount > 1 // multiple "*"'s + && (prevChar === "/" || prevChar === undefined) // from the start of the segment + && (nextChar === "/" || nextChar === undefined) // to the end of the segment + + if (isGlobstar) { + // it's a globstar, so match zero or more path segments + reStr += "((?:[^/]*(?:\/|$))*)"; + i++; // move over the "/" + } else { + // it's not a globstar, so only match one path segment + reStr += "([^/]*)"; + } + } + break; + + default: + reStr += c; + } + } + + // When regexp 'g' flag is specified don't + // constrain the regular expression with ^ & $ + if (!flags || !~flags.indexOf('g')) { + reStr = "^" + reStr + "$"; + } + + return new RegExp(reStr, flags); +}; + +/** + * Validates the provided file system entry name. + * + * @function validate_fsentry_name + * @memberof window + * @param {string} name - The name of the file system entry to validate. + * @returns {boolean} Returns true if the name is valid. + * @throws {Object} Throws an object with a `message` property indicating the specific validation error. + * + * @description + * This function checks the provided name against a set of rules to determine its validity as a file system entry name: + * 1. Name cannot be empty. + * 2. Name must be a string. + * 3. Name cannot contain the '/' character. + * 4. Name cannot be the '.' character. + * 5. Name cannot be the '..' character. + * 6. Name cannot exceed the maximum allowed length (as defined in window.max_item_name_length). + */ +window.validate_fsentry_name = function(name){ + if(!name) + throw {message: 'Name cannot be empty.'} + else if(!isString(name)) + throw {message: "Name can only be a string."} + else if(name.includes('/')) + throw {message: "Name cannot contain the '/' character."} + else if(name === '.') + throw {message: "Name can not be the '.' character."}; + else if(name === '..') + throw {message: "Name can not be the '..' character."}; + else if(name.length > window.max_item_name_length) + throw {message: `Name can not be longer than ${config.max_item_name_length} characters`} + else + return true +} + +/** + * A function that generates a unique identifier by combining a random adjective, a random noun, and a random number (between 0 and 9999). + * The result is returned as a string with components separated by hyphens. + * It is useful when you need to create unique identifiers that are also human-friendly. + * + * @returns {string} A unique, hyphen-separated string comprising of an adjective, a noun, and a number. + * + * @example + * + * let identifier = window.generate_identifier(); + * // identifier would be something like 'clever-idea-123' + * + */ +window.generate_identifier = function(){ + const first_adj = ['helpful','sensible', 'loyal', 'honest', 'clever', 'capable','calm', 'smart', 'genius', 'bright', 'charming', 'creative', 'diligent', 'elegant', 'fancy', + 'colorful', 'avid', 'active', 'gentle', 'happy', 'intelligent', 'jolly', 'kind', 'lively', 'merry', 'nice', 'optimistic', 'polite', + 'quiet', 'relaxed', 'silly', 'victorious', 'witty', 'young', 'zealous', 'strong', 'brave', 'agile', 'bold']; + + const nouns = ['street', 'roof', 'floor', 'tv', 'idea', 'morning', 'game', 'wheel', 'shoe', 'bag', 'clock', 'pencil', 'pen', + 'magnet', 'chair', 'table', 'house', 'dog', 'room', 'book', 'car', 'cat', 'tree', + 'flower', 'bird', 'fish', 'sun', 'moon', 'star', 'cloud', 'rain', 'snow', 'wind', 'mountain', + 'river', 'lake', 'sea', 'ocean', 'island', 'bridge', 'road', 'train', 'plane', 'ship', 'bicycle', + 'horse', 'elephant', 'lion', 'tiger', 'bear', 'zebra', 'giraffe', 'monkey', 'snake', 'rabbit', 'duck', + 'goose', 'penguin', 'frog', 'crab', 'shrimp', 'whale', 'octopus', 'spider', 'ant', 'bee', 'butterfly', 'dragonfly', + 'ladybug', 'snail', 'camel', 'kangaroo', 'koala', 'panda', 'piglet', 'sheep', 'wolf', 'fox', 'deer', 'mouse', 'seal', + 'chicken', 'cow', 'dinosaur', 'puppy', 'kitten', 'circle', 'square', 'garden', 'otter', 'bunny', 'meerkat', 'harp'] + + // return a random combination of first_adj + noun + number (between 0 and 9999) + // e.g. clever-idea-123 + return first_adj[Math.floor(Math.random() * first_adj.length)] + '-' + nouns[Math.floor(Math.random() * nouns.length)] + '-' + Math.floor(Math.random() * 10000); +} + +/** + * Checks if the provided variable is a string or an instance of the String object. + * + * @param {*} variable - The variable to check. + * @returns {boolean} True if the variable is a string or an instance of the String object, false otherwise. + */ +window.isString = function (variable) { + return typeof variable === 'string' || variable instanceof String; +} + +/** + * A function that checks whether a file system entry (fsentry) matches a list of allowed file types. + * It handles both file extensions (like '.jpg') and MIME types (like 'text/plain'). + * If the allowed file types string is empty or not provided, the function always returns true. + * It checks the file types only if the fsentry is a file, not a directory. + * + * @param {Object} fsentry - The file system entry to check. It must be an object with properties: 'is_dir', 'name', 'type'. + * @param {string} allowed_file_types_string - The list of allowed file types, separated by commas. Can include extensions and MIME types. + * + * @returns {boolean} True if the fsentry matches one of the allowed file types, or if the allowed_file_types_string is empty or not provided. False otherwise. + * + * @example + * + * let fsentry = {is_dir: false, name: 'example.jpg', type: 'image/jpeg'}; + * let allowedTypes = '.jpg, text/plain, image/*'; + * let result = window.check_fsentry_against_allowed_file_types_string(fsentry, allowedTypes); + * // result would be true, as 'example.jpg' matches the '.jpg' in allowedTypes + * + */ + +window.check_fsentry_against_allowed_file_types_string =function (fsentry, allowed_file_types_string) { + // simple cases that are always a pass + if(!allowed_file_types_string || allowed_file_types_string.trim() === '') + return true; + + // parse allowed_file_types into an array of extensions and types + let allowed_file_types = allowed_file_types_string.split(','); + if(allowed_file_types.length > 0){ + // trim every entry + for (let index = 0; index < allowed_file_types.length; index++) { + allowed_file_types[index] = allowed_file_types[index].trim(); + } + } + + let passes_allowed_file_type_filter = true; + // check types, only if this fsentry is a file and not a directory + if(!fsentry.is_dir && allowed_file_types.length > 0){ + passes_allowed_file_type_filter = false; + for (let index = 0; index < allowed_file_types.length; index++) { + const allowed_file_type = allowed_file_types[index].toLowerCase(); + + // if type is not already set, try to set it based on the file name + if(!fsentry.type) + fsentry.type = mime.getType(fsentry.name); + + // extensions (e.g. .jpg) + if(allowed_file_type.startsWith('.') && fsentry.name.toLowerCase().endsWith(allowed_file_type)){ + passes_allowed_file_type_filter = true; + break; + } + + // MIME types (e.g. text/plain) + else if(globToRegExp(allowed_file_type).test(fsentry.type?.toLowerCase())){ + passes_allowed_file_type_filter = true; + break; + } + } + } + + return passes_allowed_file_type_filter; +} + +// @author Rich Adams + +// Implements a tap and hold functionality. If you click/tap and release, it will trigger a normal +// click event. But if you click/tap and hold for 1s (default), it will trigger a taphold event instead. + +;(function($) +{ + // Default options + var defaults = { + duration: 500, // ms + clickHandler: null + } + + // When start of a taphold event is triggered. + function startHandler(event) + { + var $elem = jQuery(this); + + // Merge the defaults and any user defined settings. + let settings = jQuery.extend({}, defaults, event.data); + + // If object also has click handler, store it and unbind. Taphold will trigger the + // click itself, rather than normal propagation. + if (typeof $elem.data("events") != "undefined" + && typeof $elem.data("events").click != "undefined") + { + // Find the one without a namespace defined. + for (var c in $elem.data("events").click) + { + if ($elem.data("events").click[c].namespace == "") + { + var handler = $elem.data("events").click[c].handler + $elem.data("taphold_click_handler", handler); + $elem.unbind("click", handler); + break; + } + } + } + // Otherwise, if a custom click handler was explicitly defined, then store it instead. + else if (typeof settings.clickHandler == "function") + { + $elem.data("taphold_click_handler", settings.clickHandler); + } + + // Reset the flags + $elem.data("taphold_triggered", false); // If a hold was triggered + $elem.data("taphold_clicked", false); // If a click was triggered + $elem.data("taphold_cancelled", false); // If event has been cancelled. + + // Set the timer for the hold event. + $elem.data("taphold_timer", + setTimeout(function() + { + // If event hasn't been cancelled/clicked already, then go ahead and trigger the hold. + if (!$elem.data("taphold_cancelled") + && !$elem.data("taphold_clicked")) + { + // Trigger the hold event, and set the flag to say it's been triggered. + $elem.trigger(jQuery.extend(event, jQuery.Event("taphold"))); + $elem.data("taphold_triggered", true); + } + }, settings.duration)); + } + + // When user ends a tap or click, decide what we should do. + function stopHandler(event) + { + var $elem = jQuery(this); + + // If taphold has been cancelled, then we're done. + if ($elem.data("taphold_cancelled")) { return; } + + // Clear the hold timer. If it hasn't already triggered, then it's too late anyway. + clearTimeout($elem.data("taphold_timer")); + + // If hold wasn't triggered and not already clicked, then was a click event. + if (!$elem.data("taphold_triggered") + && !$elem.data("taphold_clicked")) + { + // If click handler, trigger it. + if (typeof $elem.data("taphold_click_handler") == "function") + { + $elem.data("taphold_click_handler")(jQuery.extend(event, jQuery.Event("click"))); + } + + // Set flag to say we've triggered the click event. + $elem.data("taphold_clicked", true); + } + } + + // If a user prematurely leaves the boundary of the object we're working on. + function leaveHandler(event) + { + // Cancel the event. + $(this).data("taphold_cancelled", true); + } + + // Determine if touch events are supported. + var touchSupported = ("ontouchstart" in window) // Most browsers + || ("onmsgesturechange" in window); // Microsoft + + var taphold = $.event.special.taphold = + { + setup: function(data) + { + $(this).bind((touchSupported ? "touchstart" : "mousedown"), data, startHandler) + .bind((touchSupported ? "touchend" : "mouseup"), stopHandler) + .bind((touchSupported ? "touchmove touchcancel" : "mouseleave"), leaveHandler); + }, + teardown: function(namespaces) + { + $(this).unbind((touchSupported ? "touchstart" : "mousedown"), startHandler) + .unbind((touchSupported ? "touchend" : "mouseup"), stopHandler) + .unbind((touchSupported ? "touchmove touchcancel" : "mouseleave"), leaveHandler); + } + }; +})(jQuery); + +window.refresh_user_data = async (auth_token)=>{ + let whoami + try{ + whoami = await puter.os.user(); + }catch(e){ + + } + // update local user data + if(whoami){ + update_auth_data(auth_token, whoami) + } +} + +window.update_auth_data = (auth_token, user)=>{ + window.auth_token = auth_token; + localStorage.setItem('auth_token', auth_token); + + // Has username changed? + if(window.user?.username !== user.username) + update_username_in_gui(user.username); + + // update this session's user data + window.user = user; + localStorage.setItem('user', JSON.stringify(window.user)); + + // re-initialize the Puter.js objects with the new auth token + puter.setAuthToken(auth_token, api_origin) + + //update the logged_in_users array entry for this user + if(window.user){ + let logged_in_users_updated = false; + for (let i = 0; i < window.logged_in_users.length && !logged_in_users_updated; i++) { + if(window.logged_in_users[i].uuid === window.user.uuid){ + window.logged_in_users[i] = window.user; + window.logged_in_users[i].auth_token = window.auth_token; + logged_in_users_updated = true; + } + } + + // no matching array elements, add one + if(!logged_in_users_updated){ + let userobj = window.user; + userobj.auth_token = window.auth_token; + window.logged_in_users.push(userobj); + } + // update local storage + localStorage.setItem('logged_in_users', JSON.stringify(window.logged_in_users)); + } + + window.desktop_path = '/' + window.user.username + '/Desktop'; + window.trash_path = '/' + window.user.username + '/Trash'; + window.appdata_path = '/' + window.user.username + '/AppData'; + window.docs_path = '/' + window.user.username + '/Documents'; + window.pictures_path = '/' + window.user.username + '/Pictures'; + window.videos_path = '/' + window.user.username + '/Videos'; + window.desktop_path = '/' + window.user.username + '/Desktop'; + window.home_path = '/' + window.user.username; + + if(window.user !== null && !window.user.is_temp){ + $('.user-options-login-btn, .user-options-create-account-btn').hide(); + $('.user-options-menu-btn').show(); + } +} + +window.sendWindowWillCloseMsg = function(iframe_element) { + return new Promise(function(resolve){ + const msg_id = uuidv4(); + iframe_element.contentWindow.postMessage({ + msg: "windowWillClose", + msg_id: msg_id + }, '*'); + //register callback + appCallbackFunctions[msg_id] = resolve; + }) +} + +window.logout = ()=>{ + document.dispatchEvent(new Event("logout", { bubbles: true})); +} + +/** + * Checks if the current document is in fullscreen mode. + * + * @function is_fullscreen + * @memberof window + * @returns {boolean} Returns true if the document is in fullscreen mode, otherwise false. + * + * @example + * // Checks if the document is currently in fullscreen mode + * const inFullscreen = window.is_fullscreen(); + * + * @description + * This function checks various browser-specific properties to determine if the document + * is currently being displayed in fullscreen mode. It covers standard as well as + * some vendor-prefixed properties to ensure compatibility across different browsers. + */ +window.is_fullscreen = ()=>{ + return (document.fullscreenElement && document.fullscreenElement !== null) || + (document.webkitIsFullScreen && document.webkitIsFullScreen !== null) || + (document.webkitFullscreenElement && document.webkitFullscreenElement !== null) || + (document.mozFullScreenElement && document.mozFullScreenElement !== null) || + (document.msFullscreenElement && document.msFullscreenElement !== null); +} + +window.get_apps = async (app_names, callback)=>{ + if(Array.isArray(app_names)) + app_names = app_names.join('|'); + + // 'explorer' is a special app, no metadata should be returned + if(app_names === 'explorer') + return []; + + let res = await $.ajax({ + url: api_origin + "/apps/"+app_names, + type: 'GET', + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + success: function (res){ + } + }); + + if(res.length === 1) + res = res[0]; + + if(callback && typeof callback === 'function') + callback(res); + else + return res; +} + +/** + * Sends an "itemChanged" event to all watching applications associated with a specific item. + * + * @function sendItemChangeEventToWatchingApps + * @memberof window + * @param {string} item_uid - Unique identifier of the item that experienced the change. + * @param {Object} event_data - Additional data about the event to be passed to the watching applications. + * + * @description + * This function sends an "itemChanged" message to all applications that are currently watching + * the specified item. If an application's iframe is not found or no longer valid, + * it is removed from the list of watchers. + * + * The function expects that `window.watchItems` contains a mapping of item UIDs to arrays of app instance IDs. + * + * @example + * // Example usage to send a change event to watching applications of an item with UID "item123". + * window.sendItemChangeEventToWatchingApps('item123', { property: 'value' }); + */ +window.sendItemChangeEventToWatchingApps = function(item_uid, event_data){ + if(window.watchItems[item_uid]){ + window.watchItems[item_uid].forEach(app_instance_id => { + const iframe = $(`.window[data-element_uuid="${app_instance_id}"]`).find('.window-app-iframe') + if(iframe && iframe.length > 0){ + iframe.get(0)?.contentWindow + .postMessage({ + msg: 'itemChanged', + data: event_data, + }, '*'); + }else{ + window.watchItems[item_uid].splice(window.watchItems[item_uid].indexOf(app_instance_id), 1); + } + }); + } +} + +/** + * Assigns an icon to a filesystem entry based on its properties such as name, type, + * and whether it's a directory, app, trashed, or specific file type. + * + * @function item_icon + * @global + * @async + * @param {Object} fsentry - A filesystem entry object. It may contain various properties + * like name, type, path, associated_app, thumbnail, is_dir, and metadata, depending on + * the type of filesystem entry. + */ + +window.item_icon = async (fsentry)=>{ + // -------------------------------------------------- + // If this file is Trashed then set the name to the original name of the file before it was trashed + // -------------------------------------------------- + if(fsentry.path?.startsWith(trash_path + '/')){ + if(fsentry.metadata){ + try{ + let metadata = JSON.parse(fsentry.metadata); + fsentry.name = (metadata && metadata.original_name) ? metadata.original_name : fsentry.name + } + catch(e){ + } + } + } + // -------------------------------------------------- + // thumbnail + // -------------------------------------------------- + if(fsentry.thumbnail){ + return {image: fsentry.thumbnail, type: 'thumb'}; + } + // -------------------------------------------------- + // app icon + // -------------------------------------------------- + else if(fsentry.associated_app && fsentry.associated_app?.name){ + if(fsentry.associated_app.icon) + return {image: fsentry.associated_app.icon, type: 'icon'}; + else + return {image: window.icons['app.svg'], type: 'icon'}; + } + // -------------------------------------------------- + // Trash + // -------------------------------------------------- + else if(fsentry.shortcut_to_path && fsentry.shortcut_to_path === trash_path){ + // get trash image, this is needed to get the correct empty vs full trash icon + let trash_img = $(`.item[data-path="${html_encode(trash_path)}" i] .item-icon-icon`).attr('src') + // if trash_img is undefined that's probably because trash wasn't added anywhere, do a direct lookup to see if trash is empty or no + if(!trash_img){ + let trashstat = await puter.fs.stat(trash_path); + if(trashstat.is_empty !== undefined && trashstat.is_empty === true) + trash_img = window.icons['trash.svg']; + else + trash_img = window.icons['trash-full.svg']; + } + return {image: trash_img, type: 'icon'}; + } + // -------------------------------------------------- + // Directories + // -------------------------------------------------- + else if(fsentry.is_dir){ + // System Directories + if(fsentry.path === docs_path) + return {image: window.icons['folder-documents.svg'], type: 'icon'}; + else if (fsentry.path === pictures_path) + return { image: window.icons['folder-pictures.svg'], type: 'icon' }; + else if (fsentry.path === home_path) + return { image: window.icons['folder-home.svg'], type: 'icon' }; + else if (fsentry.path === videos_path) + return { image: window.icons['folder-videos.svg'], type: 'icon' }; + else if (fsentry.path === desktop_path) + return { image: window.icons['folder-desktop.svg'], type: 'icon' }; + // regular directories + else + return {image: window.icons['folder.svg'], type: 'icon'}; + } + // -------------------------------------------------- + // Match icon by file extension + // -------------------------------------------------- + // *.doc + else if(fsentry.name.toLowerCase().endsWith('.doc')){ + return {image: window.icons['file-doc.svg'], type: 'icon'}; + } + // *.docx + else if(fsentry.name.toLowerCase().endsWith('.docx')){ + return {image: window.icons['file-docx.svg'], type: 'icon'}; + } + // *.exe + else if(fsentry.name.toLowerCase().endsWith('.exe')){ + return {image: window.icons['file-exe.svg'], type: 'icon'}; + } + // *.gz + else if(fsentry.name.toLowerCase().endsWith('.gz')){ + return {image: window.icons['file-gzip.svg'], type: 'icon'}; + } + // *.jar + else if(fsentry.name.toLowerCase().endsWith('.jar')){ + return {image: window.icons['file-jar.svg'], type: 'icon'}; + } + // *.java + else if(fsentry.name.toLowerCase().endsWith('.java')){ + return {image: window.icons['file-java.svg'], type: 'icon'}; + } + // *.jsp + else if(fsentry.name.toLowerCase().endsWith('.jsp')){ + return {image: window.icons['file-jsp.svg'], type: 'icon'}; + } + // *.log + else if(fsentry.name.toLowerCase().endsWith('.log')){ + return {image: window.icons['file-log.svg'], type: 'icon'}; + } + // *.mp3 + else if(fsentry.name.toLowerCase().endsWith('.mp3')){ + return {image: window.icons['file-mp3.svg'], type: 'icon'}; + } + // *.rb + else if(fsentry.name.toLowerCase().endsWith('.rb')){ + return {image: window.icons['file-ruby.svg'], type: 'icon'}; + } + // *.rss + else if(fsentry.name.toLowerCase().endsWith('.rss')){ + return {image: window.icons['file-rss.svg'], type: 'icon'}; + } + // *.rtf + else if(fsentry.name.toLowerCase().endsWith('.rtf')){ + return {image: window.icons['file-rtf.svg'], type: 'icon'}; + } + // *.sketch + else if(fsentry.name.toLowerCase().endsWith('.sketch')){ + return {image: window.icons['file-sketch.svg'], type: 'icon'}; + } + // *.sql + else if(fsentry.name.toLowerCase().endsWith('.sql')){ + return {image: window.icons['file-sql.svg'], type: 'icon'}; + } + // *.tif + else if(fsentry.name.toLowerCase().endsWith('.tif')){ + return {image: window.icons['file-tif.svg'], type: 'icon'}; + } + // *.tiff + else if(fsentry.name.toLowerCase().endsWith('.tiff')){ + return {image: window.icons['file-tiff.svg'], type: 'icon'}; + } + // *.wav + else if(fsentry.name.toLowerCase().endsWith('.wav')){ + return {image: window.icons['file-wav.svg'], type: 'icon'}; + } + // *.cpp + else if(fsentry.name.toLowerCase().endsWith('.cpp')){ + return {image: window.icons['file-cpp.svg'], type: 'icon'}; + } + // *.pptx + else if(fsentry.name.toLowerCase().endsWith('.pptx')){ + return {image: window.icons['file-pptx.svg'], type: 'icon'}; + } + // *.psd + else if(fsentry.name.toLowerCase().endsWith('.psd')){ + return {image: window.icons['file-psd.svg'], type: 'icon'}; + } + // *.xlsx + else if(fsentry.name.toLowerCase().endsWith('.xlsx')){ + return {image: window.icons['file-xlsx.svg'], type: 'icon'}; + } + // -------------------------------------------------- + // Determine icon by set or derived mime type + // -------------------------------------------------- + else if(fsentry.type){ + return {image: content_type_to_icon(fsentry.type), type: 'icon'}; + } + else{ + return {image: content_type_to_icon(mime.getType(fsentry.name)), type: 'icon'}; + } +} + +/** + * Asynchronously checks if a save account notice should be shown to the user, and if needed, displays the notice. + * + * This function first retrieves a key value pair from the cloud key-value storage to determine if the notice has been shown before. + * If the notice hasn't been shown and the user is using a temporary session, the notice is then displayed. After the notice is shown, + * the function updates the key-value storage indicating that the notice has been shown. The user can choose to save the session, + * remind later or log in to an existing account. + * + * @param {string} [message] - The custom message to be displayed in the notice. If not provided, a default message will be used. + * @global + * @function window.show_save_account_notice_if_needed + */ + +window.show_save_account_notice_if_needed = function(message){ + getItem({ + key: "save_account_notice_shown", + success: async function(value){ + if(!value && window.user?.is_temp){ + setItem({key: "save_account_notice_shown", value: true}); + + // Show the notice + setTimeout(async () => { + const alert_resp = await UIAlert({ + message: message ?? `Congrats on storing data!

    Don't forget to save your session! You are in a temporary session. Save session to avoid accidentally losing your work.

    `, + body_icon: window.icons['reminder.svg'], + buttons:[ + { + label: 'Save session', + value: 'save-session', + type: 'primary', + }, + // { + // label: 'Log into an existing account', + // value: 'login', + // }, + { + label: `I'll do it later`, + value: 'remind-later', + }, + ], + window_options: { + backdrop: true, + close_on_backdrop_click: false, + } + + }) + + if(alert_resp === 'remind-later'){ + } + if(alert_resp === 'save-session'){ + let saved = await UIWindowSaveAccount({ + send_confirmation_code: false, + }); + + }else if (alert_resp === 'login'){ + let login_result = await UIWindowLogin({ + show_signup_button: false, + reload_on_success: true, + send_confirmation_code: false, + window_options: { + show_in_taskbar: false, + backdrop: true, + close_on_backdrop_click: false, + } + }); + if(!login_result) + $('.toolbar').prepend(ht); + } + }, desktop_loading_fade_delay + 1000); + } + } + }) +} + +window.launch_download_from_url = async function(){ + // get url query params + const url_query_params = new URLSearchParams(window.location.search); + + // is this download? + if(url_query_params.has('download')){ + let url = url_query_params.get('download'); + let name = url_query_params.get('name'); + let is_dir = url_query_params.get('is_dir'); + let url_obj; + + // if url doesn't have a protocol, add http:// + if(!url.startsWith('http://') && !url.startsWith('https://')){ + url = 'http://' + url; + } + + // parse url + try{ + url_obj = new URL(url); + }catch(e){ + UIAlert("Invalid download URL."); + return; + } + + // get hostname from url + let hostname = url_obj.hostname; + + // name + if(!name) + name = url.split('/').pop().split('#')[0].split('?')[0]; + + // determine file type from url + let file_type = mime.getType(name); + + // confirm download + if(await UIWindowConfirmDownload({url: url, name: name, source: hostname, type: file_type, is_dir: is_dir})){ + // download progress tracker + let dl_op_id = operation_id++; + + // upload progress tracker defaults + window.progress_tracker[dl_op_id] = []; + window.progress_tracker[dl_op_id][0] = {}; + window.progress_tracker[dl_op_id][0].total = 0; + window.progress_tracker[dl_op_id][0].ajax_uploaded = 0; + window.progress_tracker[dl_op_id][0].cloud_uploaded = 0; + + const progress_window = await UIWindowDownloadProgress({operation_id: dl_op_id, item_name: name}); + + const res = await download({ + url: url, + name: name, + dest_path: desktop_path, + auth_token: auth_token, + api_origin: api_origin, + dedupe_name: true, + overwrite: false, + operation_id: dl_op_id, + item_upload_id: 0, + success: function(res){ + $(progress_window).close(); + }, + error: function(err){ + UIAlert(err && err.message ? err.message : "Download failed."); + $(progress_window).close(); + } + }); + + // clear window URL + window.history.pushState(null, document.title, '/'); + } + + } +} + +window.refresh_item_container = function(el_item_container, options){ + options = options || {}; + + let container_path = $(el_item_container).attr('data-path'); + let el_window = $(el_item_container).closest('.window'); + let el_window_head_icon = $(el_window).find('.window-head-icon'); + const loading_spinner = $(el_item_container).find('.explorer-loading-spinner'); + + if(options.fadeInItems) + $(el_item_container).css('opacity', '0') + + // Hide the 'This folder is empty' message to avoid the flickering effect + // if the folder is not empty. + $(el_item_container).find('.explorer-empty-message').hide(); + + // Hide the loading spinner to avoid the flickering effect if the folder + // is already loaded. + $(loading_spinner).hide(); + + // current timestamp in milliseconds + let start_ts = new Date().getTime(); + + // A timeout that will show the loading spinner if the folder is not loaded + // after 1000ms + let loading_timeout = setTimeout(function(){ + // make sure the same folder is still loading + if($(loading_spinner).closest('.item-container').attr('data-path') !== container_path) + return; + + // show the loading spinner + $(loading_spinner).show(); + setTimeout(function(){ + $(loading_spinner).find('.explorer-loading-spinner-msg').html('Taking a little longer than usual. Please wait...'); + }, 3000) + }, 1000); + + // -------------------------------------------------------- + // Folder's configs and properties + // -------------------------------------------------------- + puter.fs.stat(container_path, function(fsentry){ + if(el_window){ + $(el_window).attr('data-uid', fsentry.id); + $(el_window).attr('data-sort_by', fsentry.sort_by ?? 'name'); + $(el_window).attr('data-sort_order', fsentry.sort_order ?? 'asc'); + $(el_window).attr('data-layout', fsentry.layout ?? 'icons'); + // data-name + $(el_window).attr('data-name', html_encode(fsentry.name)); + // data-path + $(el_window).attr('data-path', html_encode(container_path)); + $(el_window).find('.window-navbar-path-input').val(container_path); + $(el_window).find('.window-navbar-path-input').attr('data-path', container_path); + } + $(el_item_container).attr('data-sort_by', fsentry.sort_by ?? 'name'); + $(el_item_container).attr('data-sort_order', fsentry.sort_order ?? 'asc'); + // update layout + if(el_window && el_window.length > 0) + update_window_layout(el_window, fsentry.layout); + // + if(fsentry.layout === 'details'){ + update_details_layout_sort_visuals(el_window, fsentry.sort_by, fsentry.sort_order); + } + }); + + // is_directoryPicker + let is_directoryPicker = $(el_window).attr('data-is_directoryPicker'); + is_directoryPicker = (is_directoryPicker === 'true' || is_directoryPicker === '1') ? true : false; + + // allowed_file_types + let allowed_file_types = $(el_window).attr('data-allowed_file_types'); + + // is_directoryPicker + let is_openFileDialog = $(el_window).attr('data-is_openFileDialog'); + is_openFileDialog = (is_openFileDialog === 'true' || is_openFileDialog === '1') ? true : false; + + // remove all existing items + $(el_item_container).find('.item').removeItems() + + // get items + puter.fs.readdir(container_path).then((fsentries)=>{ + // Check if the same folder is still loading since el_item_container's + // data-path might have changed by other operations while waiting for the response to this `readdir`. + if($(el_item_container).attr('data-path') !== container_path) + return; + + setTimeout(async function(){ + // clear loading timeout + clearTimeout(loading_timeout); + + // hide loading spinner + $(loading_spinner).hide(); + + // if no items, show empty folder message + if(fsentries.length === 0){ + $(el_item_container).find('.explorer-empty-message').show(); + } + + // trash icon + if(container_path === trash_path && el_window_head_icon){ + if(fsentries.length > 0){ + $(el_window_head_icon).attr('src', window.icons['trash-full.svg']); + }else{ + $(el_window_head_icon).attr('src', window.icons['trash.svg']); + } + } + + // add each item to window + for (let index = 0; index < fsentries.length; index++) { + const fsentry = fsentries[index]; + let is_disabled = false; + + // disable files if this is a showDirectoryPicker() window + if(is_directoryPicker && !fsentry.is_dir) + is_disabled = true; + + // if this item is not allowed because of filetype restrictions, disable it + if(!window.check_fsentry_against_allowed_file_types_string(fsentry, allowed_file_types)) + is_disabled = true; + + // skip if hidden (i.e. name starts with `.`) + if(fsentry.name.startsWith('.')) + continue; + + //metadata + let metadata; + if(fsentry.metadata !== ''){ + try{ + metadata = JSON.parse(fsentry.metadata); + } + catch(e){ + } + } + + const item_path = fsentry.path ?? path.join($(el_window).attr('data-path'), fsentry.name); + // render any item but Trash/AppData + if(item_path !== trash_path && item_path !== appdata_path){ + // if this is trash, get original name from item metadata + fsentry.name = (metadata && metadata.original_name !== undefined) ? metadata.original_name : fsentry.name; + UIItem({ + appendTo: el_item_container, + uid: fsentry.uid, + immutable: fsentry.immutable, + associated_app_name: fsentry.associated_app?.name, + path: item_path, + icon: await item_icon(fsentry), + name: (metadata && metadata.original_name !== undefined) ? metadata.original_name : fsentry.name, + is_dir: fsentry.is_dir, + multiselectable: !is_openFileDialog, + has_website: fsentry.has_website, + is_shared: fsentry.is_shared, + metadata: fsentry.metadata, + is_shortcut: fsentry.is_shortcut, + shortcut_to: fsentry.shortcut_to, + shortcut_to_path: fsentry.shortcut_to_path, + size: fsentry.size, + type: fsentry.type, + modified: fsentry.modified, + suggested_apps: fsentry.suggested_apps, + disabled: is_disabled, + }); + } + } + + // if this is desktop, add Trash + if($(el_item_container).hasClass('desktop')){ + try{ + const trash = await puter.fs.stat(window.trash_path); + UIItem({ + appendTo: el_item_container, + uid: trash.id, + immutable: trash.immutable, + path: trash_path, + icon: {image: (trash.is_empty ? window.icons['trash.svg'] : window.icons['trash-full.svg']), type: 'icon'}, + name: trash.name, + is_dir: trash.is_dir, + sort_by: trash.sort_by, + type: trash.type, + is_trash: true, + sortable: false, + }); + sort_items(el_item_container, $(el_item_container).attr('data-sort_by'), $(el_item_container).attr('data-sort_order')); + }catch(e){ + + } + } + // sort items + sort_items( + el_item_container, + $(el_item_container).attr('data-sort_by'), + $(el_item_container).attr('data-sort_order') + ); + + if(options.fadeInItems) + $(el_item_container).animate({'opacity': '1'}); + + // update footer item count if this is an explorer window + if(el_window) + update_explorer_footer_item_count(el_window); + }, + // This makes sure the loading spinner shows up if the request takes longer than 1 second + // and stay there for at least 1 second since the flickering is annoying + (Date.now() - start_ts) > 1000 ? 1000 : 1) + }); +} + +window.onpopstate = (event) => { + if(event.state !== null && event.state.window_id !== null){ + $(`.window[data-id="${event.state.window_id}"]`).focusWindow(); + } +} + +window.sort_items = (item_container, sort_by, sort_order)=>{ + if(sort_order !== 'asc' && sort_order !== 'desc') + sort_order = 'asc'; + + $(item_container).find(`.item[data-sortable="true"]`).detach().sort(function(a,b) { + // Name + if(!sort_by || sort_by === 'name'){ + if(a.dataset.name.toLowerCase() < b.dataset.name.toLowerCase()) { return (sort_order === 'asc' ? -1 : 1); } + if(a.dataset.name.toLowerCase() > b.dataset.name.toLowerCase()) { return (sort_order === 'asc' ? 1 : -1); } + return 0; + } + // Size + else if(sort_by === 'size'){ + if( parseInt(a.dataset.size) < parseInt(b.dataset.size)) { return (sort_order === 'asc' ? -1 : 1); } + if( parseInt(a.dataset.size) > parseInt(b.dataset.size)) { return (sort_order === 'asc' ? 1 : -1); } + return 0; + } + // Modified + else if(sort_by === 'modified'){ + if( parseInt(a.dataset.modified) < parseInt(b.dataset.modified)) { return (sort_order === 'asc' ? -1 : 1); } + if( parseInt(a.dataset.modified) > parseInt(b.dataset.modified)) { return (sort_order === 'asc' ? 1 : -1); } + return 0; + } + // Type + else if(sort_by === 'type'){ + if(path.extname(a.dataset.name.toLowerCase()) < path.extname(b.dataset.name.toLowerCase())) { return (sort_order === 'asc' ? -1 : 1); } + if(path.extname(a.dataset.name.toLowerCase()) > path.extname(b.dataset.name.toLowerCase())) { return (sort_order === 'asc' ? 1 : -1); } + return 0; + } + + }).appendTo(item_container); +} + +window.create_folder = async(basedir, appendto_element)=>{ + let dirname = basedir; + let folder_name = 'New Folder'; + + let newfolder_op_id = operation_id++; + operation_cancelled[newfolder_op_id] = false; + let newfolder_progress_window_init_ts = Date.now(); + let progwin; + + // only show progress window if it takes longer than 500ms to create folder + let progwin_timeout = setTimeout(async () => { + progwin = await UIWindowNewFolderProgress({operation_id: newfolder_op_id}); + }, 500); + + // create folder + try{ + await puter.fs.mkdir({ + path: dirname + '/'+folder_name, + rename: true, + overwrite: false, + success: function (data){ + const el_created_dir = $(appendto_element).find('.item[data-path="'+html_encode(dirname)+'/'+html_encode(data.name)+'"]'); + if(el_created_dir.length > 0) + activate_item_name_editor(el_created_dir); + + clearTimeout(progwin_timeout); + + // done + let newfolder_duration = (Date.now() - newfolder_progress_window_init_ts); + if( progwin && newfolder_duration >= copy_progress_hide_delay){ + $(progwin).close(); + }else if(progwin){ + setTimeout(() => { + setTimeout(() => { + $(progwin).close(); + }, Math.abs(copy_progress_hide_delay - newfolder_duration)); + }) + } + } + }); + }catch(err){ + clearTimeout(progwin_timeout); + } +} + +window.create_file = async(options)=>{ + // args + let dirname = options.dirname; + let appendto_element = options.append_to_element; + let filename = options.name; + let content = options.content ? [options.content] : []; + + // create file + try{ + puter.fs.upload(new File(content, filename), dirname, + { + success: async function (data){ + const created_file = $(appendto_element).find('.item[data-path="'+html_encode(dirname)+'/'+html_encode(data.name)+'"]'); + if(created_file.length > 0){ + activate_item_name_editor(created_file); + } + } + }); + }catch(err){ + console.log(err); + } +} + +window.create_shortcut = async(filename, is_dir, basedir, appendto_element, shortcut_to, shortcut_to_path)=>{ + let dirname = basedir; + const extname = path.extname(filename); + const basename = path.basename(filename, extname) + ' - Shortcut'; + filename = basename + extname; + + // create file shortcut + try{ + await puter.fs.upload(new File([], filename), dirname, { + overwrite: false, + shortcutTo: shortcut_to_path ?? shortcut_to, + dedupeName: true, + }); + }catch(err){ + console.log(err) + } +} + +window.copy_clipboard_items = async function(dest_path, dest_container_element){ + let copy_op_id = operation_id++; + operation_cancelled[copy_op_id] = false; + // unselect previously selected items in the target container + $(dest_container_element).children('.item-selected').removeClass('item-selected'); + update_explorer_footer_selected_items_count($(dest_container_element).closest('.window')); + + let overwrite_all = false; + (async()=>{ + let copy_progress_window_init_ts = Date.now(); + let progwin = await UIWindowCopyProgress({operation_id: copy_op_id}); + for(let i=0; i${html_encode(err.entry_name)} already exists.`, + buttons:[ + {label: 'Replace', type: 'primary'}, + ... (clipboard.length > 1) ? [{label: 'Replace all'}] : [], + ... (clipboard.length > 1) ? [{label: 'Skip'}] : [{label: 'Cancel'}], + ] + }) + if(alert_resp === 'Replace'){ + overwrite = true; + }else if (alert_resp === 'Replace all'){ + overwrite = true; + overwrite_all = true; + }else if(alert_resp === 'Skip' || alert_resp === 'Cancel'){ + item_with_same_name_already_exists = false; + } + } + else{ + if(err.message){ + UIAlert(err.message) + } + item_with_same_name_already_exists = false; + } + } + }while(item_with_same_name_already_exists) + } + + // done + let copy_duration = (Date.now() - copy_progress_window_init_ts); + if( copy_duration >= copy_progress_hide_delay){ + $(progwin).close(); + }else{ + setTimeout(() => { + setTimeout(() => { + $(progwin).close(); + }, Math.abs(copy_progress_hide_delay - copy_duration)); + }) + } + })(); +} + +/** + * Copies the given items to the destination path. + * + * @param {HTMLElement[]} el_items - HTML elements representing the items to copy + * @param {string} dest_path - Destination path to copy items to + */ +window.copy_items = function(el_items, dest_path){ + let copy_op_id = operation_id++; + let overwrite_all = false; + (async()=>{ + let copy_progress_window_init_ts = Date.now(); + let progwin = await UIWindowCopyProgress({operation_id: copy_op_id}); + for(let i=0; i < el_items.length; i++){ + let copy_path = $(el_items[i]).attr('data-path'); + let item_with_same_name_already_exists = true; + let overwrite = overwrite_all; + $(progwin).find('.copy-from').html(copy_path); + + do{ + if(overwrite) + item_with_same_name_already_exists = false; + // cancelled? + if(operation_cancelled[copy_op_id]) + return; + try{ + await puter.fs.copy({ + source: copy_path, + destination: dest_path, + overwrite: overwrite || overwrite_all, + // if user is copying an item to where the source is, automatically change the name so there is no conflict + dedupeName: dest_path === path.dirname(copy_path), + }) + + // skips next loop iteration + item_with_same_name_already_exists = false; + }catch(err){ + if(err.code === 'item_with_same_name_exists'){ + const alert_resp = await UIAlert({ + message: `${html_encode(err.entry_name)} already exists.`, + buttons:[ + { label: 'Replace', type: 'primary' }, + ... (el_items.length > 1) ? [{label: 'Replace all'}] : [], + ... (el_items.length > 1) ? [{label: 'Skip'}] : [{label: 'Cancel'}], + ] + }) + if(alert_resp === 'Replace'){ + overwrite = true; + }else if (alert_resp === 'Replace all'){ + overwrite = true; + overwrite_all = true; + }else if(alert_resp === 'Skip' || alert_resp === 'Cancel'){ + item_with_same_name_already_exists = false; + } + } + else{ + if(err.message){ + UIAlert(err.message) + } + else if(err){ + UIAlert(err) + } + item_with_same_name_already_exists = false; + } + } + }while(item_with_same_name_already_exists) + } + + // done + let copy_duration = (Date.now() - copy_progress_window_init_ts); + if( copy_duration >= copy_progress_hide_delay){ + $(progwin).close(); + }else{ + setTimeout(() => { + setTimeout(() => { + $(progwin).close(); + }, Math.abs(copy_progress_hide_delay - copy_duration)); + }) + } + })() +} + +/** + * Deletes the given item. + * + * @param {HTMLElement} el_item - HTML element representing the item to delete + * @param {boolean} [descendants_only=false] - If true, only deletes descendant items under the given item + * @returns {Promise} + */ +window.delete_item = async function(el_item, descendants_only = false){ + if($(el_item).attr('data-immutable') === '1') + return; + + // hide all UIItems with matching uids + $(`.item[data-uid='${$(el_item).attr('data-uid')}']`).fadeOut(150, function(){ + // close all windows with matching uids + $('.window-' + $(el_item).attr('data-uid')).close(); + // close all windows that belong to a descendant of this item + // todo this has to be case-insensitive but the `i` selector doesn't work on ^= + $(`.window[data-path^="${$(el_item).attr('data-path')}/"]`).close(); + }); + + try{ + await puter.fs.delete({ + paths: $(el_item).attr('data-path'), + descendantsOnly: descendants_only, + recursive: true, + }); + // fade out item + $(`.item[data-uid='${$(el_item).attr('data-uid')}']`).fadeOut(150, function(){ + // find all parent windows that contain this item + let parent_windows = $(`.item[data-uid='${$(el_item).attr('data-uid')}']`).closest('.window'); + // remove item from DOM + $(`.item[data-uid='${$(el_item).attr('data-uid')}']`).removeItems(); + // update parent windows' item counts + $(parent_windows).each(function(index){ + update_explorer_footer_item_count(this); + update_explorer_footer_selected_items_count(this); + }); + // update all shortcuts to this item + $(`.item[data-shortcut_to_path="${html_encode($(el_item).attr('data-path'))}" i]`).attr(`data-shortcut_to_path`, ''); + }); + }catch(err){ + UIAlert(err.responseText); + } +} + +window.move_clipboard_items = function (el_target_container, target_path){ + let dest_path = target_path === undefined ? $(el_target_container).attr('data-path') : target_path; + let el_items = []; + if(clipboard.length > 0){ + for(let i=0; i 0) + move_items(el_items, dest_path); + } + + clipboard = []; +} + +/** + * Initiates a download for multiple files provided as an array of paths. + * + * This function triggers the download of files from given paths. It constructs the + * download URLs using an API base URL and the given paths, along with an authentication token. + * Each file is then fetched and prompted to the user for download using the `saveAs` function. + * + * Global dependencies: + * - `api_origin`: The base URL for the download API endpoint. + * - `auth_token`: The authentication token required for the download API. + * - `saveAs`: Function to save the fetched blob as a file. + * - `path.basename()`: Function to extract the filename from the provided path. + * + * @global + * @function trigger_download + * @param {string[]} paths - An array of file paths that are to be downloaded. + * + * @example + * let filePaths = ['/path/to/file1.txt', '/path/to/file2.png']; + * window.trigger_download(filePaths); + */ + +window.trigger_download = (paths)=>{ + let urls = []; + for (let index = 0; index < paths.length; index++) { + urls.push({ + download: api_origin + "/down?path=" + paths[index] + "&auth_token=" + auth_token, + filename: path.basename(paths[index]), + }); + } + + urls.forEach(function (e) { + fetch(e.download) + .then(res => res.blob()) + .then(blob => { + saveAs(blob, e.filename); + }); + }); +} + +/** + * + * @param {*} options + */ +window.launch_app = async (options)=>{ + const uuid = uuidv4(); + let icon, title, file_signature; + const window_options = options.window_options ?? {}; + + // try to get 3rd-party app info + let app_info = options.app_obj ?? await get_apps(options.name); + + //----------------------------------- + // icon + //----------------------------------- + if(app_info.icon) + icon = app_info.icon; + else if(app_info.icon) + icon = window.icons['app.svg']; + else if(options.name === 'explorer') + icon = window.icons['folder.svg']; + else + icon = window.icons['app-icon-'+options.name+'.svg'] + + //----------------------------------- + // title + //----------------------------------- + if(app_info.title) + title = app_info.title; + else if(options.window_title) + title = options.window_title; + else if(options.name) + title = options.name; + + //----------------------------------- + // maximize on start + //----------------------------------- + if(app_info.maximize_on_start && app_info.maximize_on_start === 1) + options.maximized = 1; + + //----------------------------------- + // if opened a file, sign it + //----------------------------------- + if(options.file_signature) + file_signature = options.file_signature; + else if(options.file_uid){ + file_signature = await puter.fs.sign(app_info.uuid, {uid: options.file_uid, action: 'write'}); + // add token to options + options.token = file_signature.token; + // add file_signature to options + file_signature = file_signature.items; + } + //------------------------------------ + // Explorer + //------------------------------------ + if(options.name === 'explorer'){ + if(options.path === window.home_path){ + title = 'Home'; + icon = window.icons['folder-home.svg']; + } + else if(options.path === window.trash_path){ + title = 'Trash'; + } + else if(!options.path) + title = root_dirname; + else + title = path.dirname(options.path); + + // open window + UIWindow({ + element_uuid: uuid, + icon: icon, + path: options.path ?? window.home_path, + title: title, + uid: null, + is_dir: true, + app: 'explorer', + ...window_options, + is_maximized: options.maximized, + }); + } + //------------------------------------ + // All other apps + //------------------------------------ + else{ + //----------------------------------- + // iframe_url + //----------------------------------- + let iframe_url; + if(!app_info.index_url){ + iframe_url = new URL('https://'+options.name+'.' + window.app_domain + `/index.html`); + }else{ + iframe_url = new URL(app_info.index_url); + } + + // add app_instance_id to URL + iframe_url.searchParams.append('puter.app_instance_id', uuid); + // add app_id to URL + iframe_url.searchParams.append('puter.app.id', app_info.uuid); + + if(file_signature){ + iframe_url.searchParams.append('puter.item.uid', file_signature.uid); + iframe_url.searchParams.append('puter.item.path', options.file_path ? `~/` + options.file_path.split('/').slice(1).join('/') : file_signature.path); + iframe_url.searchParams.append('puter.item.name', file_signature.fsentry_name); + iframe_url.searchParams.append('puter.item.read_url', file_signature.read_url); + iframe_url.searchParams.append('puter.item.write_url', file_signature.write_url); + iframe_url.searchParams.append('puter.item.metadata_url', file_signature.metadata_url); + iframe_url.searchParams.append('puter.item.size', file_signature.fsentry_size); + iframe_url.searchParams.append('puter.item.accessed', file_signature.fsentry_accessed); + iframe_url.searchParams.append('puter.item.modified', file_signature.fsentry_modified); + iframe_url.searchParams.append('puter.item.created', file_signature.fsentry_created); + iframe_url.searchParams.append('puter.domain', app_domain); + } + else if(options.readURL){ + iframe_url.searchParams.append('puter.item.name', options.filename); + iframe_url.searchParams.append('puter.item.path', options.file_path ? `~/` + options.file_path.split('/').slice(1).join('/') : undefined); + iframe_url.searchParams.append('puter.item.read_url', options.readURL); + // iframe_url.searchParams.append('puter.item.write_url', file_signature.write_url); + iframe_url.searchParams.append('puter.domain', window.app_domain); + } + + // Add auth_token to GODMODE apps + if(app_info.godmode && app_info.godmode === 1){ + iframe_url.searchParams.append('puter.auth.token', auth_token); + iframe_url.searchParams.append('puter.auth.username', window.user.username); + iframe_url.searchParams.append('puter.domain', window.app_domain); + } + // App token. Only add token if it's not a GODMODE app since GODMODE apps already have the super token + // that has access to everything. + else if(options.token){ + iframe_url.searchParams.append('puter.auth.token', options.token); + } + // Try to acquire app token from the server + else{ + let response = await fetch(window.api_origin + "/auth/get-user-app-token", { + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer "+ auth_token, + }, + "body": JSON.stringify({app_uid: app_info.uid ?? app_info.uuid}), + "method": "POST", + }); + let res = await response.json(); + if(res.token){ + iframe_url.searchParams.append('puter.auth.token', res.token); + } + } + + // Add options.params to URL + if(options.params){ + iframe_url.searchParams.append('puter.domain', window.app_domain); + for (const property in options.params) { + iframe_url.searchParams.append(property, options.params[property]); + } + } + + // Add options.args to URL + iframe_url.searchParams.append('puter.args', JSON.stringify(options.args ?? {})); + + // ...and finally append urm_source=puter.com to the URL + iframe_url.searchParams.append('urm_source', 'puter.com'); + + UIWindow({ + element_uuid: uuid, + title: title, + iframe_url: iframe_url.href, + icon: icon, + window_class: 'window-app', + update_window_url: true, + app_uuid: app_info.uuid ?? app_info.uid, + // has_head: options.has_head ?? true, + // top: options.top ?? undefined, + // left: options.left ?? undefined, + // width: options.width ?? undefined, + // height: options.height ?? undefined, + // is_resizable: options.is_resizable ?? undefined, + // window_css: options.window_css ?? undefined, + top: options.maximized ? 0 : undefined, + left: options.maximized ? 0 : undefined, + height: options.maximized ? `calc(100% - ${window.taskbar_height + window.toolbar_height + 1}px)` : undefined, + width: options.maximized ? `100%` : undefined, + app: options.name, + is_maximized: options.maximized, + is_fullpage: options.is_fullpage, + ...window_options, + }); + + // send post request to /rao to record app open + if(options.name !== 'explorer'){ + // add the app to the beginning of the array + launch_apps.recent.unshift(app_info); + + // dedupe the array by uuid, uid, and id + launch_apps.recent = _.uniqBy(launch_apps.recent, 'name'); + + // limit to window.launch_recent_apps_count + launch_apps.recent = launch_apps.recent.slice(0, window.launch_recent_apps_count); + + // send post request to /rao to record app open + $.ajax({ + url: api_origin + "/rao", + type: 'POST', + data: JSON.stringify({ + original_client_socket_id: window.socket?.id, + app_uid: app_info.uid ?? app_info.uuid, + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + }) + } + } +} + +window.open_item = async function(options){ + let el_item = options.item; + const $el_parent_window = $(el_item).closest('.window'); + const parent_win_id = $($el_parent_window).attr('data-id'); + const is_dir = $(el_item).attr('data-is_dir') === '1' ? true : false; + const uid = $(el_item).attr('data-shortcut_to') === '' ? $(el_item).attr('data-uid') : $(el_item).attr('data-shortcut_to'); + const item_path = $(el_item).attr('data-shortcut_to_path') === '' ? $(el_item).attr('data-path') : $(el_item).attr('data-shortcut_to_path'); + const is_shortcut = $(el_item).attr('data-is_shortcut') === '1'; + const shortcut_to_path = $(el_item).attr('data-shortcut_to_path'); + const associated_app_name = $(el_item).attr('data-associated_app_name'); + //---------------------------------------------------------------- + // Is this a shortcut whose source is perma-deleted? + //---------------------------------------------------------------- + if(is_shortcut && shortcut_to_path === ''){ + UIAlert(`This shortcut can't be opened because its source has been deleted.`) + } + //---------------------------------------------------------------- + // Is this a shortcut whose source is trashed? + //---------------------------------------------------------------- + else if(is_shortcut && shortcut_to_path.startsWith(trash_path + '/')){ + UIAlert(`This shortcut can't be opened because its source has been deleted.`) + } + //---------------------------------------------------------------- + // Is this a trashed file? + //---------------------------------------------------------------- + else if(item_path.startsWith(trash_path + '/')){ + UIAlert(`This item can't be opened because it's in the trash. To use this item, first drag it out of the Trash.`) + } + //---------------------------------------------------------------- + // Is this a file (no dir) on a SaveFileDialog? + //---------------------------------------------------------------- + else if($el_parent_window.attr('data-is_saveFileDialog') === 'true' && !is_dir){ + $el_parent_window.find('.savefiledialog-filename').val($(el_item).attr('data-name')); + $el_parent_window.find('.savefiledialog-save-btn').trigger('click'); + } + //---------------------------------------------------------------- + // Is this a file (no dir) on an OpenFileDialog? + //---------------------------------------------------------------- + else if($el_parent_window.attr('data-is_openFileDialog') === 'true' && !is_dir){ + $el_parent_window.find('.window-disable-mask, .busy-indicator').show(); + let busy_init_ts = Date.now(); + try{ + let filedialog_parent_uid = $el_parent_window.attr('data-parent_uuid'); + let $filedialog_parent_app_window = $(`.window[data-element_uuid="${filedialog_parent_uid}"]`); + let parent_window_app_uid = $filedialog_parent_app_window.attr('data-app_uuid'); + const initiating_app_uuid = $el_parent_window.attr('data-initiating_app_uuid'); + + let res = await puter.fs.sign(window.host_app_uid ?? parent_window_app_uid, {uid: uid, action: 'write'}); + res = res.items; + // todo split is buggy because there might be a slash in the filename + res.path = `~/` + item_path.split('/').slice(2).join('/'); + const parent_uuid = $el_parent_window.attr('data-parent_uuid'); + const return_to_parent_window = $el_parent_window.attr('data-return_to_parent_window') === 'true'; + if(return_to_parent_window){ + window.opener.postMessage({ + msg: "fileOpenPicked", + original_msg_id: $el_parent_window.attr('data-iframe_msg_uid'), + items: Array.isArray(res) ? [...res] : [res], + // LEGACY SUPPORT, remove this in the future when Polotno uses the new SDK + // this is literally put in here to support Polotno's legacy code + ...(!Array.isArray(res) && res) + }, '*'); + + window.close(); + } + else if(parent_uuid){ + // send event to iframe + const target_iframe = $(`.window[data-element_uuid="${parent_uuid}"]`).find('.window-app-iframe').get(0); + if(target_iframe){ + let retobj = { + msg: "fileOpenPicked", + original_msg_id: $el_parent_window.attr('data-iframe_msg_uid'), + items: Array.isArray(res) ? [...res] : [res], + // LEGACY SUPPORT, remove this in the future when Polotno uses the new SDK + // this is literally put in here to support Polotno's legacy code + ...(!Array.isArray(res) && res) + }; + target_iframe.contentWindow.postMessage(retobj, '*'); + } + + // focus iframe + $(target_iframe).get(0)?.focus({preventScroll:true}); + + // send file_opened event + const file_opened_event = new CustomEvent('file_opened', {detail: res}); + + // dispatch event to parent window + $(`.window[data-element_uuid="${parent_uuid}"]`).get(0)?.dispatchEvent(file_opened_event); + } + }catch(e){ + console.log(e); + } + // done + let busy_duration = (Date.now() - busy_init_ts); + if( busy_duration >= busy_indicator_hide_delay){ + $el_parent_window.close(); + }else{ + setTimeout(() => { + // close this dialog + $el_parent_window.close(); + }, Math.abs(busy_indicator_hide_delay - busy_duration)); + } + } + //---------------------------------------------------------------- + // Is there an app associated with this item? + //---------------------------------------------------------------- + else if(associated_app_name !== ''){ + launch_app({ + name: associated_app_name, + }) + } + //---------------------------------------------------------------- + // Dir with no open windows: create a new window + //---------------------------------------------------------------- + else if(is_dir && ($el_parent_window.length === 0 || options.new_window)){ + UIWindow({ + path: item_path, + title: path.basename(item_path), + icon: await item_icon({is_dir: true, path: item_path}), + uid: $(el_item).attr('data-uid'), + is_dir: is_dir, + app: 'explorer', + top: options.maximized ? 0 : undefined, + left: options.maximized ? 0 : undefined, + height: options.maximized ? `calc(100% - ${window.taskbar_height + window.toolbar_height + 1}px)` : undefined, + width: options.maximized ? `100%` : undefined, + }); + } + //---------------------------------------------------------------- + // Dir with an open window: change the path of the open window + //---------------------------------------------------------------- + else if($el_parent_window.length > 0 && is_dir){ + window_nav_history[parent_win_id] = window_nav_history[parent_win_id].slice(0, window_nav_history_current_position[parent_win_id]+1); + window_nav_history[parent_win_id].push(item_path); + window_nav_history_current_position[parent_win_id]++; + + update_window_path($el_parent_window, item_path); + } + //---------------------------------------------------------------- + // all other cases: try to open using an app + //---------------------------------------------------------------- + else{ + const fspath = item_path.toLowerCase(); + const fsuid = uid.toLowerCase(); + let open_item_meta; + + // get all info needed to open an item + try{ + open_item_meta = await $.ajax({ + url: api_origin + "/open_item", + type: 'POST', + contentType: "application/json", + data: JSON.stringify({ + uid: fsuid ?? undefined, + path: fspath ?? undefined, + }), + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + }); + }catch(err){ + } + + // get a list of suggested apps for this file type. + let suggested_apps = open_item_meta?.suggested_apps ?? await suggest_apps_for_fsentry({uid: fsuid, path: fspath}); + + //--------------------------------------------- + // No suitable apps, ask if user would like to + // download + //--------------------------------------------- + if(suggested_apps.length === 0){ + //--------------------------------------------- + // If .zip file, unzip it + //--------------------------------------------- + if(path.extname(item_path) === '.zip'){ + unzipItem(item_path); + return; + } + const alert_resp = await UIAlert( + 'Found no suitable apps to open this file with. Would you like to download it instead?', + [ + { + label: 'Download File', + type: 'primary', + + }, + { + label: 'Cancel' + } + ]) + if(alert_resp === 'Download File'){ + trigger_download([item_path]); + } + return; + } + //--------------------------------------------- + // First suggested app is default app to open this item + //--------------------------------------------- + else{ + launch_app({ + name: suggested_apps[0].name, + token: open_item_meta.token, + file_path: item_path, + app_obj: suggested_apps[0], + window_title: path.basename(item_path), + file_uid: fsuid, + maximized: options.maximized, + file_signature: open_item_meta.signature, + }); + } + } +} + +/** + * Returns a context menu item to create a new file/folder. + * + * @param {string} dirname - The directory path to create the item in + * @param {HTMLElement} append_to_element - Element to append the new item to + * @returns {Object} The context menu item object + */ + +window.new_context_menu_item = function(dirname, append_to_element){ + return { + html: "New", + items: [ + // New Folder + { + html: "New Folder", + icon: ``, + onClick: function(){ + create_folder(dirname, append_to_element); + } + }, + // divider + '-', + // Text Document + { + html: `Text Document`, + icon: ``, + onClick: async function(){ + create_file({dirname: dirname, append_to_element: append_to_element, name: 'New File.txt'}); + } + }, + // HTML Document + { + html: `HTML Document`, + icon: ``, + onClick: async function(){ + create_file({dirname: dirname, append_to_element: append_to_element, name: 'New File.html'}); + } + }, + // JPG Image + { + html: `JPG Image`, + icon: ``, + onClick: async function(){ + var canvas = document.createElement("canvas"); + + canvas.width = 800; + canvas.height = 600; + + canvas.toBlob((blob) =>{ + create_file({dirname: dirname, append_to_element: append_to_element, name: 'New Image.jpg', content: blob}); + }); + } + }, + ] + } +} + +/** + * Moves the given items to the destination path. + * + * @param {HTMLElement[]} el_items - jQuery elements representing the items to move + * @param {string} dest_path - The destination path to move the items to + * @returns {Promise} + */ +window.move_items = async function(el_items, dest_path){ + let move_op_id = operation_id++; + operation_cancelled[move_op_id] = false; + + // -------------------------------------------------------- + // Optimization: in case all items being moved + // are immutable do not proceed + // -------------------------------------------------------- + let all_items_are_immutable = true; + for(let i=0; iMoving ${html_encode($(el_item).attr('data-name'))}

    Cannot move item to its current location.`) + + continue; + } + + // if an item with the same name already exists in the destination path + let item_with_same_name_already_exists = false; + let overwrite = overwrite_all; + let untrashed_at_least_one_item = false; + + // -------------------------------------------------------- + // Keep trying to move the item until it succeeds or is cancelled + // or user decides to overwrite or skip + // -------------------------------------------------------- + do{ + try{ + let path_to_show_on_progwin = $(el_item).attr('data-path'); + + // parse metadata if any + let metadata = $(el_item).attr('data-metadata'); + + // no metadata? + if(metadata === '' || metadata === 'null' || metadata === null) + metadata = {} + // try to parse metadata as JSON + else{ + try{ + metadata = JSON.parse(metadata) + }catch(e){ + } + } + + let new_name; + + // user cancelled? + if(operation_cancelled[move_op_id]) + return; + + // indicates whether this is a recycling operation + let recycling = false; + + // -------------------------------------------------------- + // Trashing + // -------------------------------------------------------- + if(dest_path === trash_path){ + new_name = $(el_item).attr('data-uid'); + metadata = { + original_name: $(el_item).attr('data-name'), + original_path: $(el_item).attr('data-path'), + trashed_ts: Math.round(Date.now() / 1000), + }; + + // update other clients + if(window.socket) + window.socket.emit('trash.is_empty', {is_empty: false}); + + // change trash icons to 'trash-full.svg' + $(`[data-app="trash"]`).find('.taskbar-icon > img').attr('src', window.icons['trash-full.svg']); + $(`.item[data-path="${html_encode(trash_path)}" i], .item[data-shortcut_to_path="${html_encode(trash_path)}" i]`).find('.item-icon > img').attr('src', window.icons['trash-full.svg']); + $(`.window[data-path="${html_encode(trash_path)}" i]`).find('.window-head-icon').attr('src', window.icons['trash-full.svg']); + } + + // moving an item into a trashed directory? deny. + else if(dest_path.startsWith(trash_path)){ + $(progwin).close(); + UIAlert('Cannot move items into a deleted folder.'); + return; + } + + // -------------------------------------------------------- + // If recycling an item, restore its original name + // -------------------------------------------------------- + else if(metadata.trashed_ts !== undefined){ + recycling = true; + new_name = metadata.original_name; + metadata = {}; + untrashed_at_least_one_item = true; + path_to_show_on_progwin = trash_path + '/' + new_name; + } + + // -------------------------------------------------------- + // update progress window with current item being moved + // -------------------------------------------------------- + $(progwin).find('.move-from').html(path_to_show_on_progwin); + + // execute move + let resp = await puter.fs.move({ + source: $(el_item).attr('data-uid'), + destination: dest_path, + overwrite: overwrite || overwrite_all, + newName: new_name, + // recycling requires making all missing dirs + createMissingParents: recycling, + newMetadata: metadata, + excludeSocketID: window.socket?.id, + }); + + let fsentry = resp.moved; + + // path must use the real name from DB + fsentry.path = path.join(dest_path, fsentry.name); + + // skip next loop iteration because this iteration was successful + item_with_same_name_already_exists = false; + + // update all shortcut_to_path + $(`.item[data-shortcut_to_path="${html_encode($(el_item).attr('data-path'))}" i]`).attr(`data-shortcut_to_path`, fsentry.path); + + // Remove all items with matching uids + $(`.item[data-uid='${$(el_item).attr('data-uid')}']`).fadeOut(150, function(){ + // find all parent windows that contain this item + let parent_windows = $(`.item[data-uid='${$(el_item).attr('data-uid')}']`).closest('.window'); + // remove this item + $(this).removeItems(); + // update parent windows' item counts and selected item counts in their footers + $(parent_windows).each(function(){ + update_explorer_footer_item_count(this); + update_explorer_footer_selected_items_count(this) + }); + }) + + // if trashing, close windows of trashed items and its descendants + if(dest_path === trash_path){ + $(`.window[data-path="${html_encode($(el_item).attr('data-path'))}" i]`).close(); + // todo this has to be case-insensitive but the `i` selector doesn't work on ^= + $(`.window[data-path^="${html_encode($(el_item).attr('data-path'))}/"]`).close(); + } + + // update all paths of its and its descendants' open windows + else{ + // todo this has to be case-insensitive but the `i` selector doesn't work on ^= + $(`.window[data-path^="${html_encode($(el_item).attr('data-path'))}/"], .window[data-path="${html_encode($(el_item).attr('data-path'))}" i]`).each(function(){ + update_window_path(this, $(this).attr('data-path').replace($(el_item).attr('data-path'), path.join(dest_path, fsentry.name))); + }) + } + + if(dest_path === trash_path){ + // remove Public Token + // todo, some client-side check to see if this dir has an FR associated with it before sending a whole ajax req + $.ajax({ + url: api_origin + "/removepubtok", + type: 'POST', + data: JSON.stringify({ + uid: $(el_item).attr('data-uid'), + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (){ + } + }) + // remove all associated permissions + // todo, some client-side check to see if this dir has an FR associated with it before sending a whole ajax req + $.ajax({ + url: api_origin + "/remove-item-perms", + type: 'POST', + data: JSON.stringify({ + uid: $(el_item).attr('data-uid'), + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (){ + } + }) + $(`.item[data-uid="${$(el_item).attr('data-uid')}"]`).find('.item-is-shared').fadeOut(300); + + // if trashing dir... + if($(el_item).attr('data-is_dir') === '1'){ + // disassociate all its websites + // todo, some client-side check to see if this dir has at least one associated website before sending ajax request + puter.hosting.delete(dir_uuid) + + $(`.mywebsites-dir-path[data-uuid="${$(el_item).attr('data-uid')}"]`).remove(); + // remove the website badge from all instances of the dir + $(`.item[data-uid="${$(el_item).attr('data-uid')}"]`).find('.item-has-website-badge').fadeOut(300); + + // remove File Rrequest Token + // todo, some client-side check to see if this dir has an FR associated with it before sending a whole ajax req + $.ajax({ + url: api_origin + "/removefr", + type: 'POST', + data: JSON.stringify({ + dir_uid: $(el_item).attr('data-uid'), + }), + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: function (){ + } + }) + } + } + + // if replacing an existing item, remove the old item that was just replaced + if(resp.overwritten?.id){ + $(`.item[data-uid=${resp.overwritten.id}]`).removeItems(); + } + + // if this is trash, get original name from item metadata + fsentry.name = metadata?.original_name || fsentry.name; + + // create new item on matching containers + UIItem({ + appendTo: $(`.item-container[data-path="${html_encode(dest_path)}" i]`), + immutable: fsentry.immutable, + associated_app_name: fsentry.associated_app?.name, + uid: fsentry.uid, + path: fsentry.path, + icon: await item_icon(fsentry), + name: (dest_path === trash_path) ? $(el_item).attr('data-name') : fsentry.name, + is_dir: fsentry.is_dir, + size: fsentry.size, + type: fsentry.type, + modified: fsentry.modified, + is_selected: false, + is_shared: (dest_path === trash_path) ? false : fsentry.is_shared, + is_shortcut: fsentry.is_shortcut, + shortcut_to: fsentry.shortcut_to, + shortcut_to_path: fsentry.shortcut_to_path, + has_website: $(el_item).attr('data-has_website') === '1', + metadata: fsentry.metadata ?? '', + suggested_apps: fsentry.suggested_apps, + }); + + // this operation may have created some missing directories, + // see if any of the directories in the path of this file is new AND + // if these new path have any open parents that need to be updated + resp.parent_dirs_created?.forEach(async dir => { + let item_container = $(`.item-container[data-path="${html_encode(path.dirname(dir.path))}" i]`); + if(item_container.length > 0 && $(`.item[data-path="${html_encode(dir.path)}" i]`).length === 0){ + UIItem({ + appendTo: item_container, + immutable: false, + uid: dir.uid, + path: dir.path, + icon: await item_icon(dir), + name: dir.name, + size: dir.size, + type: dir.type, + modified: dir.modified, + is_dir: true, + is_selected: false, + is_shared: dir.is_shared, + has_website: false, + suggested_apps: dir.suggested_apps, + }); + } + sort_items(item_container); + }); + + //sort each container + $(`.item-container[data-path="${html_encode(dest_path)}" i]`).each(function(){ + sort_items(this, $(this).attr('data-sort_by'), $(this).attr('data-sort_order')) + }) + }catch(err){ + // ----------------------------------------------------------------------- + // if item with same name already exists, ask user if they want to overwrite + // ----------------------------------------------------------------------- + if(err.code==='item_with_same_name_exists'){ + item_with_same_name_already_exists = true; + + const alert_resp = await UIAlert({ + message: `${html_encode(err.entry_name)} already exists.`, + buttons:[ + { label: 'Replace', type: 'primary',}, + ... (el_items.length > 1) ? [{label: 'Replace all'}] : [], + ... (el_items.length > 1) ? [{label: 'Skip'}] : [{label: 'Cancel'}], + ] + }) + if(alert_resp === 'Replace'){ + overwrite = true; + }else if (alert_resp === 'Replace all'){ + overwrite = true; + overwrite_all = true; + }else if(alert_resp === 'Skip' || alert_resp === 'Cancel'){ + item_with_same_name_already_exists = false; + } + } + // ----------------------------------------------------------------------- + // all other errors + // ----------------------------------------------------------------------- + else{ + item_with_same_name_already_exists = false; + // error message after source item has reappeared + $(el_item).show(0, function(){ + UIAlert(`

    Moving ${html_encode($(el_item).attr('data-name'))}

    ${err.message ?? ''}`) + }); + + break; + } + } + }while(item_with_same_name_already_exists); + + // check if trash is empty + if(untrashed_at_least_one_item){ + const trash = await puter.fs.stat(trash_path); + if(window.socket){ + window.socket.emit('trash.is_empty', {is_empty: trash.is_empty}); + } + if(trash.is_empty){ + $(`[data-app="trash"]`).find('.taskbar-icon > img').attr('src', window.icons['trash.svg']); + $(`.item[data-path="${html_encode(trash_path)}" i]`).find('.item-icon > img').attr('src', window.icons['trash.svg']); + $(`.window[data-path="${html_encode(trash_path)}" i]`).find('.window-head-icon').attr('src', window.icons['trash.svg']); + } + } + } + + // log stats to console + let move_duration = (Date.now() - move_init_ts); + console.log(`moved ${el_items.length} item${el_items.length > 1 ? 's':''} in ${move_duration}ms`); + + // ----------------------------------------------------------------------- + // DONE! close progress window with delay to allow user to see 100% progress + // ----------------------------------------------------------------------- + setTimeout(() => { + $(progwin).close(); + }, copy_progress_hide_delay); +} + +/** + * Generates sharing URLs for various social media platforms and services based on the provided arguments. + * + * @global + * @function + * @param {Object} args - Configuration object for generating share URLs. + * @param {string} [args.url] - The URL to share. + * @param {string} [args.title] - The title or headline of the content to share. + * @param {string} [args.image] - Image URL associated with the content. + * @param {string} [args.desc] - A description of the content. + * @param {string} [args.appid] - App ID for certain platforms that require it. + * @param {string} [args.redirecturl] - Redirect URL for certain platforms. + * @param {string} [args.via] - Attribution source, e.g., a Twitter username. + * @param {string} [args.hashtags] - Comma-separated list of hashtags without '#'. + * @param {string} [args.provider] - Content provider. + * @param {string} [args.language] - Content's language. + * @param {string} [args.userid] - User ID for certain platforms. + * @param {string} [args.category] - Content's category. + * @param {string} [args.phonenumber] - Phone number for platforms like SMS or Telegram. + * @param {string} [args.emailaddress] - Email address to share content to. + * @param {string} [args.ccemailaddress] - CC email address for sharing content. + * @param {string} [args.bccemailaddress] - BCC email address for sharing content. + * @returns {Object} - An object containing key-value pairs where keys are platform names and values are constructed sharing URLs. + * + * @example + * const shareConfig = { + * url: 'https://example.com', + * title: 'Check this out!', + * desc: 'This is an amazing article on example.com', + * via: 'exampleUser' + * }; + * const shareLinks = window.socialLink(shareConfig); + * console.log(shareLinks.twitter); // Outputs the constructed Twitter share link + */ +window.socialLink = function (args) { + const validargs = [ + 'url', + 'title', + 'image', + 'desc', + 'appid', + 'redirecturl', + 'via', + 'hashtags', + 'provider', + 'language', + 'userid', + 'category', + 'phonenumber', + 'emailaddress', + 'cemailaddress', + 'bccemailaddress', + ]; + + for(var i = 0; i < validargs.length; i++) { + const validarg = validargs[i]; + if(!args[validarg]) { + args[validarg] = ''; + } + } + + const url = fixedEncodeURIComponent(args.url); + const title = fixedEncodeURIComponent(args.title); + const image = fixedEncodeURIComponent(args.image); + const desc = fixedEncodeURIComponent(args.desc); + const via = fixedEncodeURIComponent(args.via); + const hash_tags = fixedEncodeURIComponent(args.hashtags); + const language = fixedEncodeURIComponent(args.language); + const user_id = fixedEncodeURIComponent(args.userid); + const category = fixedEncodeURIComponent(args.category); + const phone_number = fixedEncodeURIComponent(args.phonenumber); + const email_address = fixedEncodeURIComponent(args.emailaddress); + const cc_email_address = fixedEncodeURIComponent(args.ccemailaddress); + const bcc_email_address = fixedEncodeURIComponent(args.bccemailaddress); + + var text = title; + + if(desc) { + text += '%20%3A%20'; // This is just this, " : " + text += desc; + } + + return { + 'add.this':'http://www.addthis.com/bookmark.php?url=' + url, + 'blogger':'https://www.blogger.com/blog-this.g?u=' + url + '&n=' + title + '&t=' + desc, + 'buffer':'https://buffer.com/add?text=' + text + '&url=' + url, + 'diaspora':'https://share.diasporafoundation.org/?title=' + title + '&url=' + url, + 'douban':'http://www.douban.com/recommend/?url=' + url + '&title=' + text, + 'email':'mailto:' + email_address + '?subject=' + title + '&body=' + desc, + 'evernote':'https://www.evernote.com/clip.action?url=' + url + '&title=' + text, + 'getpocket':'https://getpocket.com/edit?url=' + url, + 'facebook':'http://www.facebook.com/sharer.php?u=' + url, + 'flattr':'https://flattr.com/submit/auto?user_id=' + user_id + '&url=' + url + '&title=' + title + '&description=' + text + '&language=' + language + '&tags=' + hash_tags + '&hidden=HIDDEN&category=' + category, + 'flipboard':'https://share.flipboard.com/bookmarklet/popout?v=2&title=' + text + '&url=' + url, + 'gmail':'https://mail.google.com/mail/?view=cm&to=' + email_address + '&su=' + title + '&body=' + url + '&bcc=' + bcc_email_address + '&cc=' + cc_email_address, + 'google.bookmarks':'https://www.google.com/bookmarks/mark?op=edit&bkmk=' + url + '&title=' + title + '&annotation=' + text + '&labels=' + hash_tags + '', + 'instapaper':'http://www.instapaper.com/edit?url=' + url + '&title=' + title + '&description=' + desc, + 'line.me':'https://lineit.line.me/share/ui?url=' + url + '&text=' + text, + 'linkedin':'https://www.linkedin.com/sharing/share-offsite/?url=' + url, + 'livejournal':'http://www.livejournal.com/update.bml?subject=' + text + '&event=' + url, + 'hacker.news':'https://news.ycombinator.com/submitlink?u=' + url + '&t=' + title, + 'ok.ru':'https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=' + url, + 'pinterest':'http://pinterest.com/pin/create/button/?url=' + url , + 'qzone':'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + url, + 'reddit':'https://reddit.com/submit?url=' + url + '&title=' + title, + 'renren':'http://widget.renren.com/dialog/share?resourceUrl=' + url + '&srcUrl=' + url + '&title=' + text + '&description=' + desc, + 'skype':'https://web.skype.com/share?url=' + url + '&text=' + text, + 'sms':'sms:' + phone_number + '?body=' + text, + 'surfingbird.ru':'http://surfingbird.ru/share?url=' + url + '&description=' + desc + '&screenshot=' + image + '&title=' + title, + 'telegram.me':'https://t.me/share/url?url=' + url + '&text=' + text + '&to=' + phone_number, + 'threema':'threema://compose?text=' + text + '&id=' + user_id, + 'tumblr':'https://www.tumblr.com/widgets/share/tool?canonicalUrl=' + url + '&title=' + title + '&caption=' + desc + '&tags=' + hash_tags, + 'twitter':'https://twitter.com/intent/tweet?url=' + url + '&text=' + text + '&via=' + via + '&hashtags=' + hash_tags, + 'vk':'http://vk.com/share.php?url=' + url + '&title=' + title + '&comment=' + desc, + 'weibo':'http://service.weibo.com/share/share.php?url=' + url + '&appkey=&title=' + title + '&pic=&ralateUid=', + 'whatsapp':'https://api.whatsapp.com/send?text=' + text + '%20' + url, + 'xing':'https://www.xing.com/spi/shares/new?url=' + url, + 'yahoo':'http://compose.mail.yahoo.com/?to=' + email_address + '&subject=' + title + '&body=' + text, + }; +} + +/** + * Encodes a URI component with enhanced safety by replacing characters + * that are not typically encoded by the standard encodeURIComponent. + * + * @param {string} str - The string to be URI encoded. + * @returns {string} - Returns the URI encoded string. + * + * @example + * const str = "Hello, world!"; + * const encodedStr = fixedEncodeURIComponent(str); + * console.log(encodedStr); // Expected output: "Hello%2C%20world%21" + */ +function fixedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return '%' + c.charCodeAt(0).toString(16); + }); +} + +/** + * Refreshes the desktop background based on the user's settings. + * If the user has set a custom desktop background URL or color, it will use that. + * If not, it defaults to a specific wallpaper image. + * + * @global + * @function + * @fires set_desktop_background - Calls this global function to set the desktop background. + * + * @example + * // This will refresh the desktop background according to the user's preference or defaults. + * window.refresh_desktop_background(); + */ +window.refresh_desktop_background = function(){ + if(window.user && (window.user.desktop_bg_url !== null || window.user.desktop_bg_color !== null)){ + window.set_desktop_background({ + url: window.user.desktop_bg_url, + fit: window.user.desktop_bg_fit, + color: window.user.desktop_bg_color, + }) + } + // default background + else{ + let wallpaper = (window.gui_env === 'prod') ? '/dist/images/wallpaper.webp' : '/images/wallpaper.webp'; + window.set_desktop_background({ + url: wallpaper, + fit: 'cover', + }); + } +} + +window.determine_website_url = function(fsentry_path){ + // search window.sites and if any site has `dir_path` set and the fsentry_path starts with that dir_path + '/', return the site's url + path + for(let i=0; i{ + if(sites && sites.length > 0){ + window.sites = sites; + }else{ + window.sites = []; + } + }) +} + +/** + * + * @param {*} el_target_container + * @param {*} target_path + */ + +window.init_upload_using_dialog = function(el_target_container, target_path = null){ + $("#upload-file-dialog").unbind('onchange'); + $("#upload-file-dialog").unbind('change'); + $("#upload-file-dialog").unbind('onChange'); + + target_path = target_path === null ? $(el_target_container).attr('data-path') : path.resolve(target_path); + $('#upload-file-dialog').trigger('click'); + $("#upload-file-dialog").on('change', async function(e){ + if($("#upload-file-dialog").val() !== ''){ + const files = $('#upload-file-dialog')[0].files; + if(files.length > 0){ + try{ + upload_items(files, target_path); + } + catch(err){ + UIAlert(err.message ?? err) + } + $('#upload-file-dialog').val(''); + } + } + else{ + return + } + }) +} + +window.upload_items = async function(items, dest_path){ + let upload_progress_window; + let opid; + + puter.fs.upload( + // what to upload + items, + // where to upload + dest_path, + // options + { + // init + init: async(operation_id, xhr)=>{ + opid = operation_id; + // create upload progress window + upload_progress_window = await UIWindowUploadProgress({operation_id: operation_id}); + // cancel btn + $(upload_progress_window).find('.upload-cancel-btn').on('click', function(e){ + $(upload_progress_window).close(); + show_save_account_notice_if_needed(); + xhr.abort(); + }) + // add to active_uploads + active_uploads[opid] = 0; + }, + // start + start: async function(){ + // change upload progress window message to uploading + $(upload_progress_window).find('.upload-progress-msg').html(`Uploading (0%)`); + }, + // progress + progress: async function(operation_id, op_progress){ + $(`[data-upload-operation-id="${operation_id}"]`).find('.upload-progress-bar').css( 'width', op_progress+'%'); + $(`[data-upload-operation-id="${operation_id}"]`).find('.upload-progress-percent').html(op_progress+'%'); + // update active_uploads + active_uploads[opid] = op_progress; + // update title if window is not visible + if(document.visibilityState !== "visible"){ + update_title_based_on_uploads(); + } + }, + // success + success: async function(items){ + // DONE + // close progress window after a bit of delay for a better UX + setTimeout(() => { + setTimeout(() => { + $(upload_progress_window).close(); + show_save_account_notice_if_needed(); + }, Math.abs(upload_progress_hide_delay)); + }) + // remove from active_uploads + delete active_uploads[opid]; + }, + // error + error: async function(err){ + $(upload_progress_window).close(); + // UIAlert(err?.message ?? 'An error occurred while uploading.'); + // remove from active_uploads + delete active_uploads[opid]; + }, + // abort + abort: async function(operation_id){ + // console.log('upload aborted'); + // remove from active_uploads + delete active_uploads[opid]; + } + } + ); +} + +window.empty_trash = async function(){ + const alert_resp = await UIAlert({ + message: `Are you sure you want to permanently delete the items in Trash?`, + buttons:[ + { + label: 'Yes', + value: 'yes', + type: 'primary', + }, + { + label: 'No', + value: 'no', + }, + ] + }) + if(alert_resp === 'no') + return; + + // only show progress window if it takes longer than 500ms to create folder + let init_ts = Date.now(); + let progwin; + let op_id = uuidv4(); + let progwin_timeout = setTimeout(async () => { + progwin = await UIWindowProgressEmptyTrash({operation_id: op_id}); + }, 500); + + await puter.fs.delete({ + paths: trash_path, + descendantsOnly: true, + recursive: true, + success: async function (resp){ + // update other clients + if(window.socket){ + window.socket.emit('trash.is_empty', {is_empty: true}); + } + // use the 'empty trash' icon for Trash + $(`[data-app="trash"]`).find('.taskbar-icon > img').attr('src', window.icons['trash.svg']); + $(`.item[data-path="${html_encode(trash_path)}" i], .item[data-shortcut_to_path="${html_encode(trash_path)}" i]`).find('.item-icon > img').attr('src', window.icons['trash.svg']); + $(`.window[data-path="${trash_path}"]`).find('.window-head-icon').attr('src', window.icons['trash.svg']); + // remove all items with trash paths + // todo this has to be case-insensitive but the `i` selector doesn't work on ^= + $(`.item[data-path^="${trash_path}/"]`).removeItems(); + // update the footer item count for Trash + update_explorer_footer_item_count($(`.window[data-path="${trash_path}"]`)) + // close progress window + clearTimeout(progwin_timeout); + setTimeout(() => { + $(progwin).close(); + }, Math.max(0, copy_progress_hide_delay - (Date.now() - init_ts))); + }, + error: async function (err){ + clearTimeout(progwin_timeout); + setTimeout(() => { + $(progwin).close(); + }, Math.max(0, copy_progress_hide_delay - (Date.now() - init_ts))); + } + }); +} + +window.copy_to_clipboard = async function(text){ + if (navigator.clipboard) { + // copy text to clipboard + await navigator.clipboard.writeText(text); + } + else{ + document.execCommand('copy'); + } +} + +window.getUsage = () => { + return fetch(api_origin + "/drivers/usage", { + headers: { + "Content-Type": "application/json", + "Authorization": "Bearer " + auth_token + }, + method: "GET" + }) + .then(response => { + // Check if the response is ok (status code in the range 200-299) + if (!response.ok) { + throw new Error('Network response was not ok'); + } + return response.json(); // Parse the response as JSON + }) + .then(data => { + // Handle the JSON data + return data; + }) + .catch(error => { + // Handle any errors + console.error('There has been a problem with your fetch operation:', error); + }); + +} + +window.determine_active_container_parent = function(){ + // the container is either an ancestor of active element... + let parent_container = $(active_element).closest('.item-container'); + // ... or a descendant of it... + if(parent_container.length === 0){ + parent_container = $(active_element).find('.item-container'); + } + // ... or siblings or cousins + if(parent_container.length === 0){ + parent_container = $(active_element).closest('.window').find('.item-container'); + } + // ... or the active element itself (if it's a container) + if(parent_container.length === 0 && active_element && $(active_element).hasClass('item-container')){ + parent_container = $(active_element); + } + // ... or if there is no active element, the selected item that is not blurred + if(parent_container.length === 0 && active_item_container){ + parent_container = active_item_container; + } + + return parent_container; +} + +window.getAppUIDFromOrigin = async function(origin) { + try { + const response = await fetch(window.api_origin + "/auth/app-uid-from-origin", { + headers: { + "Content-Type": "application/json", + "Authorization": "Bearer " + window.auth_token, + }, + body: JSON.stringify({ origin: origin }), + method: "POST", + }); + + const data = await response.json(); + + // Assuming the app_uid is in the data object, return it + return data.uid; + } catch (err) { + // Handle any errors here + console.error(err); + // You may choose to return something specific here in case of an error + return null; + } +} + +window.getUserAppToken = async function(origin) { + try { + const response = await fetch(window.api_origin + "/auth/get-user-app-token", { + headers: { + "Content-Type": "application/json", + "Authorization": "Bearer " + window.auth_token, + }, + body: JSON.stringify({ origin: origin }), + method: "POST", + }); + + const data = await response.json(); + + // return + return data; + } catch (err) { + // Handle any errors here + console.error(err); + // You may choose to return something specific here in case of an error + return null; + } +} + +window.checkUserSiteRelationship = async function(origin) { + try { + const response = await fetch(window.api_origin + "/auth/check-app ", { + headers: { + "Content-Type": "application/json", + "Authorization": "Bearer " + window.auth_token, + }, + body: JSON.stringify({ origin: origin }), + method: "POST", + }); + + const data = await response.json(); + + // return + return data; + } catch (err) { + // Handle any errors here + console.error(err); + // You may choose to return something specific here in case of an error + return null; + } +} + + +window.zipItems = async function(el_items, targetDirPath, download = true) { + const zip = new JSZip(); + + // if single item, convert to array + el_items = Array.isArray(el_items) ? el_items : [el_items]; + + // create progress window + let start_ts = Date.now(); + let progwin, progwin_timeout; + // only show progress window if it takes longer than 500ms to download + progwin_timeout = setTimeout(async () => { + progwin = await UIWindowDownloadDirProg(); + }, 500); + + for (const el_item of el_items) { + let targetPath = $(el_item).attr('data-path'); + // if directory, zip the directory + if($(el_item).attr('data-is_dir') === '1'){ + $(progwin).find('.dir-dl-status').html(`Reading ${html_encode(targetPath)}`); + // Recursively read the directory + let children = await readDirectoryRecursive(targetPath); + + // Add files to the zip + for (const child of children) { + let relativePath; + if(el_items.length === 1) + relativePath = child.relativePath; + else + relativePath = path.basename(targetPath) + '/' + child.relativePath; + + // update progress window + $(progwin).find('.dir-dl-status').html(`Zipping ${html_encode(relativePath)}`); + + // read file content + let content = await puter.fs.read(child.path); + try{ + zip.file(relativePath, content, {binary: true}); + }catch(e){ + console.error(e); + } + } + + } + // if item is a file, zip the file + else{ + let content = await puter.fs.read(targetPath); + zip.file(path.basename(targetPath), content, {binary: true}); + } + } + + // determine name of zip file + let zipName; + if(el_items.length === 1) + zipName = path.basename($(el_items[0]).attr('data-path')); + else + zipName = 'Archive'; + + // Generate the zip file + zip.generateAsync({ type: "blob" }) + .then(async function (content) { + // Trigger the download + if(download){ + const url = URL.createObjectURL(content); + const a = document.createElement("a"); + a.href = url; + a.download = zipName; + document.body.appendChild(a); + a.click(); + + // Cleanup + document.body.removeChild(a); + URL.revokeObjectURL(url); + } + // save + else + await puter.fs.write(targetDirPath + '/' + zipName + ".zip", content, {overwrite: false, dedupeName: true}) + + // close progress window + clearTimeout(progwin_timeout); + setTimeout(() => { + $(progwin).close(); + }, Math.max(0, copy_progress_hide_delay - (Date.now() - start_ts))); + }) + .catch(function (err) { + // close progress window + clearTimeout(progwin_timeout); + setTimeout(() => { + $(progwin).close(); + }, Math.max(0, copy_progress_hide_delay - (Date.now() - start_ts))); + + // handle errors + console.error("Error in zipping files: ", err); + }); +} + +async function readDirectoryRecursive(path, baseDir = '') { + let allFiles = []; + + // Read the directory + const entries = await puter.fs.readdir(path); + + // Process each entry + for (const entry of entries) { + const fullPath = `${path}/${entry.name}`; + if (entry.is_dir) { + // If entry is a directory, recursively read it + const subDirFiles = await readDirectoryRecursive(fullPath, `${baseDir}${entry.name}/`); + allFiles = allFiles.concat(subDirFiles); + } else { + // If entry is a file, add it to the list + allFiles.push({ path: fullPath, relativePath: `${baseDir}${entry.name}` }); + } + } + + return allFiles; +} + + +window.extractSubdomain = function(url) { + var subdomain = url.split('://')[1].split('.')[0]; + return subdomain; +} + +window.sleep = function(ms){ + return new Promise(resolve => setTimeout(resolve, ms)); +} + +window.unzipItem = async function(itemPath) { + // create progress window + let start_ts = Date.now(); + let progwin, progwin_timeout; + // only show progress window if it takes longer than 500ms to download + progwin_timeout = setTimeout(async () => { + progwin = await UIWindowDownloadDirProg(); + }, 500); + + const zip = new JSZip(); + let filPath = itemPath; + let file = puter.fs.read(filPath); + + zip.loadAsync(file).then(async function (zip) { + const rootdir = await puter.fs.mkdir(path.dirname(filPath) + '/' + path.basename(filPath, '.zip'), {dedupeName: true}); + Object.keys(zip.files).forEach(async function (filename) { + console.log(filename); + if(filename.endsWith('/')) + await puter.fs.mkdir(rootdir.path +'/' + filename, {createMissingParents: true}); + zip.files[filename].async('blob').then(async function (fileData) { + await puter.fs.write(rootdir.path +'/' + filename, fileData); + }).catch(function (e) { + // UIAlert(e.message); + }) + }) + // close progress window + clearTimeout(progwin_timeout); + setTimeout(() => { + $(progwin).close(); + }, Math.max(0, copy_progress_hide_delay - (Date.now() - start_ts))); + + }).catch(function (e) { + // UIAlert(e.message); + // close progress window + clearTimeout(progwin_timeout); + setTimeout(() => { + $(progwin).close(); + }, Math.max(0, copy_progress_hide_delay - (Date.now() - start_ts))); + }) +} diff --git a/src/helpers/content_type_to_icon.js b/src/helpers/content_type_to_icon.js new file mode 100644 index 00000000..56f719cd --- /dev/null +++ b/src/helpers/content_type_to_icon.js @@ -0,0 +1,55 @@ +/** + * Maps a MIME/Content type to the appropriate icon. + * + * @param {*} type + * @returns + */ +const content_type_to_icon = (type)=>{ + let icon; + if(type === null) + icon = 'file.svg'; + else if(type.startsWith('text/plain')) + icon = 'file-text.svg' + else if(type.startsWith('text/html')) + icon = 'file-html.svg' + else if(type.startsWith('text/markdown')) + icon = 'file-md.svg' + else if(type.startsWith('text/xml')) + icon = 'file-xml.svg' + else if(type.startsWith('application/json')) + icon = 'file-json.svg' + else if(type.startsWith('application/javascript')) + icon = 'file-js.svg' + else if(type.startsWith('application/pdf')) + icon = 'file-pdf.svg' + else if(type.startsWith('application/xml')) + icon = 'file-xml.svg' + else if(type.startsWith('application/x-httpd-php')) + icon = 'file-php.svg' + else if(type.startsWith('application/zip')) + icon = 'file-zip.svg' + else if(type.startsWith('text/css')) + icon = 'file-css.svg' + else if(type.startsWith('font/ttf')) + icon = 'file-ttf.svg' + else if(type.startsWith('font/otf')) + icon = 'file-otf.svg' + else if(type.startsWith('text/csv')) + icon = 'file-csv.svg' + else if(type.startsWith('image/svg')) + icon = 'file-svg.svg' + else if(type.startsWith('image/vnd.adobe.photoshop')) + icon = 'file-psd.svg' + else if(type.startsWith('image')) + icon = 'file-image.svg' + else if(type.startsWith('audio/')) + icon = 'file-audio.svg' + else if(type.startsWith('video')) + icon = 'file-video.svg' + else + icon = 'file.svg'; + + return window.icons[icon]; +} + +export default content_type_to_icon; \ No newline at end of file diff --git a/src/helpers/download.js b/src/helpers/download.js new file mode 100644 index 00000000..f2cf514b --- /dev/null +++ b/src/helpers/download.js @@ -0,0 +1,115 @@ +/** + * Launches a download process for an item, tracking its progress and handling success or error states. + * The function returns a promise that resolves with the downloaded item or rejects in case of an error. + * It uses XMLHttpRequest to manage the download and tracks progress both for the individual item and the entire batch it belongs to. + * + * @param {Object} options - Configuration options for the download process. + * @param {string} options.url - The URL from which the item will be downloaded. + * @param {string} options.operation_id - Unique identifier for the download operation, used for progress tracking. + * @param {string} options.item_upload_id - Identifier for the specific item being downloaded, used for individual progress tracking. + * @param {string} [options.name] - Optional name for the item being downloaded. + * @param {string} [options.dest_path] - Destination path for the downloaded item. + * @param {string} [options.shortcut_to] - Optional shortcut path for the item. + * @param {boolean} [options.dedupe_name=false] - Flag to enable or disable deduplication of item names. + * @param {boolean} [options.overwrite=false] - Flag to enable or disable overwriting of existing items. + * @param {function} [options.success] - Optional callback function that is executed on successful download. + * @param {function} [options.error] - Optional callback function that is executed in case of an error. + * @param {number} [options.return_timeout=500] - Optional timeout in milliseconds before resolving the download. + * @returns {Promise} A promise that resolves with the downloaded item or rejects with an error. + */ +const download = function(options){ + return new Promise((resolve, reject) => { + // The item that is being downloaded and will be returned to the caller at the end of the process + let item; + // Intervals that check for progress and cancel every few milliseconds + let progress_check_interval, cancel_check_interval; + // Progress tracker for the entire batch to which this item belongs + let batch_download_progress = window.progress_tracker[options.operation_id]; + // Tracker for this specific item's download progress + let item_download_progress = batch_download_progress[options.item_upload_id]; + + let xhr = new XMLHttpRequest(); + xhr.open("post", (api_origin + '/download'), true); + xhr.setRequestHeader("Authorization", "Bearer " + auth_token); + xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); + + xhr.addEventListener('load', function(e){ + // error + if(this.status !== 200){ + if(options.error && typeof options.error === 'function') + options.error(JSON.parse(this.responseText)) + return reject(JSON.parse(this.responseText)) + } + // success + else{ + item = JSON.parse(this.responseText); + } + }); + + // error + xhr.addEventListener('error', function(e){ + if(options.error && typeof options.error === 'function') + options.error(e) + return reject(e) + }) + + xhr.send(JSON.stringify({ + url: options.url, + operation_id: options.operation_id, + socket_id: window.socket ? window.socket.id : null, + item_upload_id: options.item_upload_id, + // original_client_socket_id: window.socket.id, + name: options.name, + path: options.dest_path, + shortcut_to: options.shortcut_to, + dedupe_name: options.dedupe_name ?? false, + overwrite: options.overwrite ?? false, + })); + + //---------------------------------------------- + // Regularly check if this operation has been cancelled by the user + //---------------------------------------------- + cancel_check_interval = setInterval(() => { + if(operation_cancelled[options.operation_id]){ + xhr.abort(); + clearInterval(cancel_check_interval); + clearInterval(progress_check_interval); + } + }, 100); + + //---------------------------------------------- + // Regularly check the progress of the cloud-write operation + //---------------------------------------------- + progress_check_interval = setInterval(function() { + // Individual item progress + let item_progress = 1; + if(item_download_progress.total) + item_progress = (item_download_progress.cloud_uploaded + item_download_progress.downloaded) / item_download_progress.total; + + // Entire batch progress + let batch_progress = ((batch_download_progress[0].cloud_uploaded + batch_download_progress[0].downloaded)/batch_download_progress[0].total * 100).toFixed(0); + batch_progress = batch_progress > 100 ? 100 : batch_progress; + + // Update the progress bar + $(`[data-download-operation-id="${options.operation_id}"]`).find('.download-progress-bar').css( 'width', batch_progress+'%'); + + // If download is finished resolve promise + if((item_progress >= 1 || item_progress === 0) && item){ + // For a better UX, resolve 0.5 second after operation is finished. + setTimeout(function() { + clearInterval(progress_check_interval); + clearInterval(cancel_check_interval); + if(options.success && typeof options.success === 'function'){ + options.success(item) + } + resolve(item); + }, options.return_timeout ?? 500); + // Stop and clear the the cloud progress check interval + clearInterval(progress_check_interval) + } + }, 200); + return xhr; + }) +} + +export default download; \ No newline at end of file diff --git a/src/helpers/update_last_touch_coordinates.js b/src/helpers/update_last_touch_coordinates.js new file mode 100644 index 00000000..4e5d96b1 --- /dev/null +++ b/src/helpers/update_last_touch_coordinates.js @@ -0,0 +1,19 @@ +/** + * Updates the last touch coordinates based on the event type. + * If the event is 'touchstart', it takes the coordinates from the touch object. + * If the event is 'mousedown', it takes the coordinates directly from the event object. + * + * @param {Event} e - The event object containing information about the touch or mouse event. + */ +const update_last_touch_coordinates = (e)=>{ + if(e.type == 'touchstart'){ + var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; + window.last_touch_x = touch.pageX; + window.last_touch_y = touch.pageY; + } else if (e.type == 'mousedown') { + window.last_touch_x = e.clientX; + window.last_touch_y = e.clientY; + } +} + +export default update_last_touch_coordinates; \ No newline at end of file diff --git a/src/helpers/update_title_based_on_uploads.js b/src/helpers/update_title_based_on_uploads.js new file mode 100644 index 00000000..40fd6b96 --- /dev/null +++ b/src/helpers/update_title_based_on_uploads.js @@ -0,0 +1,17 @@ +const update_title_based_on_uploads = function(){ + const active_uploads_count = _.size(active_uploads); + if(active_uploads_count === 1 && !isNaN(Object.values(active_uploads)[0])){ + document.title = Math.round(Object.values(active_uploads)[0]) + '% Uploading'; + }else if(active_uploads_count > 1){ + // get the average progress + let total_progress = 0; + for (const [key, value] of Object.entries(active_uploads)) { + total_progress += Math.round(value); + } + const avgprog = Math.round(total_progress / active_uploads_count) + if(!isNaN(avgprog)) + document.title = avgprog + '% Uploading'; + } +} + +export default update_title_based_on_uploads; \ No newline at end of file diff --git a/src/helpers/update_username_in_gui.js b/src/helpers/update_username_in_gui.js new file mode 100644 index 00000000..cd93fdf4 --- /dev/null +++ b/src/helpers/update_username_in_gui.js @@ -0,0 +1,67 @@ +const update_username_in_gui = function(new_username){ + // ------------------------------------------------------------ + // Update all item/window/... paths, with the new username + // ------------------------------------------------------------ + $(':not([data-path=""]),:not([data-item-path=""])').each((i, el)=>{ + const $el = $(el); + const attr_path = $el.attr('data-path'); + const attr_item_path = $el.attr('data-item-path'); + const attr_shortcut_to_path = $el.attr('data-shortcut_to_path'); + // data-path + if(attr_path && attr_path !== 'null' && attr_path !== 'undefined'){ + // /[username] + if(attr_path === '/' + window.user.username) + $el.attr('data-path', '/' + new_username); + // /[username]/... + else if (attr_path.startsWith('/' + window.user.username + '/')) + $el.attr('data-path', attr_path.replace('/' + window.user.username + '/', '/' + new_username + '/')); + + // .window-navbar-path-dirname + if($el.hasClass('window-navbar-path-dirname') && attr_path === '/' + window.user.username) + $el.text(new_username) + + // .window-navbar-path-input value + else if($el.hasClass('window-navbar-path-input')){ + // /[username] + if(attr_path === '/' + window.user.username) + $el.val('/' + new_username); + // /[username]/... + else if (attr_path.startsWith('/' + window.user.username + '/')) + $el.val(attr_path.replace('/' + window.user.username + '/', '/' + new_username + '/')); + } + } + // data-shortcut_to_path + if(attr_shortcut_to_path && attr_shortcut_to_path !== '' && attr_shortcut_to_path !== 'null' && attr_shortcut_to_path !== 'undefined'){ + // home dir + if(attr_shortcut_to_path === '/' + window.user.username) + $el.attr('data-shortcut_to_path', '/' + new_username); + // every other paths + else if(attr_shortcut_to_path.startsWith('/' + window.user.username + '/')) + $el.attr('data-shortcut_to_path', attr_shortcut_to_path.replace('/' + window.user.username + '/', '/' + new_username + '/')); + } + // data-item-path + if(attr_item_path && attr_item_path !== 'null' && attr_item_path !== 'undefined'){ + // /[username] + if(attr_item_path === '/' + window.user.username) + $el.attr('data-item-path', '/' + new_username); + // /[username]/... + else if (attr_item_path.startsWith('/' + window.user.username + '/')) + $el.attr('data-item-path', attr_item_path.replace('/' + window.user.username + '/', '/' + new_username + '/')); + } + }) + + // todo update all window paths + $('.window').each((i, el)=>{ + }) + + window.desktop_path = '/' + new_username + '/Desktop'; + window.trash_path = '/' + new_username + '/Trash'; + window.appdata_path = '/' + new_username + '/AppData'; + window.docs_path = '/' + new_username + '/Documents'; + window.pictures_path = '/' + new_username + '/Pictures'; + window.videos_path = '/' + new_username + '/Videos'; + window.desktop_path = '/' + new_username + '/Desktop'; + window.home_path = '/' + new_username; +} + +export default update_username_in_gui; \ No newline at end of file diff --git a/src/icons/app-icon-uploader.svg b/src/icons/app-icon-uploader.svg new file mode 100644 index 00000000..ed579864 --- /dev/null +++ b/src/icons/app-icon-uploader.svg @@ -0,0 +1,22 @@ + + app-icon-uploader-svg + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/app.svg b/src/icons/app.svg new file mode 100644 index 00000000..a2461f00 --- /dev/null +++ b/src/icons/app.svg @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/src/icons/arrow-left.svg b/src/icons/arrow-left.svg new file mode 100644 index 00000000..7e8b54ba --- /dev/null +++ b/src/icons/arrow-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/arrow-right.svg b/src/icons/arrow-right.svg new file mode 100644 index 00000000..a6d52a21 --- /dev/null +++ b/src/icons/arrow-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/arrow-up.svg b/src/icons/arrow-up.svg new file mode 100644 index 00000000..775cf737 --- /dev/null +++ b/src/icons/arrow-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/c-check.svg b/src/icons/c-check.svg new file mode 100644 index 00000000..41367c18 --- /dev/null +++ b/src/icons/c-check.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/icons/chevron-right-active.svg b/src/icons/chevron-right-active.svg new file mode 100644 index 00000000..4218e4f2 --- /dev/null +++ b/src/icons/chevron-right-active.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/src/icons/chevron-right.svg b/src/icons/chevron-right.svg new file mode 100644 index 00000000..1e555b4c --- /dev/null +++ b/src/icons/chevron-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/close.svg b/src/icons/close.svg new file mode 100644 index 00000000..7c6d441d --- /dev/null +++ b/src/icons/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/cog.svg b/src/icons/cog.svg new file mode 100644 index 00000000..c6453949 --- /dev/null +++ b/src/icons/cog.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/down-arrow.svg b/src/icons/down-arrow.svg new file mode 100644 index 00000000..e052ff32 --- /dev/null +++ b/src/icons/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/file-audio.svg b/src/icons/file-audio.svg new file mode 100644 index 00000000..c87ab05c --- /dev/null +++ b/src/icons/file-audio.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-cpp.svg b/src/icons/file-cpp.svg new file mode 100644 index 00000000..0ad24632 --- /dev/null +++ b/src/icons/file-cpp.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/icons/file-css.svg b/src/icons/file-css.svg new file mode 100644 index 00000000..a25f56ff --- /dev/null +++ b/src/icons/file-css.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-csv.svg b/src/icons/file-csv.svg new file mode 100644 index 00000000..a679cf62 --- /dev/null +++ b/src/icons/file-csv.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/icons/file-doc.svg b/src/icons/file-doc.svg new file mode 100644 index 00000000..ea485e4e --- /dev/null +++ b/src/icons/file-doc.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/icons/file-docx.svg b/src/icons/file-docx.svg new file mode 100644 index 00000000..ea485e4e --- /dev/null +++ b/src/icons/file-docx.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/icons/file-exe.svg b/src/icons/file-exe.svg new file mode 100644 index 00000000..5ff7ae3a --- /dev/null +++ b/src/icons/file-exe.svg @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/src/icons/file-gzip.svg b/src/icons/file-gzip.svg new file mode 100644 index 00000000..07def191 --- /dev/null +++ b/src/icons/file-gzip.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/icons/file-html.svg b/src/icons/file-html.svg new file mode 100644 index 00000000..0eaa4bc9 --- /dev/null +++ b/src/icons/file-html.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-image.svg b/src/icons/file-image.svg new file mode 100644 index 00000000..439c7594 --- /dev/null +++ b/src/icons/file-image.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/icons/file-jar.svg b/src/icons/file-jar.svg new file mode 100644 index 00000000..ac3a3105 --- /dev/null +++ b/src/icons/file-jar.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/icons/file-java.svg b/src/icons/file-java.svg new file mode 100644 index 00000000..aa495475 --- /dev/null +++ b/src/icons/file-java.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/icons/file-js.svg b/src/icons/file-js.svg new file mode 100644 index 00000000..002f687b --- /dev/null +++ b/src/icons/file-js.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-json.svg b/src/icons/file-json.svg new file mode 100644 index 00000000..d129a45b --- /dev/null +++ b/src/icons/file-json.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-jsp.svg b/src/icons/file-jsp.svg new file mode 100644 index 00000000..aa495475 --- /dev/null +++ b/src/icons/file-jsp.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/icons/file-log.svg b/src/icons/file-log.svg new file mode 100644 index 00000000..7b28deb9 --- /dev/null +++ b/src/icons/file-log.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/icons/file-md.svg b/src/icons/file-md.svg new file mode 100644 index 00000000..e03ad720 --- /dev/null +++ b/src/icons/file-md.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/icons/file-mp3.svg b/src/icons/file-mp3.svg new file mode 100644 index 00000000..19995284 --- /dev/null +++ b/src/icons/file-mp3.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/icons/file-otf.svg b/src/icons/file-otf.svg new file mode 100644 index 00000000..c3bb152b --- /dev/null +++ b/src/icons/file-otf.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-pdf.svg b/src/icons/file-pdf.svg new file mode 100644 index 00000000..ec5ec590 --- /dev/null +++ b/src/icons/file-pdf.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-php.svg b/src/icons/file-php.svg new file mode 100644 index 00000000..05a1b040 --- /dev/null +++ b/src/icons/file-php.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/icons/file-pptx.svg b/src/icons/file-pptx.svg new file mode 100644 index 00000000..c494b9c1 --- /dev/null +++ b/src/icons/file-pptx.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-psd.svg b/src/icons/file-psd.svg new file mode 100644 index 00000000..b565ed57 --- /dev/null +++ b/src/icons/file-psd.svg @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/src/icons/file-py.svg b/src/icons/file-py.svg new file mode 100644 index 00000000..3d3d8c11 --- /dev/null +++ b/src/icons/file-py.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/icons/file-rss.svg b/src/icons/file-rss.svg new file mode 100644 index 00000000..1f1efdbb --- /dev/null +++ b/src/icons/file-rss.svg @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/src/icons/file-rtf.svg b/src/icons/file-rtf.svg new file mode 100644 index 00000000..d6bc8c82 --- /dev/null +++ b/src/icons/file-rtf.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-ruby.svg b/src/icons/file-ruby.svg new file mode 100644 index 00000000..2e1aed7f --- /dev/null +++ b/src/icons/file-ruby.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-sketch.svg b/src/icons/file-sketch.svg new file mode 100644 index 00000000..439c7594 --- /dev/null +++ b/src/icons/file-sketch.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/icons/file-sql.svg b/src/icons/file-sql.svg new file mode 100644 index 00000000..084124e7 --- /dev/null +++ b/src/icons/file-sql.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/icons/file-svg.svg b/src/icons/file-svg.svg new file mode 100644 index 00000000..55848f85 --- /dev/null +++ b/src/icons/file-svg.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/icons/file-text.svg b/src/icons/file-text.svg new file mode 100644 index 00000000..a679cf62 --- /dev/null +++ b/src/icons/file-text.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/icons/file-tif.svg b/src/icons/file-tif.svg new file mode 100644 index 00000000..439c7594 --- /dev/null +++ b/src/icons/file-tif.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/icons/file-tiff.svg b/src/icons/file-tiff.svg new file mode 100644 index 00000000..439c7594 --- /dev/null +++ b/src/icons/file-tiff.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/icons/file-ttf.svg b/src/icons/file-ttf.svg new file mode 100644 index 00000000..c3bb152b --- /dev/null +++ b/src/icons/file-ttf.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-video.svg b/src/icons/file-video.svg new file mode 100644 index 00000000..7fe4b726 --- /dev/null +++ b/src/icons/file-video.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/icons/file-wav.svg b/src/icons/file-wav.svg new file mode 100644 index 00000000..a4b27cbb --- /dev/null +++ b/src/icons/file-wav.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/icons/file-xlsx.svg b/src/icons/file-xlsx.svg new file mode 100644 index 00000000..5775723e --- /dev/null +++ b/src/icons/file-xlsx.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/file-xml.svg b/src/icons/file-xml.svg new file mode 100644 index 00000000..dbc7b149 --- /dev/null +++ b/src/icons/file-xml.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/icons/file-zip.svg b/src/icons/file-zip.svg new file mode 100644 index 00000000..07def191 --- /dev/null +++ b/src/icons/file-zip.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/icons/file.svg b/src/icons/file.svg new file mode 100644 index 00000000..35ba0e3a --- /dev/null +++ b/src/icons/file.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/icons/folder-desktop.svg b/src/icons/folder-desktop.svg new file mode 100644 index 00000000..20041640 --- /dev/null +++ b/src/icons/folder-desktop.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/icons/folder-documents.svg b/src/icons/folder-documents.svg new file mode 100644 index 00000000..5e4dd017 --- /dev/null +++ b/src/icons/folder-documents.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/folder-home.svg b/src/icons/folder-home.svg new file mode 100644 index 00000000..644726be --- /dev/null +++ b/src/icons/folder-home.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/folder-pictures.svg b/src/icons/folder-pictures.svg new file mode 100644 index 00000000..581b96a2 --- /dev/null +++ b/src/icons/folder-pictures.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/folder-videos.svg b/src/icons/folder-videos.svg new file mode 100644 index 00000000..17904bd1 --- /dev/null +++ b/src/icons/folder-videos.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/folder.svg b/src/icons/folder.svg new file mode 100644 index 00000000..54b66cc7 --- /dev/null +++ b/src/icons/folder.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/icons/folders.svg b/src/icons/folders.svg new file mode 100644 index 00000000..f0f0249e --- /dev/null +++ b/src/icons/folders.svg @@ -0,0 +1,59 @@ + + folders-svg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/fullscreen.svg b/src/icons/fullscreen.svg new file mode 100644 index 00000000..8affa584 --- /dev/null +++ b/src/icons/fullscreen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/gift.svg b/src/icons/gift.svg new file mode 100644 index 00000000..3f9c07a4 --- /dev/null +++ b/src/icons/gift.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/launch-white.svg b/src/icons/launch-white.svg new file mode 100644 index 00000000..eb553cd9 --- /dev/null +++ b/src/icons/launch-white.svg @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/src/icons/launch.svg b/src/icons/launch.svg new file mode 100644 index 00000000..12101171 --- /dev/null +++ b/src/icons/launch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/layout-details.svg b/src/icons/layout-details.svg new file mode 100644 index 00000000..819f065e --- /dev/null +++ b/src/icons/layout-details.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/layout-icons.svg b/src/icons/layout-icons.svg new file mode 100644 index 00000000..1b0cf570 --- /dev/null +++ b/src/icons/layout-icons.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/layout-list.svg b/src/icons/layout-list.svg new file mode 100644 index 00000000..e40011a0 --- /dev/null +++ b/src/icons/layout-list.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/link.svg b/src/icons/link.svg new file mode 100644 index 00000000..43d34088 --- /dev/null +++ b/src/icons/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/logo-facebook.svg b/src/icons/logo-facebook.svg new file mode 100644 index 00000000..5fc7cec1 --- /dev/null +++ b/src/icons/logo-facebook.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/icons/logo-linkedin.svg b/src/icons/logo-linkedin.svg new file mode 100644 index 00000000..30fc0e34 --- /dev/null +++ b/src/icons/logo-linkedin.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/icons/logo-product-hunt.svg b/src/icons/logo-product-hunt.svg new file mode 100644 index 00000000..1ee7e78e --- /dev/null +++ b/src/icons/logo-product-hunt.svg @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/src/icons/logo-reddit.svg b/src/icons/logo-reddit.svg new file mode 100644 index 00000000..777aeadd --- /dev/null +++ b/src/icons/logo-reddit.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/icons/logo-telegram.svg b/src/icons/logo-telegram.svg new file mode 100644 index 00000000..d2602667 --- /dev/null +++ b/src/icons/logo-telegram.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/icons/logo-whatsapp.svg b/src/icons/logo-whatsapp.svg new file mode 100644 index 00000000..5cde6f78 --- /dev/null +++ b/src/icons/logo-whatsapp.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/icons/logo-white.svg b/src/icons/logo-white.svg new file mode 100644 index 00000000..c7afd558 --- /dev/null +++ b/src/icons/logo-white.svg @@ -0,0 +1,16 @@ + + + + Layer 1 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/logo.svg b/src/icons/logo.svg new file mode 100644 index 00000000..7e5fad00 --- /dev/null +++ b/src/icons/logo.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/magnifier-outline.svg b/src/icons/magnifier-outline.svg new file mode 100644 index 00000000..f0cedae8 --- /dev/null +++ b/src/icons/magnifier-outline.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/mail.svg b/src/icons/mail.svg new file mode 100644 index 00000000..d41fd513 --- /dev/null +++ b/src/icons/mail.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/minimize.svg b/src/icons/minimize.svg new file mode 100644 index 00000000..5aea5367 --- /dev/null +++ b/src/icons/minimize.svg @@ -0,0 +1,7 @@ + + Minimize + + + + \ No newline at end of file diff --git a/src/icons/owner-shared.svg b/src/icons/owner-shared.svg new file mode 100644 index 00000000..2b9f7687 --- /dev/null +++ b/src/icons/owner-shared.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/icons/palette.svg b/src/icons/palette.svg new file mode 100644 index 00000000..3d4c2528 --- /dev/null +++ b/src/icons/palette.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/icons/plug.svg b/src/icons/plug.svg new file mode 100644 index 00000000..9d6a85b5 --- /dev/null +++ b/src/icons/plug.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/icons/present.svg b/src/icons/present.svg new file mode 100644 index 00000000..be89d9a3 --- /dev/null +++ b/src/icons/present.svg @@ -0,0 +1,16 @@ + + + + + + + + \ No newline at end of file diff --git a/src/icons/profile.svg b/src/icons/profile.svg new file mode 100644 index 00000000..d4ef9026 --- /dev/null +++ b/src/icons/profile.svg @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/src/icons/qr.svg b/src/icons/qr.svg new file mode 100644 index 00000000..06879a5b --- /dev/null +++ b/src/icons/qr.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/reminder.svg b/src/icons/reminder.svg new file mode 100644 index 00000000..662b5e87 --- /dev/null +++ b/src/icons/reminder.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/icons/scale-down-3.svg b/src/icons/scale-down-3.svg new file mode 100644 index 00000000..8a4851ef --- /dev/null +++ b/src/icons/scale-down-3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/scale.svg b/src/icons/scale.svg new file mode 100644 index 00000000..48460ec2 --- /dev/null +++ b/src/icons/scale.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/share-outline.svg b/src/icons/share-outline.svg new file mode 100644 index 00000000..bc62b936 --- /dev/null +++ b/src/icons/share-outline.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/icons/shared.svg b/src/icons/shared.svg new file mode 100644 index 00000000..2b9f7687 --- /dev/null +++ b/src/icons/shared.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/icons/shortcut.svg b/src/icons/shortcut.svg new file mode 100644 index 00000000..5eb0110f --- /dev/null +++ b/src/icons/shortcut.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/icons/shrink.svg b/src/icons/shrink.svg new file mode 100644 index 00000000..8fbd1938 --- /dev/null +++ b/src/icons/shrink.svg @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/icons/start.svg b/src/icons/start.svg new file mode 100644 index 00000000..f75994dd --- /dev/null +++ b/src/icons/start.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/icons/trash-full.svg b/src/icons/trash-full.svg new file mode 100644 index 00000000..ae86bd32 --- /dev/null +++ b/src/icons/trash-full.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/trash.svg b/src/icons/trash.svg new file mode 100644 index 00000000..ee91a66a --- /dev/null +++ b/src/icons/trash.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/triangle-right.svg b/src/icons/triangle-right.svg new file mode 100644 index 00000000..1e555b4c --- /dev/null +++ b/src/icons/triangle-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/up-arrow.svg b/src/icons/up-arrow.svg new file mode 100644 index 00000000..e2a56af5 --- /dev/null +++ b/src/icons/up-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/warning-sign.svg b/src/icons/warning-sign.svg new file mode 100644 index 00000000..e3f148e6 --- /dev/null +++ b/src/icons/warning-sign.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/icons/world.svg b/src/icons/world.svg new file mode 100644 index 00000000..a4c9c746 --- /dev/null +++ b/src/icons/world.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/images/screenshot.png b/src/images/screenshot.png new file mode 100644 index 00000000..0c873268 Binary files /dev/null and b/src/images/screenshot.png differ diff --git a/src/images/wallpaper.webp b/src/images/wallpaper.webp new file mode 100644 index 00000000..ab620c60 Binary files /dev/null and b/src/images/wallpaper.webp differ diff --git a/src/index.js b/src/index.js new file mode 100644 index 00000000..d2efd1ed --- /dev/null +++ b/src/index.js @@ -0,0 +1,125 @@ +window.puter_gui_enabled = true; +/** + * Initializes and configures the GUI (Graphical User Interface) settings based on the provided options. + * + * The function sets global variables in the window object for various settings such as origins and domain names. + * It also handles loading different resources depending on the environment (development or production). + * + * @param {Object} options - Configuration options to initialize the GUI. + * @param {string} [options.gui_origin='https://puter.com'] - The origin URL for the GUI. + * @param {string} [options.api_origin='https://api.puter.com'] - The origin URL for the API. + * @param {number} [options.max_item_name_length=500] - Maximum allowed length for an item name. + * @param {boolean} [options.require_email_verification_to_publish_website=true] - Flag to decide whether email verification is required to publish a website. + * + * @property {string} [options.app_domain] - Extracted domain name from gui_origin. It's derived automatically if not provided. + * @property {string} [window.gui_env] - The environment in which the GUI is running (e.g., "dev" or "prod"). + * + * @returns {Promise} Returns a promise that resolves when initialization and resource loading are complete. + * + * @example + * window.gui({ + * gui_origin: 'https://myapp.com', + * api_origin: 'https://myapi.com', + * max_item_name_length: 250 + * }); + */ + +window.gui = async function(options){ + options = options ?? {}; + // app_origin is deprecated, use gui_origin instead + window.gui_origin = options.gui_origin ?? options.app_origin ?? `https://puter.com`; + window.app_domain = options.app_domain ?? new URL(window.gui_origin).hostname; + window.hosting_domain = options.hosting_domain ?? 'puter.site'; + window.api_origin = options.api_origin ?? "https://api.puter.com"; + window.max_item_name_length = options.max_item_name_length ?? 500; + window.require_email_verification_to_publish_website = options.require_email_verification_to_publish_website ?? true; + + // Add Puter.JS + await loadScript('https://js.puter.com/v2/'); + + // DEV: Load the initgui.js file if we are in development mode + if(!window.gui_env || window.gui_env === "dev"){ + await loadScript('/initgui.js', {isModule: true}); + } + + // PROD: load the minified bundles if we are in production mode + // note: the order of the bundles is important + // note: Build script will prepend `window.gui_env="prod"` to the top of the file + else if(gui_env === "prod"){ + // Load the minified bundles + await loadCSS('/dist/bundle.min.css'); + await loadScript('/dist/bundle.min.js'); + } + + // 🚀 Launch the GUI 🚀 + initgui(); +} + +/** +* Dynamically loads an external JavaScript file. +* @param {string} url The URL of the external script to load. +* @param {Object} [options] Optional configuration for the script. +* @param {boolean} [options.isModule] Whether the script is a module. +* @param {boolean} [options.defer] Whether the script should be deferred. +* @param {Object} [options.dataAttributes] An object containing data attributes to add to the script element. +* @returns {Promise} A promise that resolves once the script has loaded, or rejects on error. +*/ +window.loadScript = async function(url, options = {}) { + return new Promise((resolve, reject) => { + const script = document.createElement('script'); + script.src = url; + + // Set default script loading behavior + script.async = true; + + // Handle if it is a module + if (options.isModule) { + script.type = 'module'; + } + + // Handle defer attribute + if (options.defer) { + script.defer = true; + script.async = false; // When "defer" is true, "async" should be false as they are mutually exclusive + } + + // Add arbitrary data attributes + if (options.dataAttributes && typeof options.dataAttributes === 'object') { + for (const [key, value] of Object.entries(options.dataAttributes)) { + script.setAttribute(`data-${key}`, value); + } + } + + // Resolve the promise when the script is loaded + script.onload = () => resolve(); + + // Reject the promise if there's an error during load + script.onerror = (error) => reject(new Error(`Failed to load script at url: ${url}`)); + + // Append the script to the body + document.body.appendChild(script); + }); +}; + +/** +* Dynamically loads an external CSS file. +* @param {string} url The URL of the external CSS to load. +* @returns {Promise} A promise that resolves once the CSS has loaded, or rejects on error. +*/ +window.loadCSS = async function(url) { + return new Promise((resolve, reject) => { + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = url; + + link.onload = () => { + resolve(); + }; + + link.onerror = (error) => { + reject(new Error(`Failed to load CSS at url: ${url}`)); + }; + + document.head.appendChild(link); + }); +} \ No newline at end of file diff --git a/src/initgui.js b/src/initgui.js new file mode 100644 index 00000000..486b0a81 --- /dev/null +++ b/src/initgui.js @@ -0,0 +1,1920 @@ +import UIDesktop from './UI/UIDesktop.js' +import UIWindow from './UI/UIWindow.js' +import UIAlert from './UI/UIAlert.js' +import UIWindowLogin from './UI/UIWindowLogin.js'; +import UIWindowSignup from './UI/UIWindowSignup.js'; +import path from "./lib/path.js"; +import UIWindowSaveAccount from './UI/UIWindowSaveAccount.js'; +import UIWindowNewPassword from './UI/UIWindowNewPassword.js'; +import UIWindowLoginInProgress from './UI/UIWindowLoginInProgress.js'; +import UIWindowEmailConfirmationRequired from './UI/UIWindowEmailConfirmationRequired.js'; +import UIWindowSessionList from './UI/UIWindowSessionList.js'; +import UIWindowRequestPermission from './UI/UIWindowRequestPermission.js'; +import UIWindowChangeUsername from './UI/UIWindowChangeUsername.js'; +import update_last_touch_coordinates from './helpers/update_last_touch_coordinates.js'; +import update_title_based_on_uploads from './helpers/update_title_based_on_uploads.js'; +import PuterDialog from './UI/PuterDialog.js'; + +window.initgui = async function(){ + let url = new URL(window.location); + url = url.href; + + // update SDK if auth_token is different from the one in the SDK + if(window.auth_token && puter.authToken !== window.auth_token) + puter.setAuthToken(window.auth_token); + // update SDK if api_origin is different from the one in the SDK + if(window.api_origin && puter.APIOrigin !== window.api_origin) + puter.setAPIOrigin(api_origin); + + // Checks the type of device the user is on (phone, tablet, or desktop). + // Depending on the device type, it sets a class attribute on the body tag + // to style or script the page differently for each device type. + if(isMobile.phone) + $('body').attr('class', 'device-phone'); + else if(isMobile.tablet) + $('body').attr('class', 'device-tablet'); + else + $('body').attr('class', 'device-desktop'); + + // Appends a meta tag to the head of the document specifying the character encoding to be UTF-8. + // This ensures that special characters and symbols display correctly across various platforms and browsers. + $('head').append(``); + + // Appends a viewport meta tag to the head of the document, ensuring optimal display on mobile devices. + // This tag sets the width of the viewport to the device width, and locks the zoom level to 1 (prevents user scaling). + $('head').append(``); + + // GET query params provided + window.url_query_params = new URLSearchParams(window.location.search); + + // will hold the result of the whoami API call + let whoami; + + //-------------------------------------------------------------------------------------- + // Determine if an app was launched from URL + // i.e. https://puter.com/app/ + //-------------------------------------------------------------------------------------- + const url_paths = window.location.pathname.split('/').filter(element => element); + if(url_paths[0]?.toLocaleLowerCase() === 'app' && url_paths[1]){ + window.app_launched_from_url = url_paths[1]; + } + + //-------------------------------------------------------------------------------------- + // Extract 'action' from URL + //-------------------------------------------------------------------------------------- + let action; + if(url_paths[0]?.toLocaleLowerCase() === 'action' && url_paths[1]){ + action = url_paths[1].toLowerCase(); + } + + //-------------------------------------------------------------------------------------- + // Determine if we are in full-page mode + // i.e. https://puter.com/app//?puter.fullpage=true + //-------------------------------------------------------------------------------------- + if(url_query_params.has('puter.fullpage') && (url_query_params.get('puter.fullpage') === 'false' || url_query_params.get('puter.fullpage') === '0')){ + window.is_fullpage_mode = false; + }else if(url_query_params.has('puter.fullpage') && (url_query_params.get('puter.fullpage') === 'true' || url_query_params.get('puter.fullpage') === '1')){ + // In fullpage mode, we want to hide the taskbar for better UX + window.taskbar_height = 0; + + // Puter is in fullpage mode. + window.is_fullpage_mode = true; + } + + //-------------------------------------------------------------------------------------- + // Is GUI embedded in a popup? + // i.e. https://puter.com/?embedded_in_popup=true + //-------------------------------------------------------------------------------------- + if(url_query_params.has('embedded_in_popup') && (url_query_params.get('embedded_in_popup') === 'true' || url_query_params.get('embedded_in_popup') === '1')){ + window.embedded_in_popup = true; + $('body').addClass('embedded-in-popup'); + + // determine the origin of the opener + window.openerOrigin = document.referrer; + + // if no referrer, request it from the opener via messaging + if(!document.referrer){ + try{ + openerOrigin = await requestOpenerOrigin(); + }catch(e){ + throw new Error('No referrer found'); + } + } + + // this is the referrer in terms of user acquisition + window.referrerStr = openerOrigin; + + if(action === 'sign-in' && !is_auth()){ + // show signup window + if(await UIWindowSignup({ + reload_on_success: false, + send_confirmation_code: false, + show_close_button: false, + window_options:{ + has_head: false, + cover_page: true, + } + })) + await getUserAppToken(openerOrigin); + } + else if(action === 'sign-in' && is_auth()){ + if(await UIWindowSessionList({ + reload_on_success: false, + draggable_body: false, + has_head: false, + cover_page: true, + })) + await getUserAppToken(openerOrigin); + + } + } + + //-------------------------------------------------------------------------------------- + // Get user referral code from URL query params + // i.e. https://puter.com/?r=123456 + //-------------------------------------------------------------------------------------- + if(url_query_params.has('r')){ + window.referral_code = url_query_params.get('r'); + // remove 'r' from URL + window.history.pushState(null, document.title, '/'); + // show referral notice, this will be used later if Desktop is loaded + if(window.first_visit_ever) + window.show_referral_notice = true; + } + + //-------------------------------------------------------------------------------------- + // Action: Request Permission + //-------------------------------------------------------------------------------------- + if(action === 'request-permission'){ + let app_uid = url_query_params.get('app_uid'); + let origin = openerOrigin ?? url_query_params.get('origin'); + let permission = url_query_params.get('permission'); + + let granted = await UIWindowRequestPermission({ + app_uid: app_uid, + origin: origin, + permission: permission, + }); + + let messageTarget = embedded_in_popup ? window.opener : window.parent; + messageTarget.postMessage({ + msg: "permissionGranted", + granted: granted, + }, origin); + } + //-------------------------------------------------------------------------------------- + // Action: Password recovery + //-------------------------------------------------------------------------------------- + else if(action === 'set-new-password'){ + let user = url_query_params.get('user'); + let token = url_query_params.get('token'); + + await UIWindowNewPassword({ + user: user, + token: token, + }); + } + //-------------------------------------------------------------------------------------- + // Action: Change Username + //-------------------------------------------------------------------------------------- + else if(action === 'change-username'){ + await UIWindowChangeUsername(); + } + //-------------------------------------------------------------------------------------- + // Action: Login + //-------------------------------------------------------------------------------------- + else if(action === 'login'){ + await UIWindowLogin(); + } + //-------------------------------------------------------------------------------------- + // Action: Signup + //-------------------------------------------------------------------------------------- + else if(action === 'signup'){ + await UIWindowSignup(); + } + + // ------------------------------------------------------------------------------------- + // If in embedded in a popup, it is important to check whether the opener app has a relationship with the user + // if yes, we need to get the user app token and send it to the opener + // if not, we need to ask the user for confirmation before proceeding BUT only if the action is a file-picker action + // ------------------------------------------------------------------------------------- + if(window.embedded_in_popup && openerOrigin){ + let response = await checkUserSiteRelationship(openerOrigin); + window.userAppToken = response.token; + + if(logged_in_users.length > 0 && (!userAppToken || url_query_params.get('request_auth') )){ + await UIWindowSessionList({ + reload_on_success: false, + draggable_body: false, + has_head: false, + cover_page: true, + }); + } + // if not and action is show-open-file-picker, we need confirmation before proceeding + if(action === 'show-open-file-picker' || action === 'show-save-file-picker' || action === 'show-directory-picker'){ + if(!userAppToken){ + let is_confirmed = await PuterDialog(); + + if(is_confirmed === false){ + if(!is_auth()){ + window.first_visit_ever = false; + localStorage.removeItem("has_visited_before", true); + } + + window.close(); + window.open('','_self').close(); + } + } + } + } + // ------------------------------------------------------------------------------------- + // `auth_token` provided in URL, use it to log in + // ------------------------------------------------------------------------------------- + else if(url_query_params.has('auth_token')){ + let query_param_auth_token = url_query_params.get('auth_token'); + + try{ + whoami = await puter.os.user(); + }catch(e){ + if(e.status === 401){ + logout(); + return; + } + } + + if(whoami){ + if(whoami.requires_email_confirmation){ + let is_verified; + do{ + is_verified = await UIWindowEmailConfirmationRequired({ + stay_on_top: true, + has_head: false + }); + } + while(!is_verified) + } + // if user is logging in using an auth token that means it's not their first ever visit to Puter.com + // it might be their first visit to Puter on this specific device but it's not their first time ever visiting Puter. + window.first_visit_ever = false; + // show login progress window + UIWindowLoginInProgress({user_info: whoami}); + // update auth data + update_auth_data(query_param_auth_token, whoami); + } + // remove auth_token from URL + window.history.pushState(null, document.title, '/'); + } + + // ------------------------------------------------------------------------------------- + // Authed + // ------------------------------------------------------------------------------------- + if(is_auth()){ + // try to get user data using /whoami, only if that data is missing + if(!whoami){ + try{ + whoami = await puter.os.user(); + }catch(e){ + if(e.status === 401){ + logout(); + return; + } + } + } + // update local user data + if(whoami){ + // is email confirmation required? + if(whoami.requires_email_confirmation){ + let is_verified; + do{ + is_verified = await UIWindowEmailConfirmationRequired({ + stay_on_top: true, + has_head: false + }); + } + while(!is_verified) + } + update_auth_data(window.auth_token, whoami); + + // ------------------------------------------------------------------------------------- + // Load desktop, only if we're not embedded in a popup + // ------------------------------------------------------------------------------------- + if(!window.embedded_in_popup){ + puter.fs.stat(desktop_path, async function(desktop_fsentry){ + UIDesktop({desktop_fsentry: desktop_fsentry}); + }) + } + // ------------------------------------------------------------------------------------- + // If embedded in a popup, send the token to the opener and close the popup + // ------------------------------------------------------------------------------------- + else{ + let msg_id = url_query_params.get('msg_id'); + try{ + let data = await getUserAppToken(new URL(openerOrigin).origin); + // This is an implicit app and the app_uid is sent back from the server + // we cache it here so that we can use it later + window.host_app_uid = data.app_uid; + // send token to parent + window.opener.postMessage({ + msg: 'puter.token', + success: true, + token: data.token, + app_uid: data.app_uid, + username: user.username, + msg_id: msg_id, + }, openerOrigin); + // close popup + if(!action || action==='sign-in'){ + window.close(); + window.open('','_self').close(); + } + }catch(err){ + // send error to parent + window.opener.postMessage({ + msg: 'puter.token', + success: false, + token: null, + msg_id: msg_id, + }, openerOrigin); + // close popup + window.close(); + window.open('','_self').close(); + } + + let app_uid; + + if(openerOrigin){ + app_uid = await getAppUIDFromOrigin(openerOrigin); + window.host_app_uid = app_uid; + } + + if(action === 'show-open-file-picker'){ + let options = url_query_params.get('options'); + options = JSON.parse(options ?? '{}'); + + // Open dialog + UIWindow({ + allowed_file_types: options?.accept, + selectable_body: options?.multiple, + path: '/' + window.user.username + '/Desktop', + // this is the uuid of the window to which this dialog will return + return_to_parent_window: true, + show_maximize_button: false, + show_minimize_button: false, + title: 'Open', + is_dir: true, + is_openFileDialog: true, + is_resizable: false, + has_head: false, + cover_page: true, + // selectable_body: is_selectable_body, + iframe_msg_uid: msg_id, + center: true, + initiating_app_uuid: app_uid, + on_close: function(){ + window.opener.postMessage({ + msg: "fileOpenCanceled", + original_msg_id: msg_id, + }, '*'); + } + }); + } + //-------------------------------------------------------------------------------------- + // Action: Show Directory Picker + //-------------------------------------------------------------------------------------- + else if(action === 'show-directory-picker'){ + // open directory picker dialog + UIWindow({ + path: '/' + window.user.username + '/Desktop', + // this is the uuid of the window to which this dialog will return + // parent_uuid: event.data.appInstanceID, + return_to_parent_window: true, + show_maximize_button: false, + show_minimize_button: false, + title: 'Open', + is_dir: true, + is_directoryPicker: true, + is_resizable: false, + has_head: false, + cover_page: true, + // selectable_body: is_selectable_body, + iframe_msg_uid: msg_id, + center: true, + initiating_app_uuid: app_uid, + on_close: function(){ + window.opener.postMessage({ + msg: "directoryOpenCanceled", + original_msg_id: msg_id, + }, '*'); + } + }); + } + //-------------------------------------------------------------------------------------- + // Action: Show Save File Dialog + //-------------------------------------------------------------------------------------- + else if(action === 'show-save-file-picker'){ + let allowed_file_types = url_query_params.get('allowed_file_types'); + + // send 'sendMeFileData' event to parent + window.opener.postMessage({ + msg: 'sendMeFileData', + }, '*'); + + // listen for 'showSaveFilePickerPopup' event from parent + window.addEventListener('message', async (event) => { + if(event.data.msg !== 'showSaveFilePickerPopup') + return; + + // Open dialog + UIWindow({ + allowed_file_types: allowed_file_types, + path: '/' + window.user.username + '/Desktop', + // this is the uuid of the window to which this dialog will return + return_to_parent_window: true, + show_maximize_button: false, + show_minimize_button: false, + title: 'Save', + is_dir: true, + is_saveFileDialog: true, + is_resizable: false, + has_head: false, + cover_page: true, + // selectable_body: is_selectable_body, + iframe_msg_uid: msg_id, + center: true, + initiating_app_uuid: app_uid, + on_close: function(){ + window.opener.postMessage({ + msg: "fileSaveCanceled", + original_msg_id: msg_id, + }, '*'); + }, + onSaveFileDialogSave: async function(target_path, el_filedialog_window){ + $(el_filedialog_window).find('.window-disable-mask, .busy-indicator').show(); + let busy_init_ts = Date.now(); + + let overwrite = false; + let file_to_upload = new File([event.data.content], path.basename(target_path)); + let item_with_same_name_already_exists = true; + while(item_with_same_name_already_exists){ + // overwrite? + if(overwrite) + item_with_same_name_already_exists = false; + // upload + try{ + const res = await puter.fs.write( + target_path, + file_to_upload, + { + dedupeName: false, + overwrite: overwrite + } + ); + + let file_signature = await puter.fs.sign(app_uid, {uid: res.uid, action: 'write'}); + file_signature = file_signature.items; + + item_with_same_name_already_exists = false; + window.opener.postMessage({ + msg: "fileSaved", + original_msg_id: msg_id, + filename: res.name, + saved_file: { + name: file_signature.fsentry_name, + readURL: file_signature.read_url, + writeURL: file_signature.write_url, + metadataURL: file_signature.metadata_url, + type: file_signature.type, + uid: file_signature.uid, + path: `~/` + res.path.split('/').slice(2).join('/'), + }, + }, '*'); + + window.close(); + window.open('','_self').close(); + } + catch(err){ + // item with same name exists + if(err.code === 'item_with_same_name_exists'){ + const alert_resp = await UIAlert({ + message: `${html_encode(err.entry_name)} already exists.`, + buttons:[ + { + label: 'Replace', + value: 'replace', + type: 'primary', + }, + { + label: 'Cancel', + value: 'cancel', + }, + ], + parent_uuid: $(el_filedialog_window).attr('data-element_uuid'), + }) + if(alert_resp === 'replace'){ + overwrite = true; + }else if(alert_resp === 'cancel'){ + // enable parent window + $(el_filedialog_window).find('.window-disable-mask, .busy-indicator').hide(); + return; + } + } + else{ + console.log(err); + // show error + await UIAlert({ + message: err.message ?? "Upload failed.", + parent_uuid: $(el_filedialog_window).attr('data-element_uuid'), + }); + // enable parent window + $(el_filedialog_window).find('.window-disable-mask, .busy-indicator').hide(); + return; + } + } + } + + // done + let busy_duration = (Date.now() - busy_init_ts); + if( busy_duration >= busy_indicator_hide_delay){ + $(el_filedialog_window).close(); + }else{ + setTimeout(() => { + // close this dialog + $(el_filedialog_window).close(); + }, Math.abs(busy_indicator_hide_delay - busy_duration)); + } + } + }); + }); + } + } + + // ---------------------------------------------------------- + // Get user's sites + // ---------------------------------------------------------- + update_sites_cache(); + } + } + // ------------------------------------------------------------------------------------- + // Desktop Background + // If we're in fullpage/emebedded/Auth Popup mode, we don't want to load the custom background + // because it's not visible anyway and it's a waste of bandwidth + // ------------------------------------------------------------------------------------- + if(!window.is_fullpage_mode && !window.embedded_in_popup){ + refresh_desktop_background(); + } + // ------------------------------------------------------------------------------------- + // Un-authed but not first visit -> try to log in/sign up + // ------------------------------------------------------------------------------------- + if(!is_auth() && !first_visit_ever){ + if(logged_in_users.length > 0){ + UIWindowSessionList(); + } + else{ + await UIWindowLogin({ + reload_on_success: true, + send_confirmation_code: false, + window_options:{ + has_head: false + } + }); + } + } + + // ------------------------------------------------------------------------------------- + // Un-authed and first visit ever -> create temp user + // ------------------------------------------------------------------------------------- + else if(!is_auth() && first_visit_ever){ + let referrer; + try{ + referrer = new URL(window.location.href).pathname; + }catch(e){ + console.log(e) + } + + referrer = window.openerOrigin ?? referrer; + + // a global object that will be used to store the user's referrer + window.referrerStr = referrer; + + // in case there is also a referrer query param, add it to the referrer URL + if(url_query_params.has('ref')){ + if(!referrer) + referrer = '/'; + referrer += '?ref=' + html_encode(url_query_params.get('ref')); + } + + + let headers = {}; + if(window.custom_headers) + headers = window.custom_headers; + $.ajax({ + url: gui_origin + "/signup", + type: 'POST', + async: true, + headers: headers, + contentType: "application/json", + data: JSON.stringify({ + referrer: referrer, + referral_code: window.referral_code, + is_temp: true, + }), + success: async function (data){ + update_auth_data(data.token, data.user); + document.dispatchEvent(new Event("login", { bubbles: true})); + }, + error: function (err){ + $('#signup-error-msg').html(err.responseText); + $('#signup-error-msg').fadeIn(); + // re-enable 'Create Account' button + $('.signup-btn').prop('disabled', false); + } + }); + } + + // if there is at least one window open (only non-Explorer windows), ask user for confirmation when navigating away + if(feature_flags.prompt_user_when_navigation_away_from_puter){ + window.onbeforeunload = function(){ + if($(`.window:not(.window[data-app="explorer"])`).length > 0) + return true; + }; + } + + // ------------------------------------------------------------------------------------- + // `login` event handler + // -------------------------------------------------------------------------------------- + $(document).on("login", async (e) => { + // close all windows + $('.window').close(); + + // ------------------------------------------------------------------------------------- + // Load desktop, if not embedded in a popup + // ------------------------------------------------------------------------------------- + if(!window.embedded_in_popup){ + puter.fs.stat(desktop_path, function (desktop_fsentry) { + UIDesktop({ desktop_fsentry: desktop_fsentry }); + }) + } + // ------------------------------------------------------------------------------------- + // If embedded in a popup, send the 'ready' event to referrer and close the popup + // ------------------------------------------------------------------------------------- + else{ + let msg_id = url_query_params.get('msg_id'); + try{ + + let data = await getUserAppToken(new URL(openerOrigin).origin); + // This is an implicit app and the app_uid is sent back from the server + // we cache it here so that we can use it later + window.host_app_uid = data.app_uid; + // send token to parent + window.opener.postMessage({ + msg: 'puter.token', + success: true, + msg_id: msg_id, + token: data.token, + username: user.username, + app_uid: data.app_uid, + }, openerOrigin); + // close popup + if(!action || action==='sign-in'){ + window.close(); + window.open('','_self').close(); + } + }catch(err){ + // send error to parent + window.opener.postMessage({ + msg: 'puter.token', + msg_id: msg_id, + success: false, + token: null, + }, openerOrigin); + // close popup + window.close(); + window.open('','_self').close(); + } + + + let app_uid; + + if(openerOrigin){ + app_uid = await getAppUIDFromOrigin(openerOrigin); + window.host_app_uid = app_uid; + } + + //-------------------------------------------------------------------------------------- + // Action: Show Open File Picker + //-------------------------------------------------------------------------------------- + if(action === 'show-open-file-picker'){ + let options = url_query_params.get('options'); + options = JSON.parse(options ?? '{}'); + + // Open dialog + UIWindow({ + allowed_file_types: options?.accept, + selectable_body: options?.multiple, + path: '/' + window.user.username + '/Desktop', + return_to_parent_window: true, + show_maximize_button: false, + show_minimize_button: false, + title: 'Open', + is_dir: true, + is_openFileDialog: true, + is_resizable: false, + has_head: false, + cover_page: true, + iframe_msg_uid: msg_id, + center: true, + initiating_app_uuid: app_uid, + on_close: function(){ + window.opener.postMessage({ + msg: "fileOpenCanceled", + original_msg_id: msg_id, + }, '*'); + } + }); + } + //-------------------------------------------------------------------------------------- + // Action: Show Directory Picker + //-------------------------------------------------------------------------------------- + else if(action === 'show-directory-picker'){ + // open directory picker dialog + UIWindow({ + path: '/' + window.user.username + '/Desktop', + // this is the uuid of the window to which this dialog will return + // parent_uuid: event.data.appInstanceID, + return_to_parent_window: true, + show_maximize_button: false, + show_minimize_button: false, + title: 'Open', + is_dir: true, + is_directoryPicker: true, + is_resizable: false, + has_head: false, + cover_page: true, + // selectable_body: is_selectable_body, + iframe_msg_uid: msg_id, + center: true, + initiating_app_uuid: app_uid, + on_close: function(){ + window.opener.postMessage({ + msg: "directoryOpenCanceled", + original_msg_id: msg_id, + }, '*'); + } + }); + } + + //-------------------------------------------------------------------------------------- + // Action: Show Save File Dialog + //-------------------------------------------------------------------------------------- + else if(action === 'show-save-file-picker'){ + let allowed_file_types = url_query_params.get('allowed_file_types'); + + // send 'sendMeFileData' event to parent + window.opener.postMessage({ + msg: 'sendMeFileData', + }, '*'); + + // listen for 'showSaveFilePickerPopup' event from parent + window.addEventListener('message', async (event) => { + if(event.data.msg !== 'showSaveFilePickerPopup') + return; + + // Open dialog + UIWindow({ + allowed_file_types: allowed_file_types, + path: '/' + window.user.username + '/Desktop', + // this is the uuid of the window to which this dialog will return + return_to_parent_window: true, + show_maximize_button: false, + show_minimize_button: false, + title: 'Save', + is_dir: true, + is_saveFileDialog: true, + is_resizable: false, + has_head: false, + cover_page: true, + // selectable_body: is_selectable_body, + iframe_msg_uid: msg_id, + center: true, + initiating_app_uuid: app_uid, + on_close: function(){ + window.opener.postMessage({ + msg: "fileSaveCanceled", + original_msg_id: msg_id, + }, '*'); + }, + onSaveFileDialogSave: async function(target_path, el_filedialog_window){ + $(el_filedialog_window).find('.window-disable-mask, .busy-indicator').show(); + let busy_init_ts = Date.now(); + + let overwrite = false; + let file_to_upload = new File([event.data.content], path.basename(target_path)); + let item_with_same_name_already_exists = true; + while(item_with_same_name_already_exists){ + // overwrite? + if(overwrite) + item_with_same_name_already_exists = false; + // upload + try{ + const res = await puter.fs.write( + target_path, + file_to_upload, + { + dedupeName: false, + overwrite: overwrite + } + ); + + let file_signature = await puter.fs.sign(app_uid, {uid: res.uid, action: 'write'}); + file_signature = file_signature.items; + + item_with_same_name_already_exists = false; + window.opener.postMessage({ + msg: "fileSaved", + original_msg_id: msg_id, + filename: res.name, + saved_file: { + name: file_signature.fsentry_name, + readURL: file_signature.read_url, + writeURL: file_signature.write_url, + metadataURL: file_signature.metadata_url, + type: file_signature.type, + uid: file_signature.uid, + path: `~/` + res.path.split('/').slice(2).join('/'), + }, + }, '*'); + + window.close(); + window.open('','_self').close(); + // show_save_account_notice_if_needed(); + } + catch(err){ + // item with same name exists + if(err.code === 'item_with_same_name_exists'){ + const alert_resp = await UIAlert({ + message: `${html_encode(err.entry_name)} already exists.`, + buttons:[ + { + label: 'Replace', + value: 'replace', + type: 'primary', + }, + { + label: 'Cancel', + value: 'cancel', + }, + ], + parent_uuid: $(el_filedialog_window).attr('data-element_uuid'), + }) + if(alert_resp === 'replace'){ + overwrite = true; + }else if(alert_resp === 'cancel'){ + // enable parent window + $(el_filedialog_window).find('.window-disable-mask, .busy-indicator').hide(); + return; + } + } + else{ + console.log(err); + // show error + await UIAlert({ + message: err.message ?? "Upload failed.", + parent_uuid: $(el_filedialog_window).attr('data-element_uuid'), + }); + // enable parent window + $(el_filedialog_window).find('.window-disable-mask, .busy-indicator').hide(); + return; + } + } + } + + // done + let busy_duration = (Date.now() - busy_init_ts); + if( busy_duration >= busy_indicator_hide_delay){ + $(el_filedialog_window).close(); + }else{ + setTimeout(() => { + // close this dialog + $(el_filedialog_window).close(); + }, Math.abs(busy_indicator_hide_delay - busy_duration)); + } + } + + }); + }); + } + + } + + }) + + $(".popover, .context-menu").on("remove", function () { + $('.window-active .window-app-iframe').css('pointer-events', 'all'); + }) + + // If the document is clicked/tapped somewhere + $(document).bind("mousedown touchstart", function (e) { + // update last touch coordinates + update_last_touch_coordinates(e); + + // dismiss touchstart on regular devices + if(e.type === 'touchstart' && !isMobile.phone && !isMobile.tablet) + return; + + // If .item-container clicked, unselect all its item children + if($(e.target).hasClass('item-container') && !e.ctrlKey && !e.metaKey){ + $(e.target).children('.item-selected').removeClass('item-selected'); + update_explorer_footer_selected_items_count(e.target); + } + + // If the clicked element is not a context menu, remove all context menus + if ($(e.target).parents(".context-menu").length === 0) { + const $ctxmenus = $(".context-menu"); + $ctxmenus.fadeOut(200, function(){ + $ctxmenus.remove(); + }); + } + + // click on anything will close all popovers, but there are some exceptions + if(!$(e.target).hasClass('start-app') + && !$(e.target).hasClass('launch-search') + && !$(e.target).hasClass('launch-search-clear') + && $(e.target).closest('.start-app').length === 0 + && !isMobile.phone && !isMobile.table + && !$(e.target).hasClass('popover') + && $(e.target).parents('.popover').length === 0){ + + $(".popover").fadeOut(200, function(){ + $(".popover").remove(); + }); + } + + // Close all tooltips + $('.ui-tooltip').remove(); + + // rename items whose names were being edited + if(!$(e.target).hasClass('item-name-editor')){ + // blurring an Item Name Editor will automatically trigger renaming the item + $(".item-name-editor-active").blur(); + } + + // update active_item_container + if($(e.target).hasClass('item-container')){ + active_item_container = e.target; + }else{ + let ic = $(e.target).closest('.item-container') + if(ic.length > 0){ + active_item_container = ic.get(0); + }else{ + let pp = $(e.target).find('.item-container') + if(pp.length > 0){ + active_item_container = pp.get(0); + } + } + } + + //active element + active_element = e.target; + }); + + $(document).bind('keydown', async function(e){ + const focused_el = document.activeElement; + + //----------------------------------------------------------------------- + // ← ↑ → ↓: an arrow key is pressed + //----------------------------------------------------------------------- + if((e.which === 37 || e.which === 38 || e.which === 39 || e.which === 40)){ + // ---------------------------------------------- + // Launch menu is open + // ---------------------------------------------- + if($('.launch-popover').length > 0){ + // If no item is selected and down arrow is pressed, select the first item + if($('.launch-popover .start-app-card.launch-app-selected').length === 0 && (e.which === 40)){ + $('.launch-popover .start-app-card:visible').first().addClass('launch-app-selected'); + // blur search input + $('.launch-popover .launch-search').blur(); + return false; + } + // if search input is focused and left or right arrow is pressed, return false + else if($('.launch-popover .launch-search').is(':focus') && (e.which === 37 || e.which === 39)){ + return false; + } + else{ + // If an item is already selected, move the selection up, down, left or right + let selected_item = $('.launch-popover .start-app-card.launch-app-selected').get(0); + let selected_item_index = $('.launch-popover .start-app-card:visible').index(selected_item); + let selected_item_row = Math.floor(selected_item_index / 5); + let selected_item_col = selected_item_index % 5; + let selected_item_row_count = Math.ceil($('.launch-popover .start-app-card:visible').length / 5); + let selected_item_col_count = 5; + let new_selected_item_index = selected_item_index; + let new_selected_item_row = selected_item_row; + let new_selected_item_col = selected_item_col; + let new_selected_item; + + // if up arrow is pressed + if(e.which === 38){ + // if this item is in the first row, up arrow should bring the focus back to the search input + if(selected_item_row === 0){ + $('.launch-popover .launch-search').focus(); + // unselect all items + $('.launch-popover .start-app-card.launch-app-selected').removeClass('launch-app-selected'); + // bring cursor to the end of the search input + $('.launch-popover .launch-search').val($('.launch-popover .launch-search').val()); + + return false; + } + // if this item is not in the first row, move the selection up + else{ + new_selected_item_row = selected_item_row - 1; + if(new_selected_item_row < 0) + new_selected_item_row = selected_item_row_count - 1; + } + } + // if down arrow is pressed + else if(e.which === 40){ + new_selected_item_row = selected_item_row + 1; + if(new_selected_item_row >= selected_item_row_count) + new_selected_item_row = 0; + } + // if left arrow is pressed + else if(e.which === 37){ + new_selected_item_col = selected_item_col - 1; + if(new_selected_item_col < 0) + new_selected_item_col = selected_item_col_count - 1; + } + // if right arrow is pressed + else if(e.which === 39){ + new_selected_item_col = selected_item_col + 1; + if(new_selected_item_col >= selected_item_col_count) + new_selected_item_col = 0; + } + new_selected_item_index = (new_selected_item_row * selected_item_col_count) + new_selected_item_col; + new_selected_item = $('.launch-popover .start-app-card:visible').get(new_selected_item_index); + $(selected_item).removeClass('launch-app-selected'); + $(new_selected_item).addClass('launch-app-selected'); + + // make sure the selected item is visible in the popover by scrolling the popover + let popover = $('.launch-popover').get(0); + let popover_height = $('.launch-popover').height(); + let popover_scroll_top = popover.getBoundingClientRect().top; + let popover_scroll_bottom = popover_scroll_top + popover_height; + let selected_item_top = new_selected_item.getBoundingClientRect().top; + let selected_item_bottom = new_selected_item.getBoundingClientRect().bottom; + let isVisible = (selected_item_top >= popover_scroll_top) && (selected_item_bottom <= popover_scroll_top + popover_height); + + if ( ! isVisible ) { + const scrollTop = selected_item_top - popover_scroll_top; + const scrollBot = selected_item_bottom - popover_scroll_bottom; + if (Math.abs(scrollTop) < Math.abs(scrollBot)) { + popover.scrollTop += scrollTop; + } else { + popover.scrollTop += scrollBot; + } + } + return false; + } + } + // ---------------------------------------------- + // A context menu is open + // ---------------------------------------------- + else if($('.context-menu').length > 0){ + // if no item is selected and down arrow is pressed, select the first item + if($('.context-menu-active .context-menu-item-active').length === 0 && (e.which === 40)){ + let selected_item = $('.context-menu-active .context-menu-item').get(0); + select_ctxmenu_item(selected_item); + return false; + } + // if no item is selected and up arrow is pressed, select the last item + else if($('.context-menu-active .context-menu-item-active').length === 0 && (e.which === 38)){ + let selected_item = $('.context-menu .context-menu-item').get($('.context-menu .context-menu-item').length - 1); + select_ctxmenu_item(selected_item); + return false; + } + // if an item is selected and down arrow is pressed, select the next enabled item + else if($('.context-menu-active .context-menu-item-active').length > 0 && (e.which === 40)){ + let selected_item = $('.context-menu-active .context-menu-item-active').get(0); + let selected_item_index = $('.context-menu-active .context-menu-item').index(selected_item); + let new_selected_item_index = selected_item_index + 1; + let new_selected_item = $('.context-menu-active .context-menu-item').get(new_selected_item_index); + while($(new_selected_item).hasClass('context-menu-item-disabled')){ + new_selected_item_index = new_selected_item_index + 1; + new_selected_item = $('.context-menu-active .context-menu-item').get(new_selected_item_index); + } + select_ctxmenu_item(new_selected_item); + return false; + } + // if an item is selected and up arrow is pressed, select the previous enabled item + else if($('.context-menu-active .context-menu-item-active').length > 0 && (e.which === 38)){ + let selected_item = $('.context-menu-active .context-menu-item-active').get(0); + let selected_item_index = $('.context-menu-active .context-menu-item').index(selected_item); + let new_selected_item_index = selected_item_index - 1; + let new_selected_item = $('.context-menu-active .context-menu-item').get(new_selected_item_index); + while($(new_selected_item).hasClass('context-menu-item-disabled')){ + new_selected_item_index = new_selected_item_index - 1; + new_selected_item = $('.context-menu-active .context-menu-item').get(new_selected_item_index); + } + select_ctxmenu_item(new_selected_item); + return false; + } + // if right arrow is pressed, open the submenu by triggering a mouseover event + else if($('.context-menu-active .context-menu-item-active').length > 0 && (e.which === 39)){ + const selected_item = $('.context-menu-active .context-menu-item-active').get(0); + $(selected_item).trigger('mouseover'); + // if the submenu is open, select the first item in the submenu + if($(selected_item).hasClass('context-menu-item-submenu') === true){ + $(selected_item).removeClass('context-menu-item-active'); + $(selected_item).addClass('context-menu-item-active-blurred'); + select_ctxmenu_item($('.context-menu[data-is-submenu="true"] .context-menu-item').get(0)); + } + return false; + } + // if left arrow is pressed on a submenu, close the submenu + else if($('.context-menu-active[data-is-submenu="true"]').length > 0 && (e.which === 37)){ + // get parent menu + let parent_menu_id = $('.context-menu-active[data-is-submenu="true"]').data('parent-id'); + let parent_menu = $('.context-menu[data-element-id="' + parent_menu_id + '"]'); + // remove the submenu + $('.context-menu-active[data-is-submenu="true"]').remove(); + // activate the parent menu + $(parent_menu).addClass('context-menu-active'); + // select the item that opened the submenu + let selected_item = $('.context-menu-active .context-menu-item-active-blurred').get(0); + $(selected_item).removeClass('context-menu-item-active-blurred'); + $(selected_item).addClass('context-menu-item-active'); + + return false; + } + // if enter is pressed, trigger a click event on the selected item + else if($('.context-menu-active .context-menu-item-active').length > 0 && (e.which === 13)){ + let selected_item = $('.context-menu-active .context-menu-item-active').get(0); + $(selected_item).trigger('click'); + return false; + } + } + // ---------------------------------------------- + // Navigate items in the active item container + // ---------------------------------------------- + else if(!$(focused_el).is('input') && !$(focused_el).is('textarea') && (e.which === 37 || e.which === 38 || e.which === 39 || e.which === 40)){ + let item_width = 110, item_height = 110, selected_item; + // select first item in container if none is selected + if($(active_item_container).find('.item-selected').length === 0){ + selected_item = $(active_item_container).find('.item').get(0); + active_element = selected_item; + $(active_item_container).find('.item-selected').removeClass('item-selected'); + $(selected_item).addClass('item-selected'); + return false; + } + // if Shift key is pressed and ONE item is already selected, pick that item + else if($(active_item_container).find('.item-selected').length === 1 && e.shiftKey){ + selected_item = $(active_item_container).find('.item-selected').get(0); + } + // if Shift key is pressed and MORE THAN ONE item is selected, pick the latest active item + else if($(active_item_container).find('.item-selected').length > 1 && e.shiftKey){ + selected_item = $(active_element).hasClass('item') ? active_element : $(active_element).closest('.item').get(0); + } + // otherwise if an item is selected, pick that item + else if($(active_item_container).find('.item-selected').length === 1){ + selected_item = $(active_item_container).find('.item-selected').get(0); + } + else{ + selected_item = $(active_element).hasClass('item') ? active_element : $(active_element).closest('.item').get(0); + } + + // override the default behavior of ctrl/meta key + // in some browsers ctrl/meta key + arrow keys will scroll the page or go back/forward in history + if(e.ctrlKey || e.metaKey){ + e.preventDefault(); + e.stopPropagation(); + } + + // get the position of the selected item + let active_el_pos = $(selected_item).hasClass('item') ? selected_item.getBoundingClientRect() : $(selected_item).closest('.item').get(0).getBoundingClientRect(); + let xpos = active_el_pos.left + item_width/2; + let ypos = active_el_pos.top + item_height/2; + // these hold next item's position on the grid + let x_nxtpos, y_nxtpos; + // these hold the amount of pixels to scroll the container + let x_scroll = 0, y_scroll = 0; + // determine next item's position on the grid + // left + if(e.which === 37){ + x_nxtpos = (xpos - item_width) > 0 ? (xpos - item_width) : 0; + y_nxtpos = (ypos); + x_scroll = (item_width / 2); + } + // up + else if(e.which === 38){ + x_nxtpos = (xpos); + y_nxtpos = (ypos - item_height) > 0 ? (ypos - item_height) : 0; + y_scroll = -1 * (item_height / 2); + } + // right + else if(e.which === 39){ + x_nxtpos = (xpos + item_width); + y_nxtpos = (ypos); + x_scroll = -1 * (item_width / 2); + } + // down + else if(e.which === 40){ + x_nxtpos = (xpos); + y_nxtpos = (ypos + item_height); + y_scroll = (item_height / 2); + } + + let elements_at_next_pos = document.elementsFromPoint(x_nxtpos, y_nxtpos); + let next_item; + for (let index = 0; index < elements_at_next_pos.length; index++) { + const elem_at_next_pos = elements_at_next_pos[index]; + if($(elem_at_next_pos).hasClass('item') && $(elem_at_next_pos).closest('.item-container').is(active_item_container)){ + next_item = elem_at_next_pos; + break; + } + } + + if(next_item){ + selected_item = next_item; + active_element = next_item; + // if ctrl or meta key is not pressed, unselect all items + if(!e.shiftKey){ + $(active_item_container).find('.item').removeClass('item-selected'); + } + $(next_item).addClass('item-selected'); + window.latest_selected_item = next_item; + // scroll to the selected item only if this was a down or up move + if(e.which === 38 || e.which === 40) + next_item.scrollIntoView(false); + } + } + } + //----------------------------------------------------------------------- + // if the Esc key is pressed on a FileDialog/Alert, close that FileDialog/Alert + //----------------------------------------------------------------------- + else if( + // escape key code + e.which === 27 && + // active window must be a FileDialog or Alert + ($('.window-active').hasClass('window-filedialog') || $('.window-active').hasClass('window-alert')) && + // either don't close if an input is focused or if the input is the filename input + ((!$(focused_el).is('input') && !$(focused_el).is('textarea')) || $(focused_el).hasClass('savefiledialog-filename')) + ){ + // close the FileDialog + $('.window-active').close(); + } + //----------------------------------------------------------------------- + // if the Esc key is pressed on a Window Navbar Editor, deactivate the editor + //----------------------------------------------------------------------- + else if( e.which === 27 && $(focused_el).hasClass('window-navbar-path-input')){ + $(focused_el).blur(); + $(focused_el).val($(focused_el).closest('.window').attr('data-path')); + $(focused_el).attr('data-path', $(focused_el).closest('.window').attr('data-path')); + } + + //----------------------------------------------------------------------- + // Esc key should: + // - always close open context menus + // - close the Launch Popover if it's open + //----------------------------------------------------------------------- + if( e.which === 27){ + // close open context menus + $('.context-menu').remove(); + + // close the Launch Popover if it's open + $(".launch-popover").closest('.popover').fadeOut(200, function(){ + $(".launch-popover").closest('.popover').remove(); + }); + } + }) + + $(document).bind('keyup', async function(e){ + const focused_el = document.activeElement; + + //----------------------------------------------------------------------- + // Delete (win)/ shift+del (Mac) key pressed + //----------------------------------------------------------------------- + if(e.keyCode === 46 || (e.keyCode === 8 && (e.ctrlKey || e.metaKey))) { + // permanent delete? + let $selected_items = $(active_element).closest(`.item-container`).find(`.item-selected[data-path^="${trash_path + '/'}"]`); + if($selected_items.length > 0){ + const alert_resp = await UIAlert({ + message: `Are you sure you want to permanently delete these items?`, + buttons:[ + { + label: 'Delete', + type: 'primary', + }, + { + label: 'Cancel' + }, + ] + }) + if((alert_resp) === 'Delete'){ + for (let index = 0; index < $selected_items.length; index++) { + const element = $selected_items[index]; + await delete_item(element); + } + const trash = await puter.fs.stat(trash_path); + if(window.socket){ + window.socket.emit('trash.is_empty', {is_empty: trash.is_empty}); + } + + if(trash.is_empty){ + $(`[data-app="trash"]`).find('.taskbar-icon > img').attr('src', window.icons['trash.svg']); + $(`.item[data-path="${html_encode(trash_path)}" i]`).find('.item-icon > img').attr('src', window.icons['trash.svg']); + $(`.window[data-path="${html_encode(trash_path)}"]`).find('.window-head-icon').attr('src', window.icons['trash.svg']); + } + } + } + // regular delete? + else{ + $selected_items = $(active_element).closest('.item-container').find('.item-selected'); + if($selected_items.length > 0){ + move_items($selected_items, trash_path); + } + } + } + + //----------------------------------------------------------------------- + // A letter or number is pressed and there is no context menu open: search items by name + //----------------------------------------------------------------------- + if(!e.ctrlKey && !e.metaKey && !$(focused_el).is('input') && !$(focused_el).is('textarea') && $('.context-menu').length === 0){ + if(keypress_item_seach_term !== '') + clearTimeout(keypress_item_seach_buffer_timeout); + + keypress_item_seach_buffer_timeout = setTimeout(()=>{ + keypress_item_seach_term = ''; + }, 700); + + keypress_item_seach_term += e.key.toLocaleLowerCase(); + + let matches= []; + const selected_items = $(active_item_container).find(`.item-selected`).not('.item-disabled').first(); + + // if one item is selected and the selected item matches the search term, don't continue search and select this item again + if(selected_items.length === 1 && $(selected_items).attr('data-name').toLowerCase().startsWith(keypress_item_seach_term)){ + return false; + } + + // search for matches + let haystack = $(active_item_container).find(`.item`).not('.item-disabled'); + for(let j=0; j < haystack.length; j++){ + if($(haystack[j]).attr('data-name').toLowerCase().startsWith(keypress_item_seach_term)){ + matches.push(haystack[j]) + } + } + + if(matches.length > 0){ + // if there are multiple matches and an item is already selected, remove all matches before the selected item + if(selected_items.length > 0 && matches.length > 1){ + let match_index; + for(let i=0; i < matches.length - 1; i++){ + if($(matches[i]).is(selected_items)){ + match_index = i; + break; + } + } + matches.splice(0, match_index+1); + } + // deselect all selected sibling items + $(active_item_container).find(`.item-selected`).removeClass('item-selected'); + // select matching item + $(matches[0]).not('.item-disabled').addClass('item-selected'); + matches[0].scrollIntoView(false); + update_explorer_footer_selected_items_count($(active_element).closest('.window')); + } + + return false; + } + //----------------------------------------------------------------------- + // A letter or number is pressed and there is a context menu open: search items by name + //----------------------------------------------------------------------- + else if(!e.ctrlKey && !e.metaKey && !$(focused_el).is('input') && !$(focused_el).is('textarea') && $('.context-menu').length > 0){ + if(keypress_item_seach_term !== '') + clearTimeout(keypress_item_seach_buffer_timeout); + + keypress_item_seach_buffer_timeout = setTimeout(()=>{ + keypress_item_seach_term = ''; + }, 700); + + keypress_item_seach_term += e.key.toLocaleLowerCase(); + + let matches= []; + const selected_items = $('.context-menu').find(`.context-menu-item-active`).first(); + + // if one item is selected and the selected item matches the search term, don't continue search and select this item again + if(selected_items.length === 1 && $(selected_items).text().toLowerCase().startsWith(keypress_item_seach_term)){ + return false; + } + + // search for matches + let haystack = $('.context-menu-active').find(`.context-menu-item`); + for(let j=0; j < haystack.length; j++){ + if($(haystack[j]).text().toLowerCase().startsWith(keypress_item_seach_term)){ + matches.push(haystack[j]) + } + } + + if(matches.length > 0){ + // if there are multiple matches and an item is already selected, remove all matches before the selected item + if(selected_items.length > 0 && matches.length > 1){ + let match_index; + for(let i=0; i < matches.length - 1; i++){ + if($(matches[i]).is(selected_items)){ + match_index = i; + break; + } + } + matches.splice(0, match_index+1); + } + // deselect all selected sibling items + $('.context-menu').find(`.context-menu-item-active`).removeClass('context-menu-item-active'); + // select matching item + $(matches[0]).addClass('context-menu-item-active'); + // matches[0].scrollIntoView(false); + // update_explorer_footer_selected_items_count($(active_element).closest('.window')); + } + + return false; + } + }) + + $(document).bind("keyup keydown", async function(e){ + const focused_el = document.activeElement; + //----------------------------------------------------------------------------- + // Override ctrl/cmd + s/o + //----------------------------------------------------------------------------- + if((e.ctrlKey || e.metaKey) && (e.which === 83 || e.which === 79)){ + e.preventDefault() + return false; + } + //----------------------------------------------------------------------------- + // Select All + // ctrl/command + a, will select all items on desktop and windows + //----------------------------------------------------------------------------- + if((e.ctrlKey || e.metaKey) && e.which === 65 && !$(focused_el).is('input') && !$(focused_el).is('textarea')){ + let $parent_container = $(active_element).closest('.item-container'); + if($parent_container.length === 0) + $parent_container = $(active_element).find('.item-container'); + + if($parent_container.attr('data-multiselectable') === 'false') + return false; + + if($parent_container){ + $($parent_container).find('.item').not('.item-disabled').addClass('item-selected'); + update_explorer_footer_selected_items_count($parent_container.closest('.window')); + } + + return false; + } + //----------------------------------------------------------------------------- + // Close Window + // ctrl + w, will close the active window + //----------------------------------------------------------------------------- + if(e.ctrlKey && e.which === 87){ + let $parent_window = $(active_element).closest('.window'); + if($parent_window.length === 0) + $parent_window = $(active_element).find('.window'); + + + if($parent_window !== null){ + $($parent_window).close(); + } + } + + //----------------------------------------------------------------------------- + // Copy + // ctrl/command + c, will copy selected items on the active element to the clipboard + //----------------------------------------------------------------------------- + if((e.ctrlKey || e.metaKey) && e.which === 67 && + $(mouseover_window).attr('data-is_dir') !== 'false' && + $(mouseover_window).attr('data-path') !== trash_path && + !$(focused_el).is('input') && + !$(focused_el).is('textarea')){ + let $selected_items; + + let parent_container = $(active_element).closest('.item-container'); + if(parent_container.length === 0) + parent_container = $(active_element).find('.item-container'); + + if(parent_container !== null){ + $selected_items = $(parent_container).find('.item-selected'); + if($selected_items.length > 0){ + clipboard = []; + clipboard_op = 'copy'; + $selected_items.each(function() { + // error if trash is being copied + if($(this).attr('data-path') === trash_path){ + return; + } + // add to clipboard + clipboard.push({path: $(this).attr('data-path'), uid: $(this).attr('data-uid'), metadata: $(this).attr('data-metadata')}); + }) + } + } + return false; + } + //----------------------------------------------------------------------------- + // Cut + // ctrl/command + x, will copy selected items on the active element to the clipboard + //----------------------------------------------------------------------------- + if((e.ctrlKey || e.metaKey) && e.which === 88 && !$(focused_el).is('input') && !$(focused_el).is('textarea')){ + let $selected_items; + let parent_container = $(active_element).closest('.item-container'); + if(parent_container.length === 0) + parent_container = $(active_element).find('.item-container'); + + if(parent_container !== null){ + $selected_items = $(parent_container).find('.item-selected'); + if($selected_items.length > 0){ + clipboard = []; + clipboard_op = 'move'; + $selected_items.each(function() { + clipboard.push($(this).attr('data-path')); + }) + } + } + return false; + } + //----------------------------------------------------------------------- + // Open + // Enter key on a selected item will open it + //----------------------------------------------------------------------- + if(e.which === 13 && !$(focused_el).is('input') && !$(focused_el).is('textarea') && (Date.now() - last_enter_pressed_to_rename_ts) >200 + // prevent firing twice, because this will be fired on both keyup and keydown + && e.type === 'keydown'){ + let $selected_items; + + e.preventDefault(); + e.stopPropagation(); + + // --------------------------------------------- + // if this is a selected Launch menu item, open it + // --------------------------------------------- + if($('.launch-app-selected').length > 0){ + // close launch menu + $(".launch-popover").fadeOut(200, function(){ + launch_app({ + name: $('.launch-app-selected').attr('data-name'), + }) + $(".launch-popover").remove(); + }); + + return false; + } + // --------------------------------------------- + // if this is a selected context menu item, open it + // --------------------------------------------- + else if($('.context-menu-active .context-menu-item-active').length > 0 && (e.which === 13)){ + // let selected_item = $('.context-menu-active .context-menu-item-active').get(0); + // $(selected_item).trigger('mouseover'); + // $(selected_item).trigger('click'); + + let selected_item = $('.context-menu-active .context-menu-item-active').get(0); + $(selected_item).removeClass('context-menu-item-active'); + $(selected_item).addClass('context-menu-item-active-blurred'); + $(selected_item).trigger('mouseover'); + $(selected_item).trigger('click'); + if($('.context-menu[data-is-submenu="true"]').length > 0){ + let selected_item = $('.context-menu[data-is-submenu="true"] .context-menu-item').get(0); + select_ctxmenu_item(selected_item); + } + + return false; + } + // --------------------------------------------- + // if this is a selected item, open it + // --------------------------------------------- + else if(active_item_container){ + $selected_items = $(active_item_container).find('.item-selected'); + if($selected_items.length > 0){ + $selected_items.each(function() { + open_item({ + item: this, + new_window: e.metaKey || e.ctrlKey, + }); + }) + } + return false; + } + + return false; + } + //---------------------------------------------- + // Paste + // ctrl/command + v, will paste items from the clipboard to the active element + //---------------------------------------------- + if((e.ctrlKey || e.metaKey) && e.which === 86 && !$(focused_el).is('input') && !$(focused_el).is('textarea')){ + let target_path, target_el; + + // continue only if there is something in the clipboard + if(clipboard.length === 0) + return; + + let parent_container = determine_active_container_parent(); + + if(parent_container){ + target_el = parent_container; + target_path = $(parent_container).attr('data-path'); + // don't allow pasting in Trash + if((target_path === trash_path || target_path.startsWith(trash_path + '/')) && clipboard_op !== 'move') + return; + // execute clipboard operation + if(clipboard_op === 'copy') + copy_clipboard_items(target_path); + else if(clipboard_op === 'move') + move_clipboard_items(target_el, target_path); + } + return false; + } + }); + + $(document).on('click', '.remove-permission-link', async function(e){ + const el_remove_perm_link= this; + const perm_uid = $(el_remove_perm_link).attr('data-perm-uid'); + $.ajax({ + url: api_origin + "/remove-perm", + type: 'POST', + async: true, + contentType: "application/json", + data: JSON.stringify({ + uid: perm_uid, + }), + headers: { + "Authorization": "Bearer "+auth_token + }, + statusCode: { + 401: function () { + logout(); + }, + }, + success: async function (res){ + $(`[data-perm-uid="${perm_uid}"]`).hide("slide", { direction: "right" }, 300, function(e){ + $(this).remove(); + }); + }, + complete: function(){ + } + }) + }) + + // update mouse position coordinates + $(document).mousemove(function(event){ + mouseX = event.clientX; + mouseY = event.clientY; + + // mouse in top-left corner of screen + if((mouseX < 150 && mouseY < toolbar_height + 20) || (mouseX < 20 && mouseY < 150)) + current_active_snap_zone = 'nw'; + // mouse in left edge of screen + else if(mouseX < 20 && mouseY >= 150 && mouseY < desktop_height - 150) + current_active_snap_zone = 'w'; + // mouse in bottom-left corner of screen + else if(mouseX < 20 && mouseY > desktop_height - 150) + current_active_snap_zone = 'sw'; + // mouse in right edge of screen + else if(mouseX > desktop_width - 20 && mouseY >= 150 && mouseY < desktop_height - 150) + current_active_snap_zone = 'e'; + // mouse in top-right corner of screen + else if((mouseX > desktop_width - 150 && mouseY < toolbar_height + 20) || (mouseX > desktop_width - 20 && mouseY < 150)) + current_active_snap_zone = 'ne'; + // mouse in bottom-right corner of screen + else if(mouseX > desktop_width - 20 && mouseY >= desktop_height - 150) + current_active_snap_zone = 'se'; + // mouse in top edge of screen + else if(mouseY < toolbar_height + 20 && mouseX >= 150 && mouseX < desktop_width - 150) + current_active_snap_zone = 'n'; + // not in any snap zone + else + current_active_snap_zone = undefined; + + // mouseover_window + var windows = document.getElementsByClassName("window"); + let active_win; + if(windows.length > 0){ + let highest_window_zindex = 0; + for(let i=0; i rect.x && mouseX < (rect.x + rect.width) && mouseY > rect.y && mouseY < (rect.y + rect.height)){ + if(parseInt($(windows[i]).css('z-index')) >= highest_window_zindex){ + active_win = windows[i]; + highest_window_zindex = parseInt($(windows[i]).css('z-index')); + } + } + } + } + window.mouseover_window = active_win; + + // mouseover_item_container + var item_containers = document.getElementsByClassName("item-container"); + let active_ic; + if(item_containers.length > 0){ + let highest_window_zindex = 0; + for(let i=0; i rect.x && mouseX < (rect.x + rect.width) && mouseY > rect.y && mouseY < (rect.y + rect.height)){ + let active_container_zindex = parseInt($(item_containers[i]).closest('.window').css('z-index')); + if( !isNaN(active_container_zindex) && active_container_zindex >= highest_window_zindex){ + active_ic = item_containers[i]; + highest_window_zindex = active_container_zindex; + } + } + } + } + window.mouseover_item_container = active_ic; + }); + + //-------------------------------------------------------- + // Window Activation + //-------------------------------------------------------- + $(document).on('mousedown', function(e){ + // if taskbar or any parts of it is clicked, drop the event + if($(e.target).hasClass('taskbar') || $(e.target).closest('.taskbar').length > 0) + return; + + // if mouse is clicked on a window, activate it + if(mouseover_window !== undefined){ + $(mouseover_window).focusWindow(e); + } + }) + + // if an element has the .long-hover class, fire a long-hover event after 600ms + $(document).on('mouseenter', '.long-hover', function(){ + let el = this; + el.long_hover_timeout = setTimeout(() => { + $(el).trigger('long-hover'); + }, 600); + }) + + // if an element has the .long-hover class, cancel the long-hover event if the mouse leaves + $(document).on('mouseleave', '.long-hover', function(){ + clearTimeout(this.long_hover_timeout); + }) + + // if an element has the .long-hover class, cancel the long-hover event if the mouse leaves + $(document).on('paste', function(event){ + event = event.originalEvent ?? event; + + let clipboardData = event.clipboardData || window.clipboardData; + let items = clipboardData.items || clipboardData.files; + + // return if paste is on input or textarea + if($(event.target).is('input') || $(event.target).is('textarea')) + return; + + if(!(items instanceof DataTransferItemList)) + return; + + // upload files + if(items?.length>0){ + let parent_container = determine_active_container_parent(); + if(parent_container){ + upload_items(items, $(parent_container).attr('data-path')); + } + } + + event.stopPropagation(); + event.preventDefault(); + return false; + }) + + document.addEventListener("visibilitychange", (event) => { + if (document.visibilityState !== "visible") { + window.doc_title_before_blur = document.title; + if(!_.isEmpty(window.active_uploads)){ + update_title_based_on_uploads(); + } + }else if(window.active_uploads){ + document.title = window.doc_title_before_blur ?? 'Puter'; + } + }); + + /** + * Event handler for a custom 'logout' event attached to the document. + * This function handles the process of logging out, including user confirmation, + * communication with the backend, and subsequent UI updates. It takes special + * precautions if the user is identified as using a temporary account. + * + * @listens Document#event:logout + * @async + * @param {Event} event - The JQuery event object associated with the logout event. + * @returns {Promise} - This function does not return anything meaningful, but it performs an asynchronous operation. + */ + $(document).on("logout", async function(event) { + // is temp user? + if(window.user && window.user.is_temp){ + const alert_resp = await UIAlert({ + message: `Save account before logging out!

    You are using a temporary account and logging out will erase all your data.

    `, + buttons:[ + { + label: 'Save Account', + type: 'primary', + }, + { + label: 'Log Out', + type: 'danger', + }, + { + label: 'Cancel', + }, + ] + }) + if(alert_resp === 'Save Account'){ + let saved = await UIWindowSaveAccount({ + send_confirmation_code: false, + default_username: window.user.username + }); + if(saved) + logout(); + }else if (alert_resp === 'Log Out'){ + logout(); + } + else{ + return; + } + } + + // logout + try{ + await $.ajax({ + url: gui_origin + "/logout", + type: 'POST', + async: true, + contentType: "application/json", + headers: { + "Authorization": "Bearer " + auth_token + }, + statusCode: { + 401: function () { + }, + }, + }) + }catch(e){ + + } + + // remove this user from the array of logged_in_users + for (let i = 0; i < window.logged_in_users.length; i++) { + if(window.logged_in_users[i].uuid === window.user.uuid){ + window.logged_in_users.splice(i, 1); + break; + } + } + + // update logged_in_users in local storage + localStorage.setItem('logged_in_users', JSON.stringify(window.logged_in_users)); + + // delete this user from local storage + window.user = null; + localStorage.removeItem('user'); + window.auth_token = null; + localStorage.removeItem('auth_token'); + + // close all windows + $('.window').close(); + // close all ctxmenus + $('.context-menu').remove(); + // remove desktop + $('.desktop').remove(); + // remove taskbar + $('.taskbar').remove(); + // disable native browser exit confirmation + window.onbeforeunload = null; + // go to home page + window.location.replace("/"); + }); +} + +function requestOpenerOrigin() { + return new Promise((resolve, reject) => { + if (!window.opener) { + reject(new Error("No window.opener available")); + return; + } + + // Function to handle the message event + const handleMessage = (event) => { + // Check if the message is the expected response + if (event.data.msg === 'originResponse') { + // Clean up by removing the event listener + window.removeEventListener('message', handleMessage); + resolve(event.origin); + } + }; + + // Set up the listener for the response + window.addEventListener('message', handleMessage, false); + + // Send the request to the opener + window.opener.postMessage({ msg: 'requestOrigin' }, '*'); + + // Optional: Reject the promise if no response is received within a timeout + setTimeout(() => { + window.removeEventListener('message', handleMessage); + reject(new Error("Response timed out")); + }, 5000); // Timeout after 5 seconds + }); +} + +$(document).on('click', '.generic-close-window-button', function(e){ + $(this).closest('.window').close(); +}); \ No newline at end of file diff --git a/src/lib/FileSaver.min.js b/src/lib/FileSaver.min.js new file mode 100644 index 00000000..6d493b29 --- /dev/null +++ b/src/lib/FileSaver.min.js @@ -0,0 +1,3 @@ +(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,"undefined"!=typeof module&&(module.exports=g)}); + +//# sourceMappingURL=FileSaver.min.js.map \ No newline at end of file diff --git a/src/lib/html-entities.js b/src/lib/html-entities.js new file mode 100644 index 00000000..c233cb01 --- /dev/null +++ b/src/lib/html-entities.js @@ -0,0 +1 @@ +(()=>{"use strict";var r,e={563:function(r,e,a){var t=this&&this.__assign||function(){return(t=Object.assign||function(r){for(var e,a=1,t=arguments.length;a'"&]/g,nonAscii:/(?:[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,nonAsciiPrintable:/(?:[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,extensive:/(?:[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g},n={mode:"specialChars",level:"all",numeric:"decimal"};e.encode=function(r,e){var a=void 0===(u=(c=void 0===e?n:e).mode)?"specialChars":u,t=void 0===(m=c.numeric)?"decimal":m,o=c.level;if(!r)return"";var c,u,p=i[a],d=s[void 0===o?"all":o].characters,g="hexadecimal"===t;if(p.lastIndex=0,c=p.exec(r)){u="";var m=0;do{m!==c.index&&(u+=r.substring(m,c.index));var f=d[o=c[0]];if(!f){var h=o.length>1?l.getCodePoint(o,0):o.charCodeAt(0);f=(g?"&#x"+h.toString(16):"&#"+h)+";"}u+=f,m=c.index+o.length}while(c=p.exec(r));m!==r.length&&(u+=r.substring(m))}else u=r;return u};var u={scope:"body",level:"all"},p=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g,d=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,g={xml:{strict:p,attribute:d,body:o.bodyRegExps.xml},html4:{strict:p,attribute:d,body:o.bodyRegExps.html4},html5:{strict:p,attribute:d,body:o.bodyRegExps.html5}},m=t(t({},g),{all:g.html5}),f=String.fromCharCode,h=f(65533),b={level:"all"};e.decodeEntity=function(r,e){var a=void 0===(t=(void 0===e?b:e).level)?"all":t;if(!r)return"";var t=r,o=(r[r.length-1],s[a].entities[r]);if(o)t=o;else if("&"===r[0]&&"#"===r[1]){var i=r[2],n="x"==i||"X"==i?parseInt(r.substr(3),16):parseInt(r.substr(2));t=n>=1114111?h:n>65535?l.fromCodePoint(n):f(c.numericUnicodeMap[n]||n)}return t},e.decode=function(r,e){var a=void 0===e?u:e,t=a.level,o=void 0===t?"all":t,i=a.scope,n=void 0===i?"xml"===o?"strict":"body":i;if(!r)return"";var p=m[o][n],d=s[o].entities,g="attribute"===n,b="strict"===n;p.lastIndex=0;var v,q=p.exec(r);if(q){v="";var y=0;do{y!==q.index&&(v+=r.substring(y,q.index));var w=q[0],x=w,A=w[w.length-1];if(g&&"="===A)x=w;else if(b&&";"!==A)x=w;else{var E=d[w];if(E)x=E;else if("&"===w[0]&&"#"===w[1]){var D=w[2],k="x"==D||"X"==D?parseInt(w.substr(3),16):parseInt(w.substr(2));x=k>=1114111?h:k>65535?l.fromCodePoint(k):f(c.numericUnicodeMap[k]||k)}}v+=x,y=q.index+w.length}while(q=p.exec(r));y!==r.length&&(v+=r.substring(y))}else v=r;return v}},81:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bodyRegExps={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g},e.namedReferences={xml:{entities:{"<":"<",">":">",""":'"',"'":"'","&":"&"},characters:{"<":"<",">":">",'"':""","'":"'","&":"&"}},html4:{entities:{"'":"'"," ":" "," ":" ","¡":"¡","¡":"¡","¢":"¢","¢":"¢","£":"£","£":"£","¤":"¤","¤":"¤","¥":"¥","¥":"¥","¦":"¦","¦":"¦","§":"§","§":"§","¨":"¨","¨":"¨","©":"©","©":"©","ª":"ª","ª":"ª","«":"«","«":"«","¬":"¬","¬":"¬","­":"­","­":"­","®":"®","®":"®","¯":"¯","¯":"¯","°":"°","°":"°","±":"±","±":"±","²":"²","²":"²","³":"³","³":"³","´":"´","´":"´","µ":"µ","µ":"µ","¶":"¶","¶":"¶","·":"·","·":"·","¸":"¸","¸":"¸","¹":"¹","¹":"¹","º":"º","º":"º","»":"»","»":"»","¼":"¼","¼":"¼","½":"½","½":"½","¾":"¾","¾":"¾","¿":"¿","¿":"¿","À":"À","À":"À","Á":"Á","Á":"Á","Â":"Â","Â":"Â","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","Å":"Å","Å":"Å","Æ":"Æ","Æ":"Æ","Ç":"Ç","Ç":"Ç","È":"È","È":"È","É":"É","É":"É","Ê":"Ê","Ê":"Ê","Ë":"Ë","Ë":"Ë","Ì":"Ì","Ì":"Ì","Í":"Í","Í":"Í","Î":"Î","Î":"Î","Ï":"Ï","Ï":"Ï","Ð":"Ð","Ð":"Ð","Ñ":"Ñ","Ñ":"Ñ","Ò":"Ò","Ò":"Ò","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","Õ":"Õ","Õ":"Õ","Ö":"Ö","Ö":"Ö","×":"×","×":"×","Ø":"Ø","Ø":"Ø","Ù":"Ù","Ù":"Ù","Ú":"Ú","Ú":"Ú","Û":"Û","Û":"Û","Ü":"Ü","Ü":"Ü","Ý":"Ý","Ý":"Ý","Þ":"Þ","Þ":"Þ","ß":"ß","ß":"ß","à":"à","à":"à","á":"á","á":"á","â":"â","â":"â","ã":"ã","ã":"ã","ä":"ä","ä":"ä","å":"å","å":"å","æ":"æ","æ":"æ","ç":"ç","ç":"ç","è":"è","è":"è","é":"é","é":"é","ê":"ê","ê":"ê","ë":"ë","ë":"ë","ì":"ì","ì":"ì","í":"í","í":"í","î":"î","î":"î","ï":"ï","ï":"ï","ð":"ð","ð":"ð","ñ":"ñ","ñ":"ñ","ò":"ò","ò":"ò","ó":"ó","ó":"ó","ô":"ô","ô":"ô","õ":"õ","õ":"õ","ö":"ö","ö":"ö","÷":"÷","÷":"÷","ø":"ø","ø":"ø","ù":"ù","ù":"ù","ú":"ú","ú":"ú","û":"û","û":"û","ü":"ü","ü":"ü","ý":"ý","ý":"ý","þ":"þ","þ":"þ","ÿ":"ÿ","ÿ":"ÿ",""":'"',""":'"',"&":"&","&":"&","<":"<","<":"<",">":">",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","‌":"‌","‍":"‍","‎":"‎","‏":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","⟨":"〈","⟩":"〉","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"},characters:{"'":"'"," ":" ","¡":"¡","¢":"¢","£":"£","¤":"¤","¥":"¥","¦":"¦","§":"§","¨":"¨","©":"©",ª:"ª","«":"«","¬":"¬","­":"­","®":"®","¯":"¯","°":"°","±":"±","²":"²","³":"³","´":"´",µ:"µ","¶":"¶","·":"·","¸":"¸","¹":"¹",º:"º","»":"»","¼":"¼","½":"½","¾":"¾","¿":"¿",À:"À",Á:"Á",Â:"Â",Ã:"Ã",Ä:"Ä",Å:"Å",Æ:"Æ",Ç:"Ç",È:"È",É:"É",Ê:"Ê",Ë:"Ë",Ì:"Ì",Í:"Í",Î:"Î",Ï:"Ï",Ð:"Ð",Ñ:"Ñ",Ò:"Ò",Ó:"Ó",Ô:"Ô",Õ:"Õ",Ö:"Ö","×":"×",Ø:"Ø",Ù:"Ù",Ú:"Ú",Û:"Û",Ü:"Ü",Ý:"Ý",Þ:"Þ",ß:"ß",à:"à",á:"á",â:"â",ã:"ã",ä:"ä",å:"å",æ:"æ",ç:"ç",è:"è",é:"é",ê:"ê",ë:"ë",ì:"ì",í:"í",î:"î",ï:"ï",ð:"ð",ñ:"ñ",ò:"ò",ó:"ó",ô:"ô",õ:"õ",ö:"ö","÷":"÷",ø:"ø",ù:"ù",ú:"ú",û:"û",ü:"ü",ý:"ý",þ:"þ",ÿ:"ÿ",'"':""","&":"&","<":"<",">":">",Œ:"Œ",œ:"œ",Š:"Š",š:"š",Ÿ:"Ÿ",ˆ:"ˆ","˜":"˜"," ":" "," ":" "," ":" ","‌":"‌","‍":"‍","‎":"‎","‏":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€",ƒ:"ƒ",Α:"Α",Β:"Β",Γ:"Γ",Δ:"Δ",Ε:"Ε",Ζ:"Ζ",Η:"Η",Θ:"Θ",Ι:"Ι",Κ:"Κ",Λ:"Λ",Μ:"Μ",Ν:"Ν",Ξ:"Ξ",Ο:"Ο",Π:"Π",Ρ:"Ρ",Σ:"Σ",Τ:"Τ",Υ:"Υ",Φ:"Φ",Χ:"Χ",Ψ:"Ψ",Ω:"Ω",α:"α",β:"β",γ:"γ",δ:"δ",ε:"ε",ζ:"ζ",η:"η",θ:"θ",ι:"ι",κ:"κ",λ:"λ",μ:"μ",ν:"ν",ξ:"ξ",ο:"ο",π:"π",ρ:"ρ",ς:"ς",σ:"σ",τ:"τ",υ:"υ",φ:"φ",χ:"χ",ψ:"ψ",ω:"ω",ϑ:"ϑ",ϒ:"ϒ",ϖ:"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄",℘:"℘",ℑ:"ℑ",ℜ:"ℜ","™":"™",ℵ:"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","〈":"⟨","〉":"⟩","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"}},html5:{entities:{"Æ":"Æ","Æ":"Æ","&":"&","&":"&","Á":"Á","Á":"Á","Ă":"Ă","Â":"Â","Â":"Â","А":"А","𝔄":"𝔄","À":"À","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","⁡":"⁡","Å":"Å","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","ℬ":"ℬ","≎":"≎","Ч":"Ч","©":"©","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","ℭ":"ℭ","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","ⅅ":"ⅅ","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","∯":"∯","¨":"¨","⇓":"⇓","⇐":"⇐","⇔":"⇔","⫤":"⫤","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","⇓":"⇓","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","Ð":"Ð","É":"É","É":"É","Ě":"Ě","Ê":"Ê","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","ℱ":"ℱ","Ѓ":"Ѓ",">":">",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","ℋ":"ℋ","Ħ":"Ħ","≎":"≎","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Í":"Í","Î":"Î","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ì":"Ì","ℑ":"ℑ","Ī":"Ī","ⅈ":"ⅈ","⇒":"⇒","∬":"∬","∫":"∫","⋂":"⋂","⁣":"⁣","⁢":"⁢","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⇐":"⇐","⇔":"⇔","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","⟸":"⟸","⟺":"⟺","⟹":"⟹","𝕃":"𝕃","↙":"↙","↘":"↘","ℒ":"ℒ","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","ℳ":"ℳ","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","​":"​","​":"​","​":"​","​":"​","≫":"≫","≪":"≪"," ":"\n","𝔑":"𝔑","⁠":"⁠"," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Ø":"Ø","Õ":"Õ","Õ":"Õ","⨷":"⨷","Ö":"Ö","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℌ":"ℌ","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∷":"∷","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",""":'"',""":'"',"𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","ℜ":"ℜ","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","⇒":"⇒","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↓":"↓","←":"←","→":"→","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∋":"∋","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","⋑":"⋑","Þ":"Þ","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц"," ":"\t","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ","  ":"  "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ù":"Ù","Ū":"Ū","_":"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","↑":"↑","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","⇑":"⇑","⇕":"⇕","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","​":"​","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","â":"â","´":"´","´":"´","а":"а","æ":"æ","æ":"æ","⁡":"⁡","𝔞":"𝔞","à":"à","à":"à","ℵ":"ℵ","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","&":"&","&":"&","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∠":"∠","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","Å":"Å","⍼":"⍼","ą":"ą","𝕒":"𝕒","≈":"≈","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","≈":"≈","≊":"≊","å":"å","å":"å","𝒶":"𝒶","*":"*","≈":"≈","≍":"≍","ã":"ã","ã":"ã","ä":"ä","ä":"ä","∳":"∳","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⌅":"⌅","⎵":"⎵","⎶":"⎶","≌":"≌","б":"б","„":"„","∵":"∵","∵":"∵","⦰":"⦰","϶":"϶","ℬ":"ℬ","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","⋂":"⋂","◯":"◯","⋃":"⋃","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⋁":"⋁","⋀":"⋀","⤍":"⤍","⧫":"⧫","▪":"▪","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⊥":"⊥","⊥":"⊥","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","─":"─","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","‵":"‵","˘":"˘","¦":"¦","¦":"¦","𝒷":"𝒷","⁏":"⁏","∽":"∽","⋍":"⋍","\":"\\","⧅":"⧅","⟈":"⟈","•":"•","•":"•","≎":"≎","⪮":"⪮","≏":"≏","≏":"≏","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","ˇ":"ˇ","⩍":"⩍","č":"č","ç":"ç","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","¸":"¸","¸":"¸","⦲":"⦲","¢":"¢","¢":"¢","·":"·","𝔠":"𝔠","ч":"ч","✓":"✓","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","®":"®","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","≗":"≗","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣","♣":"♣",":":":","≔":"≔","≔":"≔",",":",","@":"@","∁":"∁","∘":"∘","∁":"∁","ℂ":"ℂ","≅":"≅","⩭":"⩭","∮":"∮","𝕔":"𝕔","∐":"∐","©":"©","©":"©","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋞":"⋞","⋟":"⋟","⋎":"⋎","⋏":"⋏","¤":"¤","¤":"¤","↶":"↶","↷":"↷","⋎":"⋎","⋏":"⋏","∲":"∲","∱":"∱","⌭":"⌭","⇓":"⇓","⥥":"⥥","†":"†","ℸ":"ℸ","↓":"↓","‐":"‐","⊣":"⊣","⤏":"⤏","˝":"˝","ď":"ď","д":"д","ⅆ":"ⅆ","‡":"‡","⇊":"⇊","⩷":"⩷","°":"°","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","⇃":"⇃","⇂":"⇂","⋄":"⋄","⋄":"⋄","♦":"♦","♦":"♦","¨":"¨","ϝ":"ϝ","⋲":"⋲","÷":"÷","÷":"÷","÷":"÷","⋇":"⋇","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍","$":"$","𝕕":"𝕕","˙":"˙","≐":"≐","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌆":"⌆","↓":"↓","⇊":"⇊","⇃":"⇃","⇂":"⇂","⤐":"⤐","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","▾":"▾","⇵":"⇵","⥯":"⥯","⦦":"⦦","џ":"џ","⟿":"⟿","⩷":"⩷","≑":"≑","é":"é","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","ê":"ê","≕":"≕","э":"э","ė":"ė","ⅇ":"ⅇ","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅","∅":"∅","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ε":"ε","ϵ":"ϵ","≖":"≖","≕":"≕","≂":"≂","⪖":"⪖","⪕":"⪕","=":"=","≟":"≟","≡":"≡","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","≐":"≐","≂":"≂","η":"η","ð":"ð","ð":"ð","ë":"ë","ë":"ë","€":"€","!":"!","∃":"∃","ℰ":"ℰ","ⅇ":"ⅇ","≒":"≒","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi","fj":"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","∀":"∀","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","½":"½","⅓":"⅓","¼":"¼","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","≧":"≧","⪌":"⪌","ǵ":"ǵ","γ":"γ","ϝ":"ϝ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","≥":"≥","⋛":"⋛","≥":"≥","≧":"≧","⩾":"⩾","⩾":"⩾","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","≫":"≫","⋙":"⋙","ℷ":"ℷ","ѓ":"ѓ","≷":"≷","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪊":"⪊","⪈":"⪈","⪈":"⪈","≩":"≩","⋧":"⋧","𝕘":"𝕘","`":"`","ℊ":"ℊ","≳":"≳","⪎":"⪎","⪐":"⪐",">":">",">":">","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⪆":"⪆","⥸":"⥸","⋗":"⋗","⋛":"⋛","⪌":"⪌","≷":"≷","≳":"≳","≩︀":"≩︀","≩︀":"≩︀","⇔":"⇔"," ":" ","½":"½","ℋ":"ℋ","ъ":"ъ","↔":"↔","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ℏ":"ℏ","ħ":"ħ","⁃":"⁃","‐":"‐","í":"í","í":"í","⁣":"⁣","î":"î","î":"î","и":"и","е":"е","¡":"¡","¡":"¡","⇔":"⇔","𝔦":"𝔦","ì":"ì","ì":"ì","ⅈ":"ⅈ","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ℑ":"ℑ","ℐ":"ℐ","ℑ":"ℑ","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","∈":"∈","℅":"℅","∞":"∞","⧝":"⧝","ı":"ı","∫":"∫","⊺":"⊺","ℤ":"ℤ","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","⨼":"⨼","¿":"¿","¿":"¿","𝒾":"𝒾","∈":"∈","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","∈":"∈","⁢":"⁢","ĩ":"ĩ","і":"і","ï":"ï","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⇚":"⇚","⇐":"⇐","⤛":"⤛","⤎":"⤎","≦":"≦","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","ℒ":"ℒ","λ":"λ","⟨":"⟨","⦑":"⦑","⟨":"⟨","⪅":"⪅","«":"«","«":"«","←":"←","⇤":"⇤","⤟":"⤟","⤝":"⤝","↩":"↩","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","⌈":"⌈","{":"{","л":"л","⤶":"⤶","“":"“","„":"„","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","←":"←","↢":"↢","↽":"↽","↼":"↼","⇇":"⇇","↔":"↔","⇆":"⇆","⇋":"⇋","↭":"↭","⋋":"⋋","⋚":"⋚","≤":"≤","≦":"≦","⩽":"⩽","⩽":"⩽","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⪅":"⪅","⋖":"⋖","⋚":"⋚","⪋":"⪋","≶":"≶","≲":"≲","⥼":"⥼","⌊":"⌊","𝔩":"𝔩","≶":"≶","⪑":"⪑","↽":"↽","↼":"↼","⥪":"⥪","▄":"▄","љ":"љ","≪":"≪","⇇":"⇇","⌞":"⌞","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","⎰":"⎰","≨":"≨","⪉":"⪉","⪉":"⪉","⪇":"⪇","⪇":"⪇","≨":"≨","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟦":"⟦","⟵":"⟵","⟷":"⟷","⟼":"⟼","⟶":"⟶","↫":"↫","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","_":"_","◊":"◊","◊":"◊","⧫":"⧫","(":"(","⦓":"⦓","⇆":"⇆","⌟":"⌟","⇋":"⇋","⥭":"⥭","‎":"‎","⊿":"⊿","‹":"‹","𝓁":"𝓁","↰":"↰","≲":"≲","⪍":"⪍","⪏":"⪏","[":"[","‘":"‘","‚":"‚","ł":"ł","<":"<","<":"<","⪦":"⪦","⩹":"⩹","⋖":"⋖","⋋":"⋋","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⊴":"⊴","◂":"◂","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","≨︀":"≨︀","∺":"∺","¯":"¯","¯":"¯","♂":"♂","✠":"✠","✠":"✠","↦":"↦","↦":"↦","↧":"↧","↤":"↤","↥":"↥","▮":"▮","⨩":"⨩","м":"м","—":"—","∡":"∡","𝔪":"𝔪","℧":"℧","µ":"µ","µ":"µ","∣":"∣","*":"*","⫰":"⫰","·":"·","·":"·","−":"−","⊟":"⊟","∸":"∸","⨪":"⨪","⫛":"⫛","…":"…","∓":"∓","⊧":"⊧","𝕞":"𝕞","∓":"∓","𝓂":"𝓂","∾":"∾","μ":"μ","⊸":"⊸","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","≫̸":"≫̸","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","≪̸":"≪̸","⇏":"⇏","⊯":"⊯","⊮":"⊮","∇":"∇","ń":"ń","∠⃒":"∠⃒","≉":"≉","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","≉":"≉","♮":"♮","♮":"♮","ℕ":"ℕ"," ":" "," ":" ","≎̸":"≎̸","≏̸":"≏̸","⩃":"⩃","ň":"ň","ņ":"ņ","≇":"≇","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","≠":"≠","⇗":"⇗","⤤":"⤤","↗":"↗","↗":"↗","≐̸":"≐̸","≢":"≢","⤨":"⤨","≂̸":"≂̸","∄":"∄","∄":"∄","𝔫":"𝔫","≧̸":"≧̸","≱":"≱","≱":"≱","≧̸":"≧̸","⩾̸":"⩾̸","⩾̸":"⩾̸","≵":"≵","≯":"≯","≯":"≯","⇎":"⇎","↮":"↮","⫲":"⫲","∋":"∋","⋼":"⋼","⋺":"⋺","∋":"∋","њ":"њ","⇍":"⇍","≦̸":"≦̸","↚":"↚","‥":"‥","≰":"≰","↚":"↚","↮":"↮","≰":"≰","≦̸":"≦̸","⩽̸":"⩽̸","⩽̸":"⩽̸","≮":"≮","≴":"≴","≮":"≮","⋪":"⋪","⋬":"⋬","∤":"∤","𝕟":"𝕟","¬":"¬","¬":"¬","∉":"∉","⋹̸":"⋹̸","⋵̸":"⋵̸","∉":"∉","⋷":"⋷","⋶":"⋶","∌":"∌","∌":"∌","⋾":"⋾","⋽":"⋽","∦":"∦","∦":"∦","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","⊀":"⊀","⋠":"⋠","⪯̸":"⪯̸","⊀":"⊀","⪯̸":"⪯̸","⇏":"⇏","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","↛":"↛","⋫":"⋫","⋭":"⋭","⊁":"⊁","⋡":"⋡","⪰̸":"⪰̸","𝓃":"𝓃","∤":"∤","∦":"∦","≁":"≁","≄":"≄","≄":"≄","∤":"∤","∦":"∦","⋢":"⋢","⋣":"⋣","⊄":"⊄","⫅̸":"⫅̸","⊈":"⊈","⊂⃒":"⊂⃒","⊈":"⊈","⫅̸":"⫅̸","⊁":"⊁","⪰̸":"⪰̸","⊅":"⊅","⫆̸":"⫆̸","⊉":"⊉","⊃⃒":"⊃⃒","⊉":"⊉","⫆̸":"⫆̸","≹":"≹","ñ":"ñ","ñ":"ñ","≸":"≸","⋪":"⋪","⋬":"⋬","⋫":"⋫","⋭":"⋭","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","↖":"↖","↖":"↖","⤧":"⤧","Ⓢ":"Ⓢ","ó":"ó","ó":"ó","⊛":"⊛","⊚":"⊚","ô":"ô","ô":"ô","о":"о","⊝":"⊝","ő":"ő","⨸":"⨸","⊙":"⊙","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","ò":"ò","⧁":"⧁","⦵":"⦵","Ω":"Ω","∮":"∮","↺":"↺","⦾":"⦾","⦻":"⦻","‾":"‾","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","⊖":"⊖","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","⊕":"⊕","∨":"∨","↻":"↻","⩝":"⩝","ℴ":"ℴ","ℴ":"ℴ","ª":"ª","ª":"ª","º":"º","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ℴ":"ℴ","ø":"ø","ø":"ø","⊘":"⊘","õ":"õ","õ":"õ","⊗":"⊗","⨶":"⨶","ö":"ö","ö":"ö","⌽":"⌽","∥":"∥","¶":"¶","¶":"¶","∥":"∥","⫳":"⫳","⫽":"⫽","∂":"∂","п":"п","%":"%",".":".","‰":"‰","⊥":"⊥","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","ℳ":"ℳ","☎":"☎","π":"π","⋔":"⋔","ϖ":"ϖ","ℏ":"ℏ","ℎ":"ℎ","ℏ":"ℏ","+":"+","⨣":"⨣","⊞":"⊞","⨢":"⨢","∔":"∔","⨥":"⨥","⩲":"⩲","±":"±","±":"±","⨦":"⨦","⨧":"⨧","±":"±","⨕":"⨕","𝕡":"𝕡","£":"£","£":"£","≺":"≺","⪳":"⪳","⪷":"⪷","≼":"≼","⪯":"⪯","≺":"≺","⪷":"⪷","≼":"≼","⪯":"⪯","⪹":"⪹","⪵":"⪵","⋨":"⋨","≾":"≾","′":"′","ℙ":"ℙ","⪵":"⪵","⪹":"⪹","⋨":"⋨","∏":"∏","⌮":"⌮","⌒":"⌒","⌓":"⌓","∝":"∝","∝":"∝","≾":"≾","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","⨌":"⨌","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","ℍ":"ℍ","⨖":"⨖","?":"?","≟":"≟",""":'"',""":'"',"⇛":"⇛","⇒":"⇒","⤜":"⤜","⤏":"⤏","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","√":"√","⦳":"⦳","⟩":"⟩","⦒":"⦒","⦥":"⦥","⟩":"⟩","»":"»","»":"»","→":"→","⥵":"⥵","⇥":"⇥","⤠":"⤠","⤳":"⤳","⤞":"⤞","↪":"↪","↬":"↬","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","ℚ":"ℚ","⤍":"⤍","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","⌉":"⌉","}":"}","р":"р","⤷":"⤷","⥩":"⥩","”":"”","”":"”","↳":"↳","ℜ":"ℜ","ℛ":"ℛ","ℜ":"ℜ","ℝ":"ℝ","▭":"▭","®":"®","®":"®","⥽":"⥽","⌋":"⌋","𝔯":"𝔯","⇁":"⇁","⇀":"⇀","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","→":"→","↣":"↣","⇁":"⇁","⇀":"⇀","⇄":"⇄","⇌":"⇌","⇉":"⇉","↝":"↝","⋌":"⋌","˚":"˚","≓":"≓","⇄":"⇄","⇌":"⇌","‏":"‏","⎱":"⎱","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⟧":"⟧","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","⇉":"⇉","›":"›","𝓇":"𝓇","↱":"↱","]":"]","’":"’","’":"’","⋌":"⋌","⋊":"⋊","▹":"▹","⊵":"⊵","▸":"▸","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","‚":"‚","≻":"≻","⪴":"⪴","⪸":"⪸","š":"š","≽":"≽","⪰":"⪰","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","≿":"≿","с":"с","⋅":"⋅","⊡":"⊡","⩦":"⩦","⇘":"⇘","⤥":"⤥","↘":"↘","↘":"↘","§":"§","§":"§",";":";","⤩":"⤩","∖":"∖","∖":"∖","✶":"✶","𝔰":"𝔰","⌢":"⌢","♯":"♯","щ":"щ","ш":"ш","∣":"∣","∥":"∥","­":"­","­":"­","σ":"σ","ς":"ς","ς":"ς","∼":"∼","⩪":"⩪","≃":"≃","≃":"≃","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","←":"←","∖":"∖","⨳":"⨳","⧤":"⧤","∣":"∣","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","♠":"♠","∥":"∥","⊓":"⊓","⊓︀":"⊓︀","⊔":"⊔","⊔︀":"⊔︀","⊏":"⊏","⊑":"⊑","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊐":"⊐","⊒":"⊒","□":"□","□":"□","▪":"▪","▪":"▪","→":"→","𝓈":"𝓈","∖":"∖","⌣":"⌣","⋆":"⋆","☆":"☆","★":"★","ϵ":"ϵ","ϕ":"ϕ","¯":"¯","⊂":"⊂","⫅":"⫅","⪽":"⪽","⊆":"⊆","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⊂":"⊂","⊆":"⊆","⫅":"⫅","⊊":"⊊","⫋":"⫋","⫇":"⫇","⫕":"⫕","⫓":"⫓","≻":"≻","⪸":"⪸","≽":"≽","⪰":"⪰","⪺":"⪺","⪶":"⪶","⋩":"⋩","≿":"≿","∑":"∑","♪":"♪","¹":"¹","¹":"¹","²":"²","²":"²","³":"³","³":"³","⊃":"⊃","⫆":"⫆","⪾":"⪾","⫘":"⫘","⊇":"⊇","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⊃":"⊃","⊇":"⊇","⫆":"⫆","⊋":"⊋","⫌":"⫌","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤦":"⤦","↙":"↙","↙":"↙","⤪":"⤪","ß":"ß","ß":"ß","⌖":"⌖","τ":"τ","⎴":"⎴","ť":"ť","ţ":"ţ","т":"т","⃛":"⃛","⌕":"⌕","𝔱":"𝔱","∴":"∴","∴":"∴","θ":"θ","ϑ":"ϑ","ϑ":"ϑ","≈":"≈","∼":"∼"," ":" ","≈":"≈","∼":"∼","þ":"þ","þ":"þ","˜":"˜","×":"×","×":"×","⊠":"⊠","⨱":"⨱","⨰":"⨰","∭":"∭","⤨":"⤨","⊤":"⊤","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","⤩":"⤩","‴":"‴","™":"™","▵":"▵","▿":"▿","◃":"◃","⊴":"⊴","≜":"≜","▹":"▹","⊵":"⊵","◬":"◬","≜":"≜","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","≬":"≬","↞":"↞","↠":"↠","⇑":"⇑","⥣":"⥣","ú":"ú","ú":"ú","↑":"↑","ў":"ў","ŭ":"ŭ","û":"û","û":"û","у":"у","⇅":"⇅","ű":"ű","⥮":"⥮","⥾":"⥾","𝔲":"𝔲","ù":"ù","ù":"ù","↿":"↿","↾":"↾","▀":"▀","⌜":"⌜","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","¨":"¨","¨":"¨","ų":"ų","𝕦":"𝕦","↑":"↑","↕":"↕","↿":"↿","↾":"↾","⊎":"⊎","υ":"υ","ϒ":"ϒ","υ":"υ","⇈":"⇈","⌝":"⌝","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","▵":"▵","▴":"▴","⇈":"⇈","ü":"ü","ü":"ü","⦧":"⦧","⇕":"⇕","⫨":"⫨","⫩":"⫩","⊨":"⊨","⦜":"⦜","ϵ":"ϵ","ϰ":"ϰ","∅":"∅","ϕ":"ϕ","ϖ":"ϖ","∝":"∝","↕":"↕","ϱ":"ϱ","ς":"ς","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","ϑ":"ϑ","⊲":"⊲","⊳":"⊳","в":"в","⊢":"⊢","∨":"∨","⊻":"⊻","≚":"≚","⋮":"⋮","|":"|","|":"|","𝔳":"𝔳","⊲":"⊲","⊂⃒":"⊂⃒","⊃⃒":"⊃⃒","𝕧":"𝕧","∝":"∝","⊳":"⊳","𝓋":"𝓋","⫋︀":"⫋︀","⊊︀":"⊊︀","⫌︀":"⫌︀","⊋︀":"⊋︀","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","∧":"∧","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","℘":"℘","≀":"≀","≀":"≀","𝓌":"𝓌","⋂":"⋂","◯":"◯","⋃":"⋃","▽":"▽","𝔵":"𝔵","⟺":"⟺","⟷":"⟷","ξ":"ξ","⟸":"⟸","⟵":"⟵","⟼":"⟼","⋻":"⋻","⨀":"⨀","𝕩":"𝕩","⨁":"⨁","⨂":"⨂","⟹":"⟹","⟶":"⟶","𝓍":"𝓍","⨆":"⨆","⨄":"⨄","△":"△","⋁":"⋁","⋀":"⋀","ý":"ý","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ℨ":"ℨ","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","‍":"‍","‌":"‌"},characters:{Æ:"Æ","&":"&",Á:"Á",Ă:"Ă",Â:"Â",А:"А",𝔄:"𝔄",À:"À",Α:"Α",Ā:"Ā","⩓":"⩓",Ą:"Ą",𝔸:"𝔸","⁡":"⁡",Å:"Å",𝒜:"𝒜","≔":"≔",Ã:"Ã",Ä:"Ä","∖":"∖","⫧":"⫧","⌆":"⌆",Б:"Б","∵":"∵",ℬ:"ℬ",Β:"Β",𝔅:"𝔅",𝔹:"𝔹","˘":"˘","≎":"≎",Ч:"Ч","©":"©",Ć:"Ć","⋒":"⋒",ⅅ:"ⅅ",ℭ:"ℭ",Č:"Č",Ç:"Ç",Ĉ:"Ĉ","∰":"∰",Ċ:"Ċ","¸":"¸","·":"·",Χ:"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮",ℂ:"ℂ","∐":"∐","∳":"∳","⨯":"⨯",𝒞:"𝒞","⋓":"⋓","≍":"≍","⤑":"⤑",Ђ:"Ђ",Ѕ:"Ѕ",Џ:"Џ","‡":"‡","↡":"↡","⫤":"⫤",Ď:"Ď",Д:"Д","∇":"∇",Δ:"Δ",𝔇:"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄",ⅆ:"ⅆ",𝔻:"𝔻","¨":"¨","⃜":"⃜","≐":"≐","⇓":"⇓","⇐":"⇐","⇔":"⇔","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧",𝒟:"𝒟",Đ:"Đ",Ŋ:"Ŋ",Ð:"Ð",É:"É",Ě:"Ě",Ê:"Ê",Э:"Э",Ė:"Ė",𝔈:"𝔈",È:"È","∈":"∈",Ē:"Ē","◻":"◻","▫":"▫",Ę:"Ę",𝔼:"𝔼",Ε:"Ε","⩵":"⩵","≂":"≂","⇌":"⇌",ℰ:"ℰ","⩳":"⩳",Η:"Η",Ë:"Ë","∃":"∃",ⅇ:"ⅇ",Ф:"Ф",𝔉:"𝔉","◼":"◼","▪":"▪",𝔽:"𝔽","∀":"∀",ℱ:"ℱ",Ѓ:"Ѓ",">":">",Γ:"Γ",Ϝ:"Ϝ",Ğ:"Ğ",Ģ:"Ģ",Ĝ:"Ĝ",Г:"Г",Ġ:"Ġ",𝔊:"𝔊","⋙":"⋙",𝔾:"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳",𝒢:"𝒢","≫":"≫",Ъ:"Ъ",ˇ:"ˇ","^":"^",Ĥ:"Ĥ",ℌ:"ℌ",ℋ:"ℋ",ℍ:"ℍ","─":"─",Ħ:"Ħ","≏":"≏",Е:"Е",IJ:"IJ",Ё:"Ё",Í:"Í",Î:"Î",И:"И",İ:"İ",ℑ:"ℑ",Ì:"Ì",Ī:"Ī",ⅈ:"ⅈ","∬":"∬","∫":"∫","⋂":"⋂","⁣":"⁣","⁢":"⁢",Į:"Į",𝕀:"𝕀",Ι:"Ι",ℐ:"ℐ",Ĩ:"Ĩ",І:"І",Ï:"Ï",Ĵ:"Ĵ",Й:"Й",𝔍:"𝔍",𝕁:"𝕁",𝒥:"𝒥",Ј:"Ј",Є:"Є",Х:"Х",Ќ:"Ќ",Κ:"Κ",Ķ:"Ķ",К:"К",𝔎:"𝔎",𝕂:"𝕂",𝒦:"𝒦",Љ:"Љ","<":"<",Ĺ:"Ĺ",Λ:"Λ","⟪":"⟪",ℒ:"ℒ","↞":"↞",Ľ:"Ľ",Ļ:"Ļ",Л:"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲",𝔏:"𝔏","⋘":"⋘","⇚":"⇚",Ŀ:"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶",𝕃:"𝕃","↙":"↙","↘":"↘","↰":"↰",Ł:"Ł","≪":"≪","⤅":"⤅",М:"М"," ":" ",ℳ:"ℳ",𝔐:"𝔐","∓":"∓",𝕄:"𝕄",Μ:"Μ",Њ:"Њ",Ń:"Ń",Ň:"Ň",Ņ:"Ņ",Н:"Н","​":"​","\n":" ",𝔑:"𝔑","⁠":"⁠"," ":" ",ℕ:"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤",𝒩:"𝒩",Ñ:"Ñ",Ν:"Ν",Œ:"Œ",Ó:"Ó",Ô:"Ô",О:"О",Ő:"Ő",𝔒:"𝔒",Ò:"Ò",Ō:"Ō",Ω:"Ω",Ο:"Ο",𝕆:"𝕆","“":"“","‘":"‘","⩔":"⩔",𝒪:"𝒪",Ø:"Ø",Õ:"Õ","⨷":"⨷",Ö:"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂",П:"П",𝔓:"𝔓",Φ:"Φ",Π:"Π","±":"±",ℙ:"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∝":"∝",𝒫:"𝒫",Ψ:"Ψ",'"':""",𝔔:"𝔔",ℚ:"ℚ",𝒬:"𝒬","⤐":"⤐","®":"®",Ŕ:"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖",Ř:"Ř",Ŗ:"Ŗ",Р:"Р",ℜ:"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯",Ρ:"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓",ℝ:"ℝ","⥰":"⥰","⇛":"⇛",ℛ:"ℛ","↱":"↱","⧴":"⧴",Щ:"Щ",Ш:"Ш",Ь:"Ь",Ś:"Ś","⪼":"⪼",Š:"Š",Ş:"Ş",Ŝ:"Ŝ",С:"С",𝔖:"𝔖","↑":"↑",Σ:"Σ","∘":"∘",𝕊:"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔",𝒮:"𝒮","⋆":"⋆","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇",Þ:"Þ","™":"™",Ћ:"Ћ",Ц:"Ц","\t":" ",Τ:"Τ",Ť:"Ť",Ţ:"Ţ",Т:"Т",𝔗:"𝔗","∴":"∴",Θ:"Θ","  ":"  "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈",𝕋:"𝕋","⃛":"⃛",𝒯:"𝒯",Ŧ:"Ŧ",Ú:"Ú","↟":"↟","⥉":"⥉",Ў:"Ў",Ŭ:"Ŭ",Û:"Û",У:"У",Ű:"Ű",𝔘:"𝔘",Ù:"Ù",Ū:"Ū",_:"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎",Ų:"Ų",𝕌:"𝕌","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","↖":"↖","↗":"↗",ϒ:"ϒ",Υ:"Υ",Ů:"Ů",𝒰:"𝒰",Ũ:"Ũ",Ü:"Ü","⊫":"⊫","⫫":"⫫",В:"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ",𝔙:"𝔙",𝕍:"𝕍",𝒱:"𝒱","⊪":"⊪",Ŵ:"Ŵ","⋀":"⋀",𝔚:"𝔚",𝕎:"𝕎",𝒲:"𝒲",𝔛:"𝔛",Ξ:"Ξ",𝕏:"𝕏",𝒳:"𝒳",Я:"Я",Ї:"Ї",Ю:"Ю",Ý:"Ý",Ŷ:"Ŷ",Ы:"Ы",𝔜:"𝔜",𝕐:"𝕐",𝒴:"𝒴",Ÿ:"Ÿ",Ж:"Ж",Ź:"Ź",Ž:"Ž",З:"З",Ż:"Ż",Ζ:"Ζ",ℨ:"ℨ",ℤ:"ℤ",𝒵:"𝒵",á:"á",ă:"ă","∾":"∾","∾̳":"∾̳","∿":"∿",â:"â",а:"а",æ:"æ",𝔞:"𝔞",à:"à",ℵ:"ℵ",α:"α",ā:"ā","⨿":"⨿","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","⍼":"⍼",ą:"ą",𝕒:"𝕒","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'",å:"å",𝒶:"𝒶","*":"*",ã:"ã",ä:"ä","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⎶":"⎶",б:"б","„":"„","⦰":"⦰",β:"β",ℶ:"ℶ","≬":"≬",𝔟:"𝔟","◯":"◯","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⤍":"⤍","⧫":"⧫","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐",𝕓:"𝕓","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","¦":"¦",𝒷:"𝒷","⁏":"⁏","\\":"\","⧅":"⧅","⟈":"⟈","•":"•","⪮":"⪮",ć:"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","⩍":"⩍",č:"č",ç:"ç",ĉ:"ĉ","⩌":"⩌","⩐":"⩐",ċ:"ċ","⦲":"⦲","¢":"¢",𝔠:"𝔠",ч:"ч","✓":"✓",χ:"χ","○":"○","⧃":"⧃",ˆ:"ˆ","≗":"≗","↺":"↺","↻":"↻","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣",":":":",",":",","@":"@","∁":"∁","⩭":"⩭",𝕔:"𝕔","℗":"℗","↵":"↵","✗":"✗",𝒸:"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋎":"⋎","⋏":"⋏","¤":"¤","∱":"∱","⌭":"⌭","⥥":"⥥","†":"†",ℸ:"ℸ","‐":"‐","⤏":"⤏",ď:"ď",д:"д","⇊":"⇊","⩷":"⩷","°":"°",δ:"δ","⦱":"⦱","⥿":"⥿",𝔡:"𝔡","♦":"♦",ϝ:"ϝ","⋲":"⋲","÷":"÷","⋇":"⋇",ђ:"ђ","⌞":"⌞","⌍":"⌍",$:"$",𝕕:"𝕕","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌟":"⌟","⌌":"⌌",𝒹:"𝒹",ѕ:"ѕ","⧶":"⧶",đ:"đ","⋱":"⋱","▿":"▿","⦦":"⦦",џ:"џ","⟿":"⟿",é:"é","⩮":"⩮",ě:"ě","≖":"≖",ê:"ê","≕":"≕",э:"э",ė:"ė","≒":"≒",𝔢:"𝔢","⪚":"⪚",è:"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧",ℓ:"ℓ","⪕":"⪕","⪗":"⪗",ē:"ē","∅":"∅"," ":" "," ":" "," ":" ",ŋ:"ŋ"," ":" ",ę:"ę",𝕖:"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱",ε:"ε",ϵ:"ϵ","=":"=","≟":"≟","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱",ℯ:"ℯ",η:"η",ð:"ð",ë:"ë","€":"€","!":"!",ф:"ф","♀":"♀",ffi:"ffi",ff:"ff",ffl:"ffl",𝔣:"𝔣",fi:"fi",fj:"fj","♭":"♭",fl:"fl","▱":"▱",ƒ:"ƒ",𝕗:"𝕗","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","⅓":"⅓","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢",𝒻:"𝒻","⪌":"⪌",ǵ:"ǵ",γ:"γ","⪆":"⪆",ğ:"ğ",ĝ:"ĝ",г:"г",ġ:"ġ","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔",𝔤:"𝔤",ℷ:"ℷ",ѓ:"ѓ","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪈":"⪈","⋧":"⋧",𝕘:"𝕘",ℊ:"ℊ","⪎":"⪎","⪐":"⪐","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⥸":"⥸","≩︀":"≩︀",ъ:"ъ","⥈":"⥈","↭":"↭",ℏ:"ℏ",ĥ:"ĥ","♥":"♥","…":"…","⊹":"⊹",𝔥:"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪",𝕙:"𝕙","―":"―",𝒽:"𝒽",ħ:"ħ","⁃":"⁃",í:"í",î:"î",и:"и",е:"е","¡":"¡",𝔦:"𝔦",ì:"ì","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩",ij:"ij",ī:"ī",ı:"ı","⊷":"⊷",Ƶ:"Ƶ","℅":"℅","∞":"∞","⧝":"⧝","⊺":"⊺","⨗":"⨗","⨼":"⨼",ё:"ё",į:"į",𝕚:"𝕚",ι:"ι","¿":"¿",𝒾:"𝒾","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳",ĩ:"ĩ",і:"і",ï:"ï",ĵ:"ĵ",й:"й",𝔧:"𝔧",ȷ:"ȷ",𝕛:"𝕛",𝒿:"𝒿",ј:"ј",є:"є",κ:"κ",ϰ:"ϰ",ķ:"ķ",к:"к",𝔨:"𝔨",ĸ:"ĸ",х:"х",ќ:"ќ",𝕜:"𝕜",𝓀:"𝓀","⤛":"⤛","⤎":"⤎","⪋":"⪋","⥢":"⥢",ĺ:"ĺ","⦴":"⦴",λ:"λ","⦑":"⦑","⪅":"⪅","«":"«","⤟":"⤟","⤝":"⤝","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍",ľ:"ľ",ļ:"ļ",л:"л","⤶":"⤶","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","⇇":"⇇","⋋":"⋋","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⋖":"⋖","⥼":"⥼",𝔩:"𝔩","⪑":"⪑","⥪":"⥪","▄":"▄",љ:"љ","⥫":"⥫","◺":"◺",ŀ:"ŀ","⎰":"⎰","≨":"≨","⪉":"⪉","⪇":"⪇","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟼":"⟼","↬":"↬","⦅":"⦅",𝕝:"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","◊":"◊","(":"(","⦓":"⦓","⥭":"⥭","‎":"‎","⊿":"⊿","‹":"‹",𝓁:"𝓁","⪍":"⪍","⪏":"⪏","‚":"‚",ł:"ł","⪦":"⪦","⩹":"⩹","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","∺":"∺","¯":"¯","♂":"♂","✠":"✠","▮":"▮","⨩":"⨩",м:"м","—":"—",𝔪:"𝔪","℧":"℧",µ:"µ","⫰":"⫰","−":"−","⨪":"⨪","⫛":"⫛","⊧":"⊧",𝕞:"𝕞",𝓂:"𝓂",μ:"μ","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","⇏":"⇏","⊯":"⊯","⊮":"⊮",ń:"ń","∠⃒":"∠⃒","⩰̸":"⩰̸","≋̸":"≋̸",ʼn:"ʼn","♮":"♮","⩃":"⩃",ň:"ň",ņ:"ņ","⩭̸":"⩭̸","⩂":"⩂",н:"н","–":"–","⇗":"⇗","⤤":"⤤","≐̸":"≐̸","⤨":"⤨",𝔫:"𝔫","↮":"↮","⫲":"⫲","⋼":"⋼","⋺":"⋺",њ:"њ","≦̸":"≦̸","↚":"↚","‥":"‥",𝕟:"𝕟","¬":"¬","⋹̸":"⋹̸","⋵̸":"⋵̸","⋷":"⋷","⋶":"⋶","⋾":"⋾","⋽":"⋽","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸",𝓃:"𝓃","⊄":"⊄","⫅̸":"⫅̸","⊅":"⊅","⫆̸":"⫆̸",ñ:"ñ",ν:"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","⤧":"⤧",ó:"ó",ô:"ô",о:"о",ő:"ő","⨸":"⨸","⦼":"⦼",œ:"œ","⦿":"⦿",𝔬:"𝔬","˛":"˛",ò:"ò","⧁":"⧁","⦵":"⦵","⦾":"⦾","⦻":"⦻","⧀":"⧀",ō:"ō",ω:"ω",ο:"ο","⦶":"⦶",𝕠:"𝕠","⦷":"⦷","⦹":"⦹","∨":"∨","⩝":"⩝",ℴ:"ℴ",ª:"ª",º:"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛",ø:"ø","⊘":"⊘",õ:"õ","⨶":"⨶",ö:"ö","⌽":"⌽","¶":"¶","⫳":"⫳","⫽":"⫽",п:"п","%":"%",".":".","‰":"‰","‱":"‱",𝔭:"𝔭",φ:"φ",ϕ:"ϕ","☎":"☎",π:"π",ϖ:"ϖ",ℎ:"ℎ","+":"+","⨣":"⨣","⨢":"⨢","⨥":"⨥","⩲":"⩲","⨦":"⨦","⨧":"⨧","⨕":"⨕",𝕡:"𝕡","£":"£","⪳":"⪳","⪷":"⪷","⪹":"⪹","⪵":"⪵","⋨":"⋨","′":"′","⌮":"⌮","⌒":"⌒","⌓":"⌓","⊰":"⊰",𝓅:"𝓅",ψ:"ψ"," ":" ",𝔮:"𝔮",𝕢:"𝕢","⁗":"⁗",𝓆:"𝓆","⨖":"⨖","?":"?","⤜":"⤜","⥤":"⥤","∽̱":"∽̱",ŕ:"ŕ","⦳":"⦳","⦒":"⦒","⦥":"⦥","»":"»","⥵":"⥵","⤠":"⤠","⤳":"⤳","⤞":"⤞","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐",ř:"ř",ŗ:"ŗ",р:"р","⤷":"⤷","⥩":"⥩","↳":"↳","▭":"▭","⥽":"⥽",𝔯:"𝔯","⥬":"⥬",ρ:"ρ",ϱ:"ϱ","⇉":"⇉","⋌":"⋌","˚":"˚","‏":"‏","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⦆":"⦆",𝕣:"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","›":"›",𝓇:"𝓇","⋊":"⋊","▹":"▹","⧎":"⧎","⥨":"⥨","℞":"℞",ś:"ś","⪴":"⪴","⪸":"⪸",š:"š",ş:"ş",ŝ:"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓",с:"с","⋅":"⋅","⩦":"⩦","⇘":"⇘","§":"§",";":";","⤩":"⤩","✶":"✶",𝔰:"𝔰","♯":"♯",щ:"щ",ш:"ш","­":"­",σ:"σ",ς:"ς","⩪":"⩪","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","⨳":"⨳","⧤":"⧤","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀",ь:"ь","/":"/","⧄":"⧄","⌿":"⌿",𝕤:"𝕤","♠":"♠","⊓︀":"⊓︀","⊔︀":"⊔︀",𝓈:"𝓈","☆":"☆","⊂":"⊂","⫅":"⫅","⪽":"⪽","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⫇":"⫇","⫕":"⫕","⫓":"⫓","♪":"♪","¹":"¹","²":"²","³":"³","⫆":"⫆","⪾":"⪾","⫘":"⫘","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤪":"⤪",ß:"ß","⌖":"⌖",τ:"τ",ť:"ť",ţ:"ţ",т:"т","⌕":"⌕",𝔱:"𝔱",θ:"θ",ϑ:"ϑ",þ:"þ","×":"×","⨱":"⨱","⨰":"⨰","⌶":"⌶","⫱":"⫱",𝕥:"𝕥","⫚":"⫚","‴":"‴","▵":"▵","≜":"≜","◬":"◬","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢",𝓉:"𝓉",ц:"ц",ћ:"ћ",ŧ:"ŧ","⥣":"⥣",ú:"ú",ў:"ў",ŭ:"ŭ",û:"û",у:"у",ű:"ű","⥾":"⥾",𝔲:"𝔲",ù:"ù","▀":"▀","⌜":"⌜","⌏":"⌏","◸":"◸",ū:"ū",ų:"ų",𝕦:"𝕦",υ:"υ","⇈":"⇈","⌝":"⌝","⌎":"⌎",ů:"ů","◹":"◹",𝓊:"𝓊","⋰":"⋰",ũ:"ũ",ü:"ü","⦧":"⦧","⫨":"⫨","⫩":"⫩","⦜":"⦜","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀",в:"в","⊻":"⊻","≚":"≚","⋮":"⋮",𝔳:"𝔳",𝕧:"𝕧",𝓋:"𝓋","⦚":"⦚",ŵ:"ŵ","⩟":"⩟","≙":"≙",℘:"℘",𝔴:"𝔴",𝕨:"𝕨",𝓌:"𝓌",𝔵:"𝔵",ξ:"ξ","⋻":"⋻",𝕩:"𝕩",𝓍:"𝓍",ý:"ý",я:"я",ŷ:"ŷ",ы:"ы","¥":"¥",𝔶:"𝔶",ї:"ї",𝕪:"𝕪",𝓎:"𝓎",ю:"ю",ÿ:"ÿ",ź:"ź",ž:"ž",з:"з",ż:"ż",ζ:"ζ",𝔷:"𝔷",ж:"ж","⇝":"⇝",𝕫:"𝕫",𝓏:"𝓏","‍":"‍","‌":"‌"}}}},687:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.numericUnicodeMap={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},967:(r,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.fromCodePoint=String.fromCodePoint||function(r){return String.fromCharCode(Math.floor((r-65536)/1024)+55296,(r-65536)%1024+56320)},e.getCodePoint=String.prototype.codePointAt?function(r,e){return r.codePointAt(e)}:function(r,e){return 1024*(r.charCodeAt(e)-55296)+r.charCodeAt(e+1)-56320+65536},e.highSurrogateFrom=55296,e.highSurrogateTo=56319}},a={};function t(r){var o=a[r];if(void 0!==o)return o.exports;var c=a[r]={exports:{}};return e[r].call(c.exports,c,c.exports,t),c.exports}t.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return t.d(e,{a:e}),e},t.d=(r,e)=>{for(var a in e)t.o(e,a)&&!t.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:e[a]})},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),r=t(563),window.html_encode=r.encode,window.html_decode=r.decode})(); \ No newline at end of file diff --git a/src/lib/iro.min.js b/src/lib/iro.min.js new file mode 100644 index 00000000..2d203219 --- /dev/null +++ b/src/lib/iro.min.js @@ -0,0 +1,7 @@ +/*! + * iro.js v5.5.2 + * 2016-2021 James Daniel + * Licensed under MPL 2.0 + * github.com/jaames/iro.js + */ +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).iro=n()}(this,function(){"use strict";var m,s,n,i,o,x={},j=[],r=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;function M(t,n){for(var i in n)t[i]=n[i];return t}function y(t){var n=t.parentNode;n&&n.removeChild(t)}function h(t,n,i){var r,e,u,o,l=arguments;if(n=M({},n),3=r/i?u=n:e=n}return n},function(t,n,i){n&&g(t.prototype,n),i&&g(t,i)}(l,[{key:"hsv",get:function(){var t=this.$;return{h:t.h,s:t.s,v:t.v}},set:function(t){var n=this.$;if(t=b({},n,t),this.onChange){var i={h:!1,v:!1,s:!1,a:!1};for(var r in n)i[r]=t[r]!=n[r];this.$=t,(i.h||i.s||i.v||i.a)&&this.onChange(this,i)}else this.$=t}},{key:"hsva",get:function(){return b({},this.$)},set:function(t){this.hsv=t}},{key:"hue",get:function(){return this.$.h},set:function(t){this.hsv={h:t}}},{key:"saturation",get:function(){return this.$.s},set:function(t){this.hsv={s:t}}},{key:"value",get:function(){return this.$.v},set:function(t){this.hsv={v:t}}},{key:"alpha",get:function(){return this.$.a},set:function(t){this.hsv=b({},this.hsv,{a:t})}},{key:"kelvin",get:function(){return l.rgbToKelvin(this.rgb)},set:function(t){this.rgb=l.kelvinToRgb(t)}},{key:"red",get:function(){return this.rgb.r},set:function(t){this.rgb=b({},this.rgb,{r:t})}},{key:"green",get:function(){return this.rgb.g},set:function(t){this.rgb=b({},this.rgb,{g:t})}},{key:"blue",get:function(){return this.rgb.b},set:function(t){this.rgb=b({},this.rgb,{b:t})}},{key:"rgb",get:function(){var t=l.hsvToRgb(this.$),n=t.r,i=t.g,r=t.b;return{r:G(n),g:G(i),b:G(r)}},set:function(t){this.hsv=b({},l.rgbToHsv(t),{a:void 0===t.a?1:t.a})}},{key:"rgba",get:function(){return b({},this.rgb,{a:this.alpha})},set:function(t){this.rgb=t}},{key:"hsl",get:function(){var t=l.hsvToHsl(this.$),n=t.h,i=t.s,r=t.l;return{h:G(n),s:G(i),l:G(r)}},set:function(t){this.hsv=b({},l.hslToHsv(t),{a:void 0===t.a?1:t.a})}},{key:"hsla",get:function(){return b({},this.hsl,{a:this.alpha})},set:function(t){this.hsl=t}},{key:"rgbString",get:function(){var t=this.rgb;return"rgb("+t.r+", "+t.g+", "+t.b+")"},set:function(t){var n,i,r,e,u=1;if((n=_.exec(t))?(i=K(n[1],255),r=K(n[2],255),e=K(n[3],255)):(n=H.exec(t))&&(i=K(n[1],255),r=K(n[2],255),e=K(n[3],255),u=K(n[4],1)),!n)throw new Error("Invalid rgb string");this.rgb={r:i,g:r,b:e,a:u}}},{key:"rgbaString",get:function(){var t=this.rgba;return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},set:function(t){this.rgbString=t}},{key:"hexString",get:function(){var t=this.rgb;return"#"+U(t.r)+U(t.g)+U(t.b)},set:function(t){var n,i,r,e,u=255;if((n=D.exec(t))?(i=17*Q(n[1]),r=17*Q(n[2]),e=17*Q(n[3])):(n=F.exec(t))?(i=17*Q(n[1]),r=17*Q(n[2]),e=17*Q(n[3]),u=17*Q(n[4])):(n=L.exec(t))?(i=Q(n[1]),r=Q(n[2]),e=Q(n[3])):(n=B.exec(t))&&(i=Q(n[1]),r=Q(n[2]),e=Q(n[3]),u=Q(n[4])),!n)throw new Error("Invalid hex string");this.rgb={r:i,g:r,b:e,a:u/255}}},{key:"hex8String",get:function(){var t=this.rgba;return"#"+U(t.r)+U(t.g)+U(t.b)+U(Z(255*t.a))},set:function(t){this.hexString=t}},{key:"hslString",get:function(){var t=this.hsl;return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},set:function(t){var n,i,r,e,u=1;if((n=P.exec(t))?(i=K(n[1],360),r=K(n[2],100),e=K(n[3],100)):(n=$.exec(t))&&(i=K(n[1],360),r=K(n[2],100),e=K(n[3],100),u=K(n[4],1)),!n)throw new Error("Invalid hsl string");this.hsl={h:i,s:r,l:e,a:u}}},{key:"hslaString",get:function(){var t=this.hsla;return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},set:function(t){this.hslString=t}}]),l}();function X(t){var n,i=t.width,r=t.sliderSize,e=t.borderWidth,u=t.handleRadius,o=t.padding,l=t.sliderShape,s="horizontal"===t.layoutDirection;return r=null!=(n=r)?n:2*o+2*u,"circle"===l?{handleStart:t.padding+t.handleRadius,handleRange:i-2*o-2*u,width:i,height:i,cx:i/2,cy:i/2,radius:i/2-e/2}:{handleStart:r/2,handleRange:i-r,radius:r/2,x:0,y:0,width:s?r:i,height:s?i:r}}function Y(t,n){var i=X(t),r=i.width,e=i.height,u=i.handleRange,o=i.handleStart,l="horizontal"===t.layoutDirection,s=l?r/2:e/2,c=o+function(t,n){var i=n.hsva,r=n.rgb;switch(t.sliderType){case"red":return r.r/2.55;case"green":return r.g/2.55;case"blue":return r.b/2.55;case"alpha":return 100*i.a;case"kelvin":var e=t.minTemperature,u=t.maxTemperature-e,o=(n.kelvin-e)/u*100;return Math.max(0,Math.min(o,100));case"hue":return i.h/=3.6;case"saturation":return i.s;case"value":default:return i.v}}(t,n)/100*u;return l&&(c=-1*c+u+2*o),{x:l?s:c,y:l?c:s}}var tt,nt=2*Math.PI,it=function(t,n){return(t%n+n)%n},rt=function(t,n){return Math.sqrt(t*t+n*n)};function et(t){return t.width/2-t.padding-t.handleRadius-t.borderWidth}function ut(t){var n=t.width/2;return{width:t.width,radius:n-t.borderWidth,cx:n,cy:n}}function ot(t,n,i){var r=t.wheelAngle,e=t.wheelDirection;return i&&"clockwise"===e?n=r+n:"clockwise"===e?n=360-r+n:i&&"anticlockwise"===e?n=r+180-n:"anticlockwise"===e&&(n=r-n),it(n,360)}function lt(t,n,i){var r=ut(t),e=r.cx,u=r.cy,o=et(t);n=e-n,i=u-i;var l=ot(t,Math.atan2(-i,-n)*(360/nt)),s=Math.min(rt(n,i),o);return{h:Math.round(l),s:Math.round(100/o*s)}}function st(t){var n=t.width,i=t.boxHeight;return{width:n,height:null!=i?i:n,radius:t.padding+t.handleRadius}}function ct(t,n,i){var r=st(t),e=r.width,u=r.height,o=r.radius,l=(n-o)/(e-2*o)*100,s=(i-o)/(u-2*o)*100;return{s:Math.max(0,Math.min(l,100)),v:Math.max(0,Math.min(100-s,100))}}function at(t,n,i,r){for(var e=0;e1&&"undefined"==typeof MSStream};function w(l){return function($){return $.test(l)}}function x(l){var $={userAgent:"",platform:"",maxTouchPoints:0};l||"undefined"==typeof navigator?"string"==typeof l?$.userAgent=l:l&&l.userAgent&&($={userAgent:l.userAgent,platform:l.platform,maxTouchPoints:l.maxTouchPoints||0}):$={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var a=$.userAgent,e=a.split("[FBAN");void 0!==e[1]&&(a=e[0]),void 0!==(e=a.split("Twitter"))[1]&&(a=e[0]);var r=w(a),o={apple:{phone:r(g)&&!r(b),ipod:r(i),tablet:!r(g)&&(r(j)||v($))&&!r(b),universal:r(k),device:(r(g)||r(i)||r(j)||r(k)||v($))&&!r(b)},amazon:{phone:r(c),tablet:!r(c)&&r(d),device:r(c)||r(d)},android:{phone:!r(b)&&r(c)||!r(b)&&r(h),tablet:!r(b)&&!r(c)&&!r(h)&&(r(d)||r(m)),device:!r(b)&&(r(c)||r(d)||r(h)||r(m))||r(/\bokhttp\b/i)},windows:{phone:r(b),tablet:r(n),device:r(b)||r(n)},other:{blackberry:r(p),blackberry10:r(q),opera:r(s),firefox:r(u),chrome:r(t),device:r(p)||r(q)||r(s)||r(u)||r(t)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}f=x();if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f}else if(typeof define==="function"&&define.amd){define(function(){return f})}else{this["isMobile"]=f}})(); \ No newline at end of file diff --git a/src/lib/jquery-3.6.1/jquery-3.6.1.min.js b/src/lib/jquery-3.6.1/jquery-3.6.1.min.js new file mode 100644 index 00000000..2c69bc90 --- /dev/null +++ b/src/lib/jquery-3.6.1/jquery-3.6.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","rcustomProp","getStyles","opener","getComputedStyle","swap","old","rboxStyle","rtrimCSS","curCSS","computed","width","minWidth","maxWidth","isCustomProp","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","borderTopWidth","borderBottomWidth","offsetHeight","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classNames","curValue","finalValue","removeClass","toggleClass","stateVal","isValidValue","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","parserErrorElem","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","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ery-ui-1.12.1.custom/AUTHORS.txt b/src/lib/jquery-ui-1.12.1.custom/AUTHORS.txt new file mode 100644 index 00000000..a75056b9 --- /dev/null +++ b/src/lib/jquery-ui-1.12.1.custom/AUTHORS.txt @@ -0,0 +1,333 @@ +Authors ordered by first contribution +A list of current team members is available at http://jqueryui.com/about + +Paul Bakaus +Richard Worth +Yehuda Katz +Sean Catchpole +John Resig +Tane Piper +Dmitri Gaskin +Klaus Hartl +Stefan Petre +Gilles van den Hoven +Micheil Bryan Smith +Jörn Zaefferer +Marc Grabanski +Keith Wood +Brandon Aaron +Scott González +Eduardo Lundgren +Aaron Eisenberger +Joan Piedra +Bruno Basto +Remy Sharp +Bohdan Ganicky +David Bolter +Chi Cheng +Ca-Phun Ung +Ariel Flesler +Maggie Wachs +Scott Jehl +Todd Parker +Andrew Powell +Brant Burnett +Douglas Neiner +Paul Irish +Ralph Whitbeck +Thibault Duplessis +Dominique Vincent +Jack Hsu +Adam Sontag +Carl Fürstenberg +Kevin Dalman +Alberto Fernández Capel +Jacek Jędrzejewski (http://jacek.jedrzejewski.name) +Ting Kuei +Samuel Cormier-Iijima +Jon Palmer +Ben Hollis +Justin MacCarthy +Eyal Kobrigo +Tiago Freire +Diego Tres +Holger Rüprich +Ziling Zhao +Mike Alsup +Robson Braga Araujo +Pierre-Henri Ausseil +Christopher McCulloh +Andrew Newcomb +Lim Chee Aun +Jorge Barreiro +Daniel Steigerwald +John Firebaugh +John Enters +Andrey Kapitcyn +Dmitry Petrov +Eric Hynds +Chairat Sunthornwiphat +Josh Varner +Stéphane Raimbault +Jay Merrifield +J. Ryan Stinnett +Peter Heiberg +Alex Dovenmuehle +Jamie Gegerson +Raymond Schwartz +Phillip Barnes +Kyle Wilkinson +Khaled AlHourani +Marian Rudzynski +Jean-Francois Remy +Doug Blood +Filippo Cavallarin +Heiko Henning +Aliaksandr Rahalevich +Mario Visic +Xavi Ramirez +Max Schnur +Saji Nediyanchath +Corey Frang +Aaron Peterson +Ivan Peters +Mohamed Cherif Bouchelaghem +Marcos Sousa +Michael DellaNoce +George Marshall +Tobias Brunner +Martin Solli +David Petersen +Dan Heberden +William Kevin Manire +Gilmore Davidson +Michael Wu +Adam Parod +Guillaume Gautreau +Marcel Toele +Dan Streetman +Matt Hoskins +Giovanni Giacobbi +Kyle Florence +Pavol Hluchý +Hans Hillen +Mark Johnson +Trey Hunner +Shane Whittet +Edward A Faulkner +Adam Baratz +Kato Kazuyoshi +Eike Send +Kris Borchers +Eddie Monge +Israel Tsadok +Carson McDonald +Jason Davies +Garrison Locke +David Murdoch +Benjamin Scott Boyle +Jesse Baird +Jonathan Vingiano +Dylan Just +Hiroshi Tomita +Glenn Goodrich +Tarafder Ashek-E-Elahi +Ryan Neufeld +Marc Neuwirth +Philip Graham +Benjamin Sterling +Wesley Walser +Kouhei Sutou +Karl Kirch +Chris Kelly +Jason Oster +Felix Nagel +Alexander Polomoshnov +David Leal +Igor Milla +Dave Methvin +Florian Gutmann +Marwan Al Jubeh +Milan Broum +Sebastian Sauer +Gaëtan Muller +Michel Weimerskirch +William Griffiths +Stojce Slavkovski +David Soms +David De Sloovere +Michael P. Jung +Shannon Pekary +Dan Wellman +Matthew Edward Hutton +James Khoury +Rob Loach +Alberto Monteiro +Alex Rhea +Krzysztof Rosiński +Ryan Olton +Genie <386@mail.com> +Rick Waldron +Ian Simpson +Lev Kitsis +TJ VanToll +Justin Domnitz +Douglas Cerna +Bert ter Heide +Jasvir Nagra +Yuriy Khabarov <13real008@gmail.com> +Harri Kilpiö +Lado Lomidze +Amir E. Aharoni +Simon Sattes +Jo Liss +Guntupalli Karunakar +Shahyar Ghobadpour +Lukasz Lipinski +Timo Tijhof +Jason Moon +Martin Frost +Eneko Illarramendi +EungJun Yi +Courtland Allen +Viktar Varvanovich +Danny Trunk +Pavel Stetina +Michael Stay +Steven Roussey +Michael Hollis +Lee Rowlands +Timmy Willison +Karl Swedberg +Baoju Yuan +Maciej Mroziński +Luis Dalmolin +Mark Aaron Shirley +Martin Hoch +Jiayi Yang +Philipp Benjamin Köppchen +Sindre Sorhus +Bernhard Sirlinger +Jared A. Scheel +Rafael Xavier de Souza +John Chen +Robert Beuligmann +Dale Kocian +Mike Sherov +Andrew Couch +Marc-Andre Lafortune +Nate Eagle +David Souther +Mathias Stenbom +Sergey Kartashov +Avinash R +Ethan Romba +Cory Gackenheimer +Juan Pablo Kaniefsky +Roman Salnikov +Anika Henke +Samuel Bovée +Fabrício Matté +Viktor Kojouharov +Pawel Maruszczyk (http://hrabstwo.net) +Pavel Selitskas +Bjørn Johansen +Matthieu Penant +Dominic Barnes +David Sullivan +Thomas Jaggi +Vahid Sohrabloo +Travis Carden +Bruno M. Custódio +Nathanael Silverman +Christian Wenz +Steve Urmston +Zaven Muradyan +Woody Gilk +Zbigniew Motyka +Suhail Alkowaileet +Toshi MARUYAMA +David Hansen +Brian Grinstead +Christian Klammer +Steven Luscher +Gan Eng Chin +Gabriel Schulhof +Alexander Schmitz +Vilhjálmur Skúlason +Siebrand Mazeland +Mohsen Ekhtiari +Pere Orga +Jasper de Groot +Stephane Deschamps +Jyoti Deka +Andrei Picus +Ondrej Novy +Jacob McCutcheon +Monika Piotrowicz +Imants Horsts +Eric Dahl +Dave Stein +Dylan Barrell +Daniel DeGroff +Michael Wiencek +Thomas Meyer +Ruslan Yakhyaev +Brian J. Dowling +Ben Higgins +Yermo Lamers +Patrick Stapleton +Trisha Crowley +Usman Akeju +Rodrigo Menezes +Jacques Perrault +Frederik Elvhage +Will Holley +Uri Gilad +Richard Gibson +Simen Bekkhus +Chen Eshchar +Bruno Pérel +Mohammed Alshehri +Lisa Seacat DeLuca +Anne-Gaelle Colom +Adam Foster +Luke Page +Daniel Owens +Michael Orchard +Marcus Warren +Nils Heuermann +Marco Ziech +Patricia Juarez +Ben Mosher +Ablay Keldibek +Thomas Applencourt +Jiabao Wu +Eric Lee Carraway +Victor Homyakov +Myeongjin Lee +Liran Sharir +Weston Ruter +Mani Mishra +Hannah Methvin +Leonardo Balter +Benjamin Albert +Michał Gołębiowski +Alyosha Pushak +Fahad Ahmad +Matt Brundage +Francesc Baeta +Piotr Baran +Mukul Hase +Konstantin Dinev +Rand Scullard +Dan Strohl +Maksim Ryzhikov +Amine HADDAD +Amanpreet Singh +Alexey Balchunas +Peter Kehl +Peter Dave Hello +Johannes Schäfer +Ville Skyttä +Ryan Oriecuia diff --git a/src/lib/jquery-ui-1.12.1.custom/LICENSE.txt b/src/lib/jquery-ui-1.12.1.custom/LICENSE.txt new file mode 100644 index 00000000..4819e542 --- /dev/null +++ b/src/lib/jquery-ui-1.12.1.custom/LICENSE.txt @@ -0,0 +1,43 @@ +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. diff --git a/src/lib/jquery-ui-1.12.1.custom/external/jquery/jquery.js b/src/lib/jquery-ui-1.12.1.custom/external/jquery/jquery.js new file mode 100644 index 00000000..7fc60fca --- /dev/null +++ b/src/lib/jquery-ui-1.12.1.custom/external/jquery/jquery.js @@ -0,0 +1,11008 @@ +/*! + * jQuery JavaScript Library v1.12.4 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2016-05-20T17:17Z + */ + +(function( global, factory ) { + + if ( typeof module === "object" && typeof module.exports === "object" ) { + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Support: Firefox 18+ +// Can't be in strict mode, several libs including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +//"use strict"; +var deletedIds = []; + +var document = window.document; + +var slice = deletedIds.slice; + +var concat = deletedIds.concat; + +var push = deletedIds.push; + +var indexOf = deletedIds.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var support = {}; + + + +var + version = "1.12.4", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android<4.1, IE<9 + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + + // Return all the elements in a clean array + slice.call( this ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: deletedIds.sort, + splice: deletedIds.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = jQuery.isArray( copy ) ) ) ) { + + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray( src ) ? src : []; + + } else { + clone = src && jQuery.isPlainObject( src ) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type( obj ) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type( obj ) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + // adding 1 corrects loss of precision from parseFloat (#15100) + var realStringObj = obj && obj.toString(); + return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call( obj, "constructor" ) && + !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { + return false; + } + } catch ( e ) { + + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( !support.ownFirst ) { + for ( key in obj ) { + return hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; + }, + + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); // jscs:ignore requireDotNotation + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // Support: Android<4.1, IE<9 + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( indexOf ) { + return indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + while ( j < len ) { + first[ i++ ] = second[ j++ ]; + } + + // Support: IE<9 + // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) + if ( len !== len ) { + while ( second[ j ] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: function() { + return +( new Date() ); + }, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +// JSHint would error on this code due to the Symbol not being defined in ES5. +// Defining this global in .jshintrc would create a danger of using the global +// unguarded in another place, it seems safer to just disable JSHint for these +// three lines. +/* jshint ignore: start */ +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ]; +} +/* jshint ignore: end */ + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +function isArrayLike( obj ) { + + // Support: iOS 8.2 (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.2.1 + * http://sizzlejs.com/ + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2015-10-17 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // http://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, nidselect, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + + // ID selector + if ( (m = match[1]) ) { + + // Document context + if ( nodeType === 9 ) { + if ( (elem = context.getElementById( m )) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && (elem = newContext.getElementById( m )) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( (m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !compilerCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + + if ( nodeType !== 1 ) { + newContext = context; + newSelector = selector; + + // qSA looks outside Element context, which is not what we want + // Thanks to Andrew Dupont for this workaround technique + // Support: IE <=8 + // Exclude object elements + } else if ( context.nodeName.toLowerCase() !== "object" ) { + + // Capture the context ID, setting it first if necessary + if ( (nid = context.getAttribute( "id" )) ) { + nid = nid.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", (nid = expando) ); + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; + while ( i-- ) { + groups[i] = nidselect + " " + toSelector( groups[i] ); + } + newSelector = groups.join( "," ); + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, parent, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9-11, Edge + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + if ( (parent = document.defaultView) && parent.top !== parent ) { + // Support: IE 11 + if ( parent.addEventListener ) { + parent.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", unloadHandler ); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( document.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var m = context.getElementById( id ); + return m ? [ m ] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + docElem.appendChild( div ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowcapture^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibing-combinator selector` fails + if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === document ? -1 : + b === document ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + !compilerCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch (e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + // Use previously-cached element index if available + if ( useCache ) { + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + // Don't keep the element (issue #299) + input[0] = null; + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); + + if ( (oldCache = uniqueCache[ dir ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ dir ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context === document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + if ( !context && elem.ownerDocument !== document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context || document, xml) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + } ); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + + } + + if ( typeof qualifier === "string" ) { + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) > -1 ) !== not; + } ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // init accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt( 0 ) === "<" && + selector.charAt( selector.length - 1 ) === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[ 2 ] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[ 0 ] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return typeof root.ready !== "undefined" ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( pos ? + pos.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[ 0 ], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem, this ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.uniqueSort( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +} ); +var rnotwhite = ( /\S+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( jQuery.isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = true; + if ( !memory ) { + self.disable(); + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ], + [ "notify", "progress", jQuery.Callbacks( "memory" ) ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this === promise ? newDefer.promise() : this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( function() { + + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || + ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. + // If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( values === progressValues ) { + deferred.notifyWith( contexts, values ); + + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .progress( updateFunc( i, progressContexts, progressValues ) ) + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +} ); + + +// The deferred used on DOM ready +var readyList; + +jQuery.fn.ready = function( fn ) { + + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + jQuery( document ).off( "ready" ); + } + } +} ); + +/** + * Clean-up method for dom ready events + */ +function detach() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } +} + +/** + * The ready event handler and self cleanup method + */ +function completed() { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || + window.event.type === "load" || + document.readyState === "complete" ) { + + detach(); + jQuery.ready(); + } +} + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called + // after the browser event has already occurred. + // Support: IE6-10 + // Older IE sometimes signals "interactive" too soon + if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); + + // If IE event model is used + } else { + + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch ( e ) {} + + if ( top && top.doScroll ) { + ( function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll( "left" ); + } catch ( e ) { + return window.setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + } )(); + } + } + } + return readyList.promise( obj ); +}; + +// Kick off the DOM ready check even if the user does not +jQuery.ready.promise(); + + + + +// Support: IE<9 +// Iteration over object's inherited properties before its own +var i; +for ( i in jQuery( support ) ) { + break; +} +support.ownFirst = i === "0"; + +// Note: most support tests are defined in their respective modules. +// false until the test is run +support.inlineBlockNeedsLayout = false; + +// Execute ASAP in case we need to set body.style.zoom +jQuery( function() { + + // Minified: var a,b,c,d + var val, div, body, container; + + body = document.getElementsByTagName( "body" )[ 0 ]; + if ( !body || !body.style ) { + + // Return for frameset docs that don't have a body + return; + } + + // Setup + div = document.createElement( "div" ); + container = document.createElement( "div" ); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild( container ).appendChild( div ); + + if ( typeof div.style.zoom !== "undefined" ) { + + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; + + support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; + if ( val ) { + + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); +} ); + + +( function() { + var div = document.createElement( "div" ); + + // Support: IE<9 + support.deleteExpando = true; + try { + delete div.test; + } catch ( e ) { + support.deleteExpando = false; + } + + // Null elements to avoid leaks in IE. + div = null; +} )(); +var acceptData = function( elem ) { + var noData = jQuery.noData[ ( elem.nodeName + " " ).toLowerCase() ], + nodeType = +elem.nodeType || 1; + + // Do not set data on non-element DOM nodes because it will not be cleared (#8335). + return nodeType !== 1 && nodeType !== 9 ? + false : + + // Nodes accept data unless otherwise specified; rejection can be conditional + !noData || noData !== true && elem.getAttribute( "classid" ) === noData; +}; + + + + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + +function dataAttr( elem, key, data ) { + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[ name ] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + +function internalData( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) && + data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split( " " ); + } + } + } else { + + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[ i ] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, undefined + } else { + cache[ id ] = undefined; + } +} + +jQuery.extend( { + cache: {}, + + // The following elements (space-suffixed to avoid Object.prototype collisions) + // throw uncatchable exceptions if you attempt to set expando properties + noData: { + "applet ": true, + "embed ": true, + + // ...but Flash objects (which have this classid) *can* handle expandos + "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE11+ + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + jQuery.data( this, key ); + } ); + } + + return arguments.length > 1 ? + + // Sets one value + this.each( function() { + jQuery.data( this, key, value ); + } ) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; + }, + + removeData: function( key ) { + return this.each( function() { + jQuery.removeData( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray( data ) ) { + queue = jQuery._data( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, + // or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); + + +( function() { + var shrinkWrapBlocksVal; + + support.shrinkWrapBlocks = function() { + if ( shrinkWrapBlocksVal != null ) { + return shrinkWrapBlocksVal; + } + + // Will be changed later if needed. + shrinkWrapBlocksVal = false; + + // Minified: var b,c,d + var div, body, container; + + body = document.getElementsByTagName( "body" )[ 0 ]; + if ( !body || !body.style ) { + + // Test fired too early or in an unsupported environment, exit. + return; + } + + // Setup + div = document.createElement( "div" ); + container = document.createElement( "div" ); + container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; + body.appendChild( container ).appendChild( div ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + if ( typeof div.style.zoom !== "undefined" ) { + + // Reset CSS: box-sizing; display; margin; border + div.style.cssText = + + // Support: Firefox<29, Android 2.3 + // Vendor-prefix box-sizing + "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + + "box-sizing:content-box;display:block;margin:0;border:0;" + + "padding:1px;width:1px;zoom:1"; + div.appendChild( document.createElement( "div" ) ).style.width = "5px"; + shrinkWrapBlocksVal = div.offsetWidth !== 3; + } + + body.removeChild( container ); + + return shrinkWrapBlocksVal; + }; + +} )(); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHidden = function( elem, el ) { + + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || + !jQuery.contains( elem.ownerDocument, elem ); + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, + scale = 1, + maxIterations = 20, + currentValue = tween ? + function() { return tween.cur(); } : + function() { return jQuery.css( elem, prop, "" ); }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + do { + + // If previous iteration zeroed out, double until we get *something*. + // Use string for doubling so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + initialInUnit = initialInUnit / scale; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // Break the loop if scale is unchanged or perfect, or if we've just had enough. + } while ( + scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations + ); + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( + elems[ i ], + key, + raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[ 0 ], key ) : emptyGet; +}; +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([\w:-]+)/ ); + +var rscriptType = ( /^$|\/(?:java|ecma)script/i ); + +var rleadingWhitespace = ( /^\s+/ ); + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|" + + "details|dialog|figcaption|figure|footer|header|hgroup|main|" + + "mark|meter|nav|output|picture|progress|section|summary|template|time|video"; + + + +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + + +( function() { + var div = document.createElement( "div" ), + fragment = document.createDocumentFragment(), + input = document.createElement( "input" ); + + // Setup + div.innerHTML = "
    a"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName( "tbody" ).length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = + document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav>"; + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + input.type = "checkbox"; + input.checked = true; + fragment.appendChild( input ); + support.appendChecked = input.checked; + + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE6-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // #11217 - WebKit loses check when the name is after the checked attribute + fragment.appendChild( div ); + + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input = document.createElement( "input" ); + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Cloned elements keep attachEvent handlers, we use addEventListener on IE9+ + support.noCloneEvent = !!div.addEventListener; + + // Support: IE<9 + // Since attributes and properties are the same in IE, + // cleanData must set properties to undefined rather than use removeAttribute + div[ jQuery.expando ] = 1; + support.attributes = !div.getAttribute( jQuery.expando ); +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
    ", "
    " ], + area: [ 1, "", "" ], + + // Support: IE8 + param: [ 1, "", "" ], + thead: [ 1, "", "
    " ], + tr: [ 2, "", "
    " ], + col: [ 2, "", "
    " ], + td: [ 3, "", "
    " ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
    ", "
    " ] +}; + +// Support: IE8-IE9 +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== "undefined" ? + context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; + ( elem = elems[ i ] ) != null; + i++ + ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; ( elem = elems[ i ] ) != null; i++ ) { + jQuery._data( + elem, + "globalEval", + !refElements || jQuery._data( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/, + rtbody = / from table fragments + if ( !support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[ 1 ] === "
    " && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), "tbody" ) && + !tbody.childNodes.length ) { + + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; +} + + +( function() { + var i, eventName, + div = document.createElement( "div" ); + + // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events) + for ( i in { submit: true, change: true, focusin: true } ) { + eventName = "on" + i; + + if ( !( support[ i ] = eventName in window ) ) { + + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + div.setAttribute( eventName, "t" ); + support[ i ] = div.attributes[ eventName ].expando === false; + } + } + + // Null elements to avoid leaks in IE. + div = null; +} )(); + + +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE9 +// See #13393 for more info +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = {}; + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && + ( !e || jQuery.event.triggered !== e.type ) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + + // Add elem as a property of the handle fn to prevent a memory leak + // with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && + jQuery._data( cur, "handle" ); + + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( + ( !special._default || + special._default.apply( eventPath.pop(), data ) === false + ) && acceptData( elem ) + ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, j, ret, matched, handleObj, + handlerQueue = [], + args = slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). + if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Support (at least): Chrome, IE9 + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // + // Support: Firefox<=42+ + // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) + if ( delegateCount && cur.nodeType && + ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push( { elem: cur, handlers: matches } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Safari 6-8+ + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + + "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split( " " ), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: ( "button buttons clientX clientY fromElement offsetX offsetY " + + "pageX pageY screenX screenY toElement" ).split( " " ), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - + ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - + ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? + original.toElement : + fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + // Piggyback on a donor event to simulate a different one + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + + // Previously, `originalEvent: {}` was set here, so stopPropagation call + // would not be triggered on donor event, since in our own + // jQuery.event.stopPropagation function we had a check for existence of + // originalEvent.stopPropagation method, so, consequently it would be a noop. + // + // Guard for simulated events was moved to jQuery.event.stopPropagation function + // since `originalEvent` should point to the original event for the + // constancy with other events and for more focused logic + } + ); + + jQuery.event.trigger( e, null, elem ); + + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, + // to properly expose it to GC + if ( typeof elem[ name ] === "undefined" ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: IE < 9, Android < 4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( !e || this.isSimulated ) { + return; + } + + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && e.stopImmediatePropagation ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://code.google.com/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +// IE submit delegation +if ( !support.submit ) { + + jQuery.event.special.submit = { + setup: function() { + + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? + + // Support: IE <=8 + // We use jQuery.prop instead of elem.form + // to allow fixing the IE8 delegated submit issue (gh-2332) + // by 3rd party polyfills/workarounds. + jQuery.prop( elem, "form" ) : + undefined; + + if ( form && !jQuery._data( form, "submit" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submitBubble = true; + } ); + jQuery._data( form, "submit", true ); + } + } ); + + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + + // If form was submitted by the user, bubble the event up the tree + if ( event._submitBubble ) { + delete event._submitBubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event ); + } + } + }, + + teardown: function() { + + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !support.change ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._justChanged = true; + } + } ); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._justChanged && !event.isTrigger ) { + this._justChanged = false; + } + + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event ); + } ); + } + return false; + } + + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "change" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event ); + } + } ); + jQuery._data( elem, "change", true ); + } + } ); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || + ( elem.type !== "radio" && elem.type !== "checkbox" ) ) { + + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Support: Firefox +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome, Safari +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = jQuery._data( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + jQuery._removeData( doc, fix ); + } else { + jQuery._data( doc, fix, attaches ); + } + } + }; + } ); +} + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + }, + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +var rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp( "<(?:" + nodeNames + ")[\\s/>]", "i" ), + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, + + // Support: IE 10-11, Edge 10240+ + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement( "div" ) ); + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName( "tbody" )[ 0 ] || + elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( jQuery.find.attr( elem, "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute( "type" ); + } + return elem; +} + +function cloneCopyEvent( src, dest ) { + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android<4.1, PhantomJS<2 + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + jQuery.globalEval( + ( node.text || node.textContent || node.innerHTML || "" ) + .replace( rcleanScript, "" ) + ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + elems = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = elems[ i ] ) != null; i++ ) { + + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html.replace( rxhtmlTag, "<$1>" ); + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( support.html5Clone || jQuery.isXMLDoc( elem ) || + !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( ( !support.noCloneEvent || !support.noCloneChecked ) && + ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) { + + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[ i ] ) { + fixCloneNodeIssues( node, destElements[ i ] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) { + cloneCopyEvent( node, destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + cleanData: function( elems, /* internal */ forceAcceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + attributes = support.attributes, + special = jQuery.event.special; + + for ( ; ( elem = elems[ i ] ) != null; i++ ) { + if ( forceAcceptData || acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // Support: IE<9 + // IE does not allow us to delete expando properties from nodes + // IE creates expando attributes along with the property + // IE does not have a removeAttribute function on Document nodes + if ( !attributes && typeof elem.removeAttribute !== "undefined" ) { + elem.removeAttribute( internalKey ); + + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://code.google.com/p/chromium/issues/detail?id=378607 + } else { + elem[ internalKey ] = undefined; + } + + deletedIds.push( id ); + } + } + } + } + } +} ); + +jQuery.fn.extend( { + + // Keep domManip exposed until 3.0 (gh-2225) + domManip: domManip, + + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( + ( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value ) + ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + + // Remove element nodes and prevent memory leaks + elem = this[ i ] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); + + +var iframe, + elemdisplay = { + + // Support: Firefox + // We have to pre-define these values for FF (#10227) + HTML: "block", + BODY: "block" + }; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ + +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + display = jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = ( iframe || jQuery( "