From 6c3993843a16fb50982aaa67fa5d2c7180a041cd Mon Sep 17 00:00:00 2001 From: Eclipse Srl Date: Wed, 24 Jul 2019 12:30:46 +0200 Subject: [PATCH] first commit --- LICENSE.txt | 339 ++++++++++ README.txt | 151 +++++ assets/css/ajax-loading.css | 32 + assets/images/delete-cache.svg | 9 + assets/images/delete-frontend-editor.svg | 9 + assets/images/delete.svg | 6 + assets/images/webflow.svg | 15 + assets/js/bundle/udesly-wf-wc.bundle.min.js | 1 + assets/js/bundle/udesly-wf-wp.bundle.min.js | 1 + .../udesly-frontend-editor.css | 2 + .../udesly-frontend-editor.js | 6 + .../dist/css/app.d42d56f2.css | 1 + .../dist/css/chunk-vendors.5a1b1a38.css | 1 + .../udesly-query-builder/dist/index.html | 1 + .../dist/js/app.5479cd4b.js | 2 + .../dist/js/app.5479cd4b.js.map | 1 + .../dist/js/chunk-vendors.1ba88238.js | 13 + .../dist/js/chunk-vendors.1ba88238.js.map | 1 + .../udesly-rules/dist/css/app.4c2b8bfd.css | 1 + externals/udesly-rules/dist/favicon.ico | Bin 0 -> 1150 bytes externals/udesly-rules/dist/index.html | 1 + .../udesly-rules/dist/js/app.43f562ff.js | 2 + .../udesly-rules/dist/js/app.43f562ff.js.map | 1 + .../dist/js/chunk-vendors.13824eae.js | 13 + .../dist/js/chunk-vendors.13824eae.js.map | 1 + .../udesly-settings/dist/css/app.7396c83b.css | 1 + externals/udesly-settings/dist/index.html | 1 + .../udesly-settings/dist/js/app.d2474e9f.js | 2 + .../dist/js/app.d2474e9f.js.map | 1 + .../dist/js/chunk-vendors.b831f56f.js | 13 + .../dist/js/chunk-vendors.b831f56f.js.map | 1 + .../dist/css/app.14fc4588.css | 1 + externals/udesly-webflow-data/dist/index.html | 1 + .../dist/js/app.84b46244.js | 2 + .../dist/js/app.84b46244.js.map | 1 + .../dist/js/chunk-vendors.b29bfde3.js | 13 + .../dist/js/chunk-vendors.b29bfde3.js.map | 1 + includes/Assets/Libraries.php | 24 + includes/Assets/Scripts.php | 86 +++ includes/Assets/Styles.php | 34 + includes/Blog/Blog.php | 164 +++++ includes/Boxes/Box.php | 158 +++++ includes/CPT/CustomPostTypes.php | 230 +++++++ includes/Core/Activator.php | 12 + includes/Core/Deactivator.php | 10 + includes/Core/Udesly.php | 207 ++++++ includes/Dashboard/Menu.php | 51 ++ includes/Dashboard/Views/CustomPostTypes.php | 438 +++++++++++++ includes/Dashboard/Views/Dashboard.php | 4 + includes/Dashboard/Views/Settings.php | 499 +++++++++++++++ includes/Dashboard/Views/WebflowData.php | 274 ++++++++ .../FrontendEditor/FrontendEditorType.php | 183 ++++++ includes/Query/Posts.php | 541 ++++++++++++++++ includes/Query/PostsQueryBuilder.php | 280 ++++++++ includes/Query/Taxonomies.php | 349 ++++++++++ includes/Query/TermsQueryBuilder.php | 77 +++ includes/Rules/Rule.php | 512 +++++++++++++++ includes/Search/Search.php | 105 +++ includes/Terms/Terms.php | 156 +++++ includes/Theme/DataManager.php | 234 +++++++ includes/Theme/IntegrationData.php | 91 +++ includes/Theme/UdeslyThemeData.php | 118 ++++ includes/User/User.php | 356 +++++++++++ includes/Utils/Security.php | 20 + includes/Utils/Test.php | 49 ++ includes/WC/WC.php | 283 ++++++++ includes/misc/acf.php | 36 ++ includes/misc/blog.php | 186 ++++++ includes/misc/boxes.php | 207 ++++++ includes/misc/frontend-editor.php | 142 ++++ includes/misc/general.php | 307 +++++++++ includes/misc/pagination.php | 83 +++ includes/misc/posts-query.php | 30 + includes/misc/rules.php | 340 ++++++++++ includes/misc/social.php | 86 +++ includes/misc/strings.php | 31 + includes/misc/terms-query.php | 33 + includes/misc/terms.php | 123 ++++ includes/misc/woocommerce.php | 604 ++++++++++++++++++ index.php | 1 + .../woocommerce/checkout/new-form-billing.php | 79 +++ .../checkout/new-form-checkout.php | 70 ++ .../woocommerce/checkout/new-form-coupon.php | 46 ++ .../woocommerce/checkout/new-form-login.php | 75 +++ .../checkout/new-form-shipping.php | 70 ++ .../checkout/new-payment-method.php | 41 ++ .../woocommerce/checkout/new-payment.php | 66 ++ .../woocommerce/checkout/new-review-order.php | 109 ++++ .../woocommerce/checkout/new-thankyou.php | 89 +++ udesly-adapter-plugin.php | 74 +++ uninstall.php | 31 + vendor/autoload.php | 7 + vendor/composer/ClassLoader.php | 445 +++++++++++++ vendor/composer/LICENSE | 21 + vendor/composer/autoload_classmap.php | 9 + vendor/composer/autoload_namespaces.php | 9 + vendor/composer/autoload_psr4.php | 10 + vendor/composer/autoload_real.php | 52 ++ vendor/composer/autoload_static.php | 31 + vendor/composer/installed.json | 1 + 100 files changed, 9737 insertions(+) create mode 100644 LICENSE.txt create mode 100644 README.txt create mode 100644 assets/css/ajax-loading.css create mode 100644 assets/images/delete-cache.svg create mode 100644 assets/images/delete-frontend-editor.svg create mode 100644 assets/images/delete.svg create mode 100644 assets/images/webflow.svg create mode 100644 assets/js/bundle/udesly-wf-wc.bundle.min.js create mode 100644 assets/js/bundle/udesly-wf-wp.bundle.min.js create mode 100644 externals/udesly-frontend-editor/udesly-frontend-editor.css create mode 100644 externals/udesly-frontend-editor/udesly-frontend-editor.js create mode 100644 externals/udesly-query-builder/dist/css/app.d42d56f2.css create mode 100644 externals/udesly-query-builder/dist/css/chunk-vendors.5a1b1a38.css create mode 100644 externals/udesly-query-builder/dist/index.html create mode 100644 externals/udesly-query-builder/dist/js/app.5479cd4b.js create mode 100644 externals/udesly-query-builder/dist/js/app.5479cd4b.js.map create mode 100644 externals/udesly-query-builder/dist/js/chunk-vendors.1ba88238.js create mode 100644 externals/udesly-query-builder/dist/js/chunk-vendors.1ba88238.js.map create mode 100644 externals/udesly-rules/dist/css/app.4c2b8bfd.css create mode 100644 externals/udesly-rules/dist/favicon.ico create mode 100644 externals/udesly-rules/dist/index.html create mode 100644 externals/udesly-rules/dist/js/app.43f562ff.js create mode 100644 externals/udesly-rules/dist/js/app.43f562ff.js.map create mode 100644 externals/udesly-rules/dist/js/chunk-vendors.13824eae.js create mode 100644 externals/udesly-rules/dist/js/chunk-vendors.13824eae.js.map create mode 100644 externals/udesly-settings/dist/css/app.7396c83b.css create mode 100644 externals/udesly-settings/dist/index.html create mode 100644 externals/udesly-settings/dist/js/app.d2474e9f.js create mode 100644 externals/udesly-settings/dist/js/app.d2474e9f.js.map create mode 100644 externals/udesly-settings/dist/js/chunk-vendors.b831f56f.js create mode 100644 externals/udesly-settings/dist/js/chunk-vendors.b831f56f.js.map create mode 100644 externals/udesly-webflow-data/dist/css/app.14fc4588.css create mode 100644 externals/udesly-webflow-data/dist/index.html create mode 100644 externals/udesly-webflow-data/dist/js/app.84b46244.js create mode 100644 externals/udesly-webflow-data/dist/js/app.84b46244.js.map create mode 100644 externals/udesly-webflow-data/dist/js/chunk-vendors.b29bfde3.js create mode 100644 externals/udesly-webflow-data/dist/js/chunk-vendors.b29bfde3.js.map create mode 100644 includes/Assets/Libraries.php create mode 100644 includes/Assets/Scripts.php create mode 100644 includes/Assets/Styles.php create mode 100644 includes/Blog/Blog.php create mode 100644 includes/Boxes/Box.php create mode 100644 includes/CPT/CustomPostTypes.php create mode 100644 includes/Core/Activator.php create mode 100644 includes/Core/Deactivator.php create mode 100644 includes/Core/Udesly.php create mode 100644 includes/Dashboard/Menu.php create mode 100644 includes/Dashboard/Views/CustomPostTypes.php create mode 100644 includes/Dashboard/Views/Dashboard.php create mode 100644 includes/Dashboard/Views/Settings.php create mode 100644 includes/Dashboard/Views/WebflowData.php create mode 100644 includes/FrontendEditor/FrontendEditorType.php create mode 100644 includes/Query/Posts.php create mode 100644 includes/Query/PostsQueryBuilder.php create mode 100644 includes/Query/Taxonomies.php create mode 100644 includes/Query/TermsQueryBuilder.php create mode 100644 includes/Rules/Rule.php create mode 100644 includes/Search/Search.php create mode 100644 includes/Terms/Terms.php create mode 100644 includes/Theme/DataManager.php create mode 100644 includes/Theme/IntegrationData.php create mode 100644 includes/Theme/UdeslyThemeData.php create mode 100644 includes/User/User.php create mode 100644 includes/Utils/Security.php create mode 100644 includes/Utils/Test.php create mode 100644 includes/WC/WC.php create mode 100644 includes/misc/acf.php create mode 100644 includes/misc/blog.php create mode 100644 includes/misc/boxes.php create mode 100644 includes/misc/frontend-editor.php create mode 100644 includes/misc/general.php create mode 100644 includes/misc/pagination.php create mode 100644 includes/misc/posts-query.php create mode 100644 includes/misc/rules.php create mode 100644 includes/misc/social.php create mode 100644 includes/misc/strings.php create mode 100644 includes/misc/terms-query.php create mode 100644 includes/misc/terms.php create mode 100644 includes/misc/woocommerce.php create mode 100644 index.php create mode 100644 templates/woocommerce/checkout/new-form-billing.php create mode 100644 templates/woocommerce/checkout/new-form-checkout.php create mode 100644 templates/woocommerce/checkout/new-form-coupon.php create mode 100644 templates/woocommerce/checkout/new-form-login.php create mode 100644 templates/woocommerce/checkout/new-form-shipping.php create mode 100644 templates/woocommerce/checkout/new-payment-method.php create mode 100644 templates/woocommerce/checkout/new-payment.php create mode 100644 templates/woocommerce/checkout/new-review-order.php create mode 100644 templates/woocommerce/checkout/new-thankyou.php create mode 100644 udesly-adapter-plugin.php create mode 100644 uninstall.php create mode 100644 vendor/autoload.php create mode 100644 vendor/composer/ClassLoader.php create mode 100644 vendor/composer/LICENSE create mode 100644 vendor/composer/autoload_classmap.php create mode 100644 vendor/composer/autoload_namespaces.php create mode 100644 vendor/composer/autoload_psr4.php create mode 100644 vendor/composer/autoload_real.php create mode 100644 vendor/composer/autoload_static.php create mode 100644 vendor/composer/installed.json diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..ecbc059 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE 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. + + 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 +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. \ No newline at end of file diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..bb7c91d --- /dev/null +++ b/README.txt @@ -0,0 +1,151 @@ +=== Udesly Adapter WP plugin - Webflow to WordPress === +Contributors: eclipsesrl +Donate link: https://www.udesly.com/ +Tags: webflow to wordpress, editor, page builder, layout design, udesly, webflow +Requires at least: 4.6 +Tested up to: 4.9.6 +Stable tag: 2.0.0-beta0 +License: GPLv3 or later +License URI: https://www.udesly.com/terms-conditions-of-use/#udesly-wordpress-plugin +Requires PHP: 5.6.0 + +Design your website in Webflow and connect it to WordPress with tons of plugins and unlimited features, on your own hosting! + +== Description == +The first and mighty solution to match Webflow with WordPress, Udesly Adapter WP plugin is a free WordPress plugin that allows you to manage your Webflow website converted to WordPress. It takes only a few minutes to install and configure it. + +[youtube https://www.youtube.com/watch?v=o35YcH2H190] + += Getting Started = +Discover how simple and quick it is to convert your Webflow project to WordPress. + +[youtube https://www.youtube.com/watch?v=oFw78LzE-nE] + +Learn anything you need to know to add power to your Webflow projects using Wordpress. +Watch our tutorials on our [YouTube channel](https://www.youtube.com/channel/UCcuEG-IjaeHRgePmiJ0f8GA) +to find a step by step guide through the features and functions of the Udesly Adapter, the first tool to merge Webflow and WordPress into one powerful solution + += Frontend Editor = +Let your clients make changes to their pages directly on the front-end of their website, instantly + += Forms Compatibility = +After the conversion your Webflow forms will be compatible with all hosting providers + += Login Area = +Create Login/Register forms directly in Webflow and manage your users with WordPress + += Boxes = +With the Boxes feature you can add more than one WP Plugin in each page of your Webflow template + += Page Creator = +You can create new pages directly from the WordPress admin panel after conversion + += A CMS for your clients = +Give your client a user friendly CMS (WordPress) without losing your design freedom in Webflow + += Easy to use = +Only 4 simple steps to convert your Webflow template without writing a single line of code + +== Installation == + +Follow these steps in order to make the plugin work: + +1. Make sure that you have installed the Udesly Adapter App on your PC/Mac. You can download it on [www.udesly.com](https://www.udelsy.com/) +2. Upload the plugin files to the `/wp-content/plugins/udy-wf-to-wp` directory, or install the plugin directly the WordPress plugins screen. +3. Activate the plugin through the 'Plugins' screen in WordPress +4. Use the Udesly screen to configure the plugin + +== Frequently Asked Questions == + += Minimum Requirements = +* PHP version 5.6.0 or greater (PHP 7.1 or greater is recommended) +* MySQL version 5.6 or greater + += What is the Udesly Adapter ? = +The Udesly Adapter is made up of an app (PC/Mac) and a WP plugin. The first allows you to convert any Webflow templates to a WordPress theme, the latter lets you manage any content of your WP converted theme. This powerful tool is thought for designers who have no coding skills but want to style their website with pixel accuracy. Webflow gives them full control over the design, WordPress lets them manage anything with ease. The Udesly Adapter connects these two powerful tools. + += I'm not a developer. Is the Udesly Adapter for me? +Absolutely yes. It requires no coding skills. Read our [documentation section](https://docs.udesly.com) and watch our [Youtube channel](https://www.youtube.com/channel/UCcuEG-IjaeHRgePmiJ0f8GA/featured) to get started easily. + += What do I need to have the Udesly plugin working? = +You need to install the Udesly Adapter app on your PC/Mac and use it to convert your Webflow project to WordPress. You can then use the Udesly WP plugin to manage any content. + += Where can I get support or talk to other users? = +If you get stuck, you can ask for help on the [Official Udesly Facebook Group](https://www.facebook.com/groups/373995326416699/?source_id=2350128105012859) or submit a ticket to our support team (https://www.udesly.com/help/). + += Where can I find a complete documentation and video tutorials ? = +You can find everything you need to start with Udesly Adapter on our [documentation](https://docs.udesly.com) or you can learn how the Udesly Adapter works with our [Youtube channel](https://www.youtube.com/channel/UCcuEG-IjaeHRgePmiJ0f8GA/featured). + += How can I design my website in Webflow and then use it with WordPress ? = +You need to follow a few, simple steps: + - Once your Webflow website is finished, convert it to a WordPress theme with the Udesly Adapter app. + - Upload the converted theme to WordPress. + - Install the Udesly Adapter WP plugin and start unsing WordPress to manage your website. +Thats' all! + += Can I use the Udesly Adapter on multiple websites? = +Absolutely! You can use the Udesly Adapter to create more than one website. + +== Screenshots == + +1. Udesly Settings +2. Udesly Content +3. Udesly List +4. Udesly Rules +5. Udesly App page type configuration +6. Udesly App ready to convert +7. Udesly App template converted + +== Changelog == + += 1.5.0 = +* New frontend editor +* fixed remove item link for EDD mini cart + += 1.4.2 = +* Fixed frontend editor wrong srcset attributes + += 1.4.1 = +* Fixed permalink with anchor link + += 1.4.0 = +* Added Easy Digital Downloads full support +* Added Restrict Content Pro full support + += 1.3.2 = +* Fixed blog and woocommerce template switching options + += 1.3.1 = +* Bug fix + += 1.3.0 = +* Added WooCommerce full support + += 1.2.1 = +* Fixed frontend editor bug with theme assets URL + += 1.2.0 = +* Added WordPress menu +* Natively custom post types (create and manage custom post types with Udesly plugin) +* Added Advanced Custom Fields full support + += 1.1.0 = +* Added dynamic box for all post types +* Dynamic Slider (manage Webflow slider images directly from WordPress) +* Added option to use parent category template for all sub-categories +* Added possibility to customize the Welcome e-mail in WordPress +* Added notification warnings for contents, rules and lists used in Webflow and not created in WordPress +* Added fully customizable social share links + += 1.0.2 = +* Fixed frontend editor elements layout + += 1.0.1 = +* Fixed rule evaluation + += 1.0.0 = +* First release + +== Upgrade Notice == + +*first release \ No newline at end of file diff --git a/assets/css/ajax-loading.css b/assets/css/ajax-loading.css new file mode 100644 index 0000000..8fc2083 --- /dev/null +++ b/assets/css/ajax-loading.css @@ -0,0 +1,32 @@ +.w-dyn-items.loading .w-dyn-item { + visibility: hidden; +} + +[udy-el="wc-variation-add-to-cart"] select { + display: none; +} + +.udy-wc-notices-wrapper a { + display: inline-block; +} + +.udy-wc-notices-wrapper { + opacity: 0; + transition: opacity 1s linear; +} + +.udy-wc-notices-wrapper.is-ajax { + opacity: 1; + transition: opacity 1s linear; +} + +[udy-el="wc-cart"].empty form > *{ + display: none; +} +[udy-el="wc-cart"].empty form .w-dyn-list{ + display: inherit; +} + +.woocommerce-MyAccount-content p a, .woocommerce p a { + display: inline; +} \ No newline at end of file diff --git a/assets/images/delete-cache.svg b/assets/images/delete-cache.svg new file mode 100644 index 0000000..bceee5a --- /dev/null +++ b/assets/images/delete-cache.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/delete-frontend-editor.svg b/assets/images/delete-frontend-editor.svg new file mode 100644 index 0000000..08be76d --- /dev/null +++ b/assets/images/delete-frontend-editor.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/delete.svg b/assets/images/delete.svg new file mode 100644 index 0000000..0df7477 --- /dev/null +++ b/assets/images/delete.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/webflow.svg b/assets/images/webflow.svg new file mode 100644 index 0000000..456c8f8 --- /dev/null +++ b/assets/images/webflow.svg @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/assets/js/bundle/udesly-wf-wc.bundle.min.js b/assets/js/bundle/udesly-wf-wc.bundle.min.js new file mode 100644 index 0000000..3c72985 --- /dev/null +++ b/assets/js/bundle/udesly-wf-wc.bundle.min.js @@ -0,0 +1 @@ +!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";function t(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?document.querySelector('[udy-el="'.concat(t,'"]')):document.querySelectorAll('[udy-el="'.concat(t,'"]'))}var e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function r(t,e){for(var r=0;r'.concat(this.priceCurrencySymbol).concat(t,"")}}]),r}(),l=function(){function t(r){var n=this;e(this,t),this.el=r,this.selects={},this.el.querySelectorAll("select").forEach(function(t){var e=t.getAttribute("name");n.selects[e]=t}),jQuery(this.el).on("check_variations",function(){return n.alignRadios()}),this.radios=this.el.querySelectorAll('input[type="radio"]'),this.labels=this.el.querySelectorAll('[udy-el="wc-variations-options"] label'),this.variationsData=JSON.parse(this.el.getAttribute("data-product_variations")),this.listen(),setTimeout(function(){n.alignRadios()},500)}return n(t,[{key:"listen",value:function(){var t=this;this.el.addEventListener("change",function(e){if(e.target.matches('input[type="radio"]')){var r=e.target.getAttribute("name");t.selects[r].value=e.target.value,t.selects[r].dispatchEvent(new Event("change",{bubbles:!0})),t.alignRadios()}})}},{key:"alignRadios",value:function(){var t=this;this.radios.forEach(function(t){t.disabled=!0}),this.labels.forEach(function(t){t.classList.remove("selected"),t.classList.add("disabled")});var e=function(e){Array.from(t.selects[e].options).forEach(function(r){if(r.classList.contains("enabled")&&r.value){t.el.querySelector('input[type="radio"][name="'.concat(e,'"][value="').concat(r.value,'"]')).disabled=!1;var n=t.el.querySelector('label[for="'.concat(r.value,'"]'));n&&n.classList.remove("disabled")}});var r=t.el.querySelector('label[for="'.concat(t.selects[e].value,'"]'));r&&r.classList.add("selected")};for(var r in this.selects)e(r);var n=this.el.querySelector('input[name="variation_id"]').value,o=this.variationsData.filter(function(t){return t.variation_id==n})[0];o||(o=this.variationsData[0]);var i,a,c=o,u=c.display_price,l=c.display_regular_price,d=c.image_id,h=c.image;i=u,a=l,document.body.dispatchEvent(new CustomEvent("change-price",{detail:{price:i,regularPrice:a}})),s(d,h.url)}}]),t}(),d=function(){function t(r){var n=this;e(this,t),this.slider=r,function(t){document.body.addEventListener("change-wc-current-image",t)}(function(t){return n.handleImageChange(t.detail)}),this.images=this.slider.querySelectorAll("[data-wc-slider-image-id]"),this.dots=this.slider.querySelectorAll(".w-slider-dot");var o=this.slider.querySelector(".w-slider-nav");new MutationObserver(function(t,e){var r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done);r=!0)if("class"===a.value.attributeName){var u=h(n.slider.querySelector(".w-slider-dot.w-active"));-1!==u&&n.images[u]&&s(n.images[u].getAttribute("data-wc-slider-image-id"))}}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}}).observe(o,{attributes:!0,childList:!1,subtree:!0})}return n(t,[{key:"handleImageChange",value:function(t){var e=t.id;t.url;if(e){var r=h(this.slider.querySelector('[data-wc-slider-image-id="'.concat(e,'"]')));-1!==r&&this.dots[r]&&this.dots[r].dispatchEvent(new Event("tap",{bubbles:!0}))}}}]),t}();function h(t){if(!t)return-1;for(var e=0;t=t.previousElementSibling;)e++;return e}function f(t){t.addEventListener("change",function(t){var e=t.target.closest("form");window.location.href=window.location.origin+window.location.pathname+"?"+new URLSearchParams(Array.from(new FormData(e))).toString()})}function p(t,e){return t(e={exports:{}},e.exports),e.exports}var y=p(function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new A(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===f){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var s=u(t,e,r);if("normal"===s.type){if(n=r.done?f:d,s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=f,r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",d="suspendedYield",h="executing",f="completed",p={};function y(){}function m(){}function v(){}var g={};g[i]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==r&&n.call(b,i)&&(g=b);var E=v.prototype=y.prototype=Object.create(g);function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(t){var e;this._invoke=function(r,o){function i(){return new Promise(function(e,i){!function e(r,o,i,a){var c=u(t[r],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(l).then(function(t){s.value=t,i(s)},function(t){return e("throw",t,i,a)})}a(c.arg)}(r,o,e,i)})}return e=e?e.then(i,i):i()}}function k(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=u(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});function m(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}var v=function(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){m(i,n,o,a,c,"next",t)}function c(t){m(i,n,o,a,c,"throw",t)}a(void 0)})}},g=p(function(t){function e(t){return(e="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)}function r(n){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=r=function(t){return e(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},r(n)}t.exports=r});function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,r=t.nonce,n=t.nonceField,o=t.data,i=t.method,a=t.url,c=t.credentials;if(!e)throw new TypeError("Cannot make ajax call without action");if(o&&"object"!==g(o))throw new TypeError("Data to send must be an object");if(!a&&!window.udeslyAjax.ajaxUrl)throw new TypeError("Cannot make ajax call without url");var s=new FormData;if(s.append("action",e),s.append(n||"security",r||window.udeslyAjax.nonce),o)for(var u in o)s.append(u,o[u]);return fetch(a||window.udeslyAjax.ajaxUrl,{method:i||"POST",body:s,credentials:c||"same-origin"})}var b=function(){function t(r){e(this,t),this.queryTemplateName=r.getAttribute("data-wc-query-template"),this.queryName=r.getAttribute("data-wc-query-name"),this.itemsList=r.querySelector(".w-dyn-items"),this.maxPages=parseInt(this.itemsList.getAttribute("data-max-pages"),10),this.prevButton=r.querySelector('[udy-el="previous-posts"]'),this.nextButton=r.querySelector('[udy-el="next-posts"]'),this.countPage=r.querySelector(".w-page-count"),this.init()}return n(t,[{key:"init",value:function(){var t=this;this.processing=!1,this.currentPage=1,this.maxPages>1?(this.nextButton.addEventListener("click",function(e){return t.getNextPage()}),this.prevButton.addEventListener("click",function(e){return t.getPreviousPage()}),this.nextButton.removeAttribute("style")):this.nextButton.setAttribute("style","display: none;"),this.cache={},this.cache[1]=this.itemsList.innerHTML}},{key:"getNextPage",value:function(){if(!this.processing){var t=this.currentPage+1;this.getPage(t)}}},{key:"getPage",value:function(){var t=v(y.mark(function t(e){var r;return y.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.processing=!0,this.itemsList.classList.add("loading"),!(e<=this.maxPages)){t.next=14;break}if(!this.cache[e]){t.next=8;break}this.itemsList.innerHTML=this.cache[e],this.currentPage=e,t.next=12;break;case 8:return t.next=10,this.queryPosts(e);case 10:""!==(r=t.sent)&&(this.cache[e]=r,this.itemsList.innerHTML=r,this.currentPage=e,this.processing=!1);case 12:t.next=15;break;case 14:this.nextButton.setAttribute("style","display: none");case 15:this.itemsList.classList.remove("loading"),this.processing=!1;case 17:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getPreviousPage",value:function(){var t=v(y.mark(function t(){var e;return y.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.processing){t.next=2;break}return t.abrupt("return");case 2:e=this.currentPage-1,this.getPage(e);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"queryPosts",value:function(){var t=v(y.mark(function t(e){var r,n;return y.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w({action:"udesly_get_products",data:{page:e,name:this.queryName,template:this.queryTemplateName}});case 2:if(!(r=t.sent).ok){t.next=10;break}return t.next=6,r.json();case 6:return n=t.sent,t.abrupt("return",n.data.posts);case 10:return this.processing=!1,this.prevButton.remove(),this.nextButton.remove(),t.abrupt("return","");case 14:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"currentPage",get:function(){return this._currentPage||1},set:function(t){t<=this.maxPages&&(this._currentPage=t),1===this.currentPage?(this.prevButton.setAttribute("style","display: none"),this.nextButton.removeAttribute("style")):this.currentPage===this.maxPages?(this.prevButton.removeAttribute("style"),this.nextButton.setAttribute("style","display: none")):(this.nextButton.removeAttribute("style"),this.prevButton.removeAttribute("style")),this.countPage&&(this.countPage.textContent="".concat(this.currentPage," / ").concat(this.maxPages))}}]),t}();function E(t){return document.querySelector('[data-node-type="'.concat(t,'"]'))}var x=function(){function r(){e(this,r),this.wrapper=E("commerce-cart-wrapper"),this.wrapper&&this.init()}return n(r,[{key:"init",value:function(){var t,e=this;this.wrapper.addEventListener("wf-change-cart-state",function(t){return e.handleChangeCartState(t)}),this.openOnProductAdded=this.wrapper.hasAttribute("data-open-product"),this.openOnHover=this.wrapper.hasAttribute("data-open-on-hover"),this.closeLink=E("commerce-cart-close-link"),this.openLink=E("commerce-cart-open-link"),this.cartContainer=E("commerce-cart-container"),this.cartContainerWrapper=E("commerce-cart-container-wrapper"),this.form=E("commerce-cart-form"),this.closeLink&&(this.closeLink.addEventListener("click",function(){return e.toggleCart()}),this.closeLink.addEventListener("tap",function(){return e.toggleCart()})),this.openLink&&(this.openOnHover?(this.openLink.addEventListener("mouseenter",function(){return e.openCart()}),this.cartContainer&&this.cartContainer.addEventListener("mouseleave",function(){return e.closeCart()})):(this.openLink.addEventListener("click",function(){return e.toggleCart()}),this.openLink.addEventListener("tap",function(){return e.toggleCart()}))),this.cartContainerWrapper&&this.cartContainerWrapper.addEventListener("click",function(t){t.target.contains(e.cartContainer)&&e.closeCart()}),this.openOnProductAdded&&(t=function(){return e.toggleCart()},document.body.addEventListener("product-added-to-cart",t)),function(t){document.body.addEventListener("cart-should-be-updated",t)}(function(){return e.updateCart()}),this.cartContainer.addEventListener("click",function(t){return e.handleRemove(t)})}},{key:"updateCart",value:function(){var e=v(y.mark(function e(){var r,n,o,i;return y.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=document.querySelector("#udesly-wc-mini-cart-count"),n=document.querySelector("#udesly-wc-mini-cart-subtotal"),o=document.querySelector("#udesly-wc-mini-cart-items"),r&&t("wc-cart-count").forEach(function(t){return t.textContent=r.textContent}),n&&t("wc-cart-total").forEach(function(t){return t.innerHTML=n.innerHTML}),o&&(i=JSON.parse(o.textContent),this.updateItemsTemplate(i));case 6:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"handleRemove",value:function(){var t=v(y.mark(function t(e){var r,n,a;return y.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.target.matches('[udy-el="wc-remove"]')){t.next=19;break}if(e.preventDefault(),(r=e.target.closest("li"))&&r.classList.add("removing"),!(n=e.target.getAttribute("data-cart-item-key"))){t.next=19;break}return t.next=8,w({action:"udesly_wc_remove_from_cart",data:{key:n}});case 8:if(!(a=t.sent).ok){t.next=13;break}return t.delegateYield(y.mark(function t(){var e,r,n;return y.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.json();case 2:for(n in e=t.sent,r=function(t){document.querySelectorAll(t).forEach(function(r){return r.outerHTML=e.fragments[t]})},e.fragments)r(n);document.body.dispatchEvent(new CustomEvent("product-removed-from-cart")),o(),c();case 8:case"end":return t.stop()}},t)})(),"t0",11);case 11:t.next=19;break;case 13:return t.next=15,a.json();case 15:i(t.sent.message||"Failed to remove the product"),o(),r&&r.classList.remove("removing");case 19:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateItemsTemplate",value:function(e){if(window.udeslyMiniCartTemplate){t("wc-cart-actions").forEach(function(t){return t.classList.remove("udesly-display-none")}),0===e.length?(this.form.style.display="none",t("wc-no-items-in-cart").forEach(function(t){t.style.display=""})):(this.form.style.display="",t("wc-no-items-in-cart").forEach(function(t){t.style.display="none"}));var r="",n=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done);n=!0){var s=a.value;r+=window.udeslyMiniCartTemplate(s),0}}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}t("wc-items-list").forEach(function(t){return t.innerHTML=r})}}},{key:"toggleCart",value:function(){this.wrapper.dispatchEvent(new CustomEvent("wf-change-cart-state",{bubbles:1}))}},{key:"openCart",value:function(){this.wrapper.dispatchEvent(new CustomEvent("wf-change-cart-state",{bubbles:1,detail:{open:!0}}))}},{key:"closeCart",value:function(){this.wrapper.dispatchEvent(new CustomEvent("wf-change-cart-state",{bubbles:1,detail:{open:!1}}))}},{key:"handleChangeCartState",value:function(t){if(t.currentTarget instanceof Element&&t instanceof CustomEvent){var e=t.currentTarget,r=t.detail,n=e.hasAttribute("data-cart-open"),o=r&&null!=r.open?r.open:!n,i=E("commerce-cart-container-wrapper");if(i){var a=E("commerce-cart-container");if(a){var c=i.parentElement;if(c){var s=c.getAttribute("data-wf-cart-type"),u=c.getAttribute("data-wf-cart-duration")||"300ms",l=c.getAttribute("data-wf-cart-easing")||"ease-out-quad",d="opacity "+u+" ease 0ms",h="0ms"!==u,f=void 0,p=void 0;switch(s){case"modal":f={scale:.95},p={scale:1};break;case"leftSidebar":f={x:-30},p={x:0};break;case"rightSidebar":f={x:30},p={x:0};break;case"leftDropdown":case"rightDropdown":f={y:-10},p={y:0}}o?(e.setAttribute("data-cart-open",""),i.style.removeProperty("display"),h&&!n&&(window.Webflow.tram(i).add(d).set({opacity:0}).start({opacity:1}),window.Webflow.tram(a).add("transform "+u+" "+l+" 0ms").set(f).start(p))):(e.removeAttribute("data-cart-open"),h?(window.Webflow.tram(i).add(d).start({opacity:0}).then(function(){i.style.display="none",window.Webflow.tram(a).stop()}),window.Webflow.tram(a).add("transform "+u+" "+l+" 50ms").start(f)):i.style.display="none")}}}}}}]),r}(),L=function(){function t(r){var n=this;e(this,t),this.products=r,this.products.addEventListener("submit",function(t){return n.handleSubmit(t)})}return n(t,[{key:"handleSubmit",value:function(){var t=v(y.mark(function t(e){var r,n,i;return y.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.target).matches('[data-product-type="product_type_simple"][data-product-stock="true"]')){t.next=8;break}return e.preventDefault(),n=r.querySelector('[type="submit"]'),i={action:"udesly_wc_add_to_cart",product_id:r.querySelector("[data-product_id]").getAttribute("data-product_id"),quantity:r.querySelector('input[type="number"]')?r.querySelector('input[type="number"]').value:1,security:window.udeslyAjax.nonce},jQuery(document.body).trigger("adding_to_cart",[i]),jQuery.ajax({type:"post",url:window.udeslyAjax.ajaxUrl,data:i,beforeSend:function(t){n.classList.remove("added"),n.classList.add("loading")},complete:function(t){n.classList.add("added"),n.classList.remove("loading"),setTimeout(function(){n.classList.remove("added")},3e3)},success:function(t){t.error&t.product_url?window.location=t.product_url:"yes"!==window.wc_add_to_cart_params.cart_redirect_after_add?(jQuery(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash]),document.body.dispatchEvent(new CustomEvent("product-added-to-cart")),o(),c()):window.location=wc_add_to_cart_params.cart_url}}),t.abrupt("return",!1);case 8:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()}]),t}(),k=function(){function t(){var r,n=this;e(this,t),r=function(t){return n.handleNotices()},document.body.addEventListener("retrieve-wc-notices",r),function(t){document.body.addEventListener("remove-wc-notices",t)}(function(t){return n.removeNotices()}),a()}return n(t,[{key:"handleNotices",value:function(){var t=v(y.mark(function t(){var e,r,n,o;return y.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w({action:"udesly_wc_get_notices"});case 2:if(!(e=t.sent).ok){t.next=9;break}return t.next=6,e.json();case 6:r=t.sent,(n=r.data.notices)&&""!==n&&(o=document.createElement("div"),document.body.append(o),o.outerHTML=n,a());case 9:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}()},{key:"removeNotices",value:function(){var t=document.querySelectorAll(".udy-wc-notices-wrapper");t.length&&(setTimeout(function(){t.forEach(function(t){return t.style.opacity="1"})},200),setTimeout(function(){t.forEach(function(t){t.style.opacity="0",setTimeout(function(){return t.remove()},1e3)})},3500))}}]),t}();document.addEventListener("DOMContentLoaded",function(){if(document.body.classList.contains("woocommerce")){new u;var e=t("wc-variable-add-to-cart");e.length&&e.forEach(function(t){new l(t)});var r=t("wc-product-images-slider");r.length&&r.forEach(function(t){new d(t)})}var n=t("wc-orderby");n.length&&n.forEach(function(t){new f(t.querySelector("select"))});var o=document.querySelectorAll("[data-wc-query-template][data-wc-query-name]");o.length&&o.forEach(function(t){new b(t)});var i=t("wc-mini-cart");i.length&&i.forEach(function(t){new x(t)});var a=t("wc-products");a.length&&a.forEach(function(t){new L(t)}),document.querySelectorAll("[data-form-classes]").forEach(function(t){var e=JSON.parse(t.getAttribute("data-form-classes"));e.f&&t.querySelectorAll("form").forEach(function(t){t.setAttribute("class",e.f)}),e.l&&t.querySelectorAll("label").forEach(function(t){t.setAttribute("class",e.l)}),e.i&&t.querySelectorAll('input:not([type="checkbox"])').forEach(function(t){t.setAttribute("class",e.i)}),e.b&&t.querySelectorAll('[type="submit"], a.woocommerce-Button').forEach(function(t){t.setAttribute("class",e.b)})}),t("wc-my-account").forEach(function(t){t.childNodes.forEach(function(t){""===t.textContent&&t.remove()})}),new k},!1)}); diff --git a/assets/js/bundle/udesly-wf-wp.bundle.min.js b/assets/js/bundle/udesly-wf-wp.bundle.min.js new file mode 100644 index 0000000..88f2b70 --- /dev/null +++ b/assets/js/bundle/udesly-wf-wp.bundle.min.js @@ -0,0 +1 @@ +!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t(function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,o=Object.create(i.prototype),a=new _(n||[]);return o._invoke=function(t,e,r){var n=l;return function(i,o){if(n===f)throw new Error("Generator is already running");if(n===m){if("throw"===i)throw o;return E()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=q(a,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var u=c(t,e,r);if("normal"===u.type){if(n=r.done?m:h,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=m,r.method="throw",r.arg=u.arg)}}}(t,r,a),o}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l="suspendedStart",h="suspendedYield",f="executing",m="completed",y={};function p(){}function d(){}function v(){}var g={};g[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==r&&n.call(b,o)&&(g=b);var x=v.prototype=p.prototype=Object.create(g);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function S(t){var e;this._invoke=function(r,i){function o(){return new Promise(function(e,o){!function e(r,i,o,a){var s=c(t[r],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(l).then(function(t){u.value=t,o(u)},function(t){return e("throw",t,o,a)})}a(s.arg)}(r,i,e,o)})}return e=e?e.then(o,o):o()}}function q(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,q(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var i=c(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function P(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}});function r(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}var n=function(t){return function(){var e=this,n=arguments;return new Promise(function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)})}};var i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function o(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,r=t.nonce,n=t.nonceField,i=t.data,o=t.method,a=t.url,u=t.credentials;if(!e)throw new TypeError("Cannot make ajax call without action");if(i&&"object"!==s(i))throw new TypeError("Data to send must be an object");if(!a&&!window.udeslyAjax.ajaxUrl)throw new TypeError("Cannot make ajax call without url");var c=new FormData;if(c.append("action",e),c.append(n||"security",r||window.udeslyAjax.nonce),i)for(var l in i)c.append(l,i[l]);return fetch(a||window.udeslyAjax.ajaxUrl,{method:o||"POST",body:c,credentials:u||"same-origin"})}var c=function(){function t(e){var r=this;i(this,t),this.form=e,this.formBlock=e.closest(".w-form"),this.formDone=this.formBlock.querySelector(".w-form-done"),this.formFail=this.formBlock.querySelector(".w-form-fail"),this.errorMessage=this.formFail.querySelector('[udy-el="error-message"]'),this.submitButton=e.querySelector('input[type="submit"]'),this.defaultValue=this.submitButton.value,this.loadingValue=this.submitButton.getAttribute("data-wait")||"Wait...";var n=this.formBlock.querySelector('input[name="redirect_to"]');n&&(this.redirect=n.value),e.addEventListener("submit",function(t){r.handleSubmit(t)})}return a(t,[{key:"handleSubmit",value:function(){var t=n(e.mark(function t(r){var n,i,o=this;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r.preventDefault(),this.formFail.style.display="none",this.submitButton.value=this.loadingValue,t.next=5,u({action:"udesly_wp_login",data:{username:this.form.querySelector('[name="log"]').value,password:this.form.querySelector('[name="pwd"]').value,rememberme:!!this.form.querySelector('checkbox[name="rememberme"]')&&this.form.querySelector('checkbox[name="rememberme"]').checked}});case 5:if(!(n=t.sent).ok){t.next=12;break}this.form.style.display="none",this.formDone.style.display="inherit",this.redirect&&setTimeout(function(){window.location=o.redirect},500),t.next=24;break;case 12:return t.prev=12,t.next=15,n.json();case 15:(i=t.sent).data.message&&this.errorMessage&&(this.errorMessage.innerHTML=i.data.message),t.next=23;break;case 19:t.prev=19,t.t0=t.catch(12),console.error(t.t0),this.formFail.style.display="";case 23:this.formFail.style.display="inherit";case 24:this.submitButton.value=this.defaultValue;case 25:case"end":return t.stop()}},t,this,[[12,19]])}));return function(e){return t.apply(this,arguments)}}()}]),t}(),l=function(){function t(e){var r=this;i(this,t),this.form=e,this.formBlock=e.closest(".w-form"),this.formDone=this.formBlock.querySelector(".w-form-done"),this.formFail=this.formBlock.querySelector(".w-form-fail"),this.errorMessage=this.formFail.querySelector('[udy-el="error-message"]'),this.submitButton=e.querySelector('input[type="submit"]'),this.defaultValue=this.submitButton.value,this.loadingValue=this.submitButton.getAttribute("data-wait")||"Wait...";var n=this.formBlock.querySelector('input[name="redirect_to"]');n&&(this.redirect=n.value),e.addEventListener("submit",function(t){r.handleSubmit(t)})}return a(t,[{key:"handleSubmit",value:function(){var t=n(e.mark(function t(r){var n,i,o=this;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r.preventDefault(),this.formFail.style.display="none",this.submitButton.value=this.loadingValue,t.next=5,u({action:"udesly_wp_register",data:{username:this.form.querySelector('[name="username"]')?this.form.querySelector('[name="username"]').value:"",password:this.form.querySelector('[name="password"]').value,password_repeat:this.form.querySelector('[name="password_repeat"]').value,mail:this.form.querySelector('[name="email"]').value,first_name:this.form.querySelector('[name="first_name"]')?this.form.querySelector('[name="first_name"]').value:"",last_name:this.form.querySelector('[name="last_name"]')?this.form.querySelector('[name="last_name"]').value:""}});case 5:if(!(n=t.sent).ok){t.next=12;break}this.form.style.display="none",this.formDone.style.display="inherit",this.redirect&&setTimeout(function(){window.location=o.redirect},500),t.next=23;break;case 12:return t.prev=12,t.next=15,n.json();case 15:(i=t.sent).data.message&&this.errorMessage&&(this.errorMessage.innerHTML=i.data.message),t.next=22;break;case 19:t.prev=19,t.t0=t.catch(12),this.formFail.style.display="";case 22:this.formFail.style.display="inherit";case 23:this.submitButton.value=this.defaultValue;case 24:case"end":return t.stop()}},t,this,[[12,19]])}));return function(e){return t.apply(this,arguments)}}()}]),t}(),h=function(){function t(e){var r=this;i(this,t),this.form=e,this.formBlock=e.closest(".w-form"),this.formDone=this.formBlock.querySelector(".w-form-done"),this.formFail=this.formBlock.querySelector(".w-form-fail"),this.errorMessage=this.formFail.querySelector('[udy-el="error-message"]'),this.submitButton=e.querySelector('input[type="submit"]'),this.defaultValue=this.submitButton.value,this.loadingValue=this.submitButton.getAttribute("data-wait")||"Wait...";var n=this.formBlock.querySelector('input[name="redirect_to"]');n&&(this.redirect=n.value),e.addEventListener("submit",function(t){r.handleSubmit(t)})}return a(t,[{key:"handleSubmit",value:function(){var t=n(e.mark(function t(r){var n,i,o=this;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r.preventDefault(),this.formFail.style.display="none",this.submitButton.value=this.loadingValue,t.next=5,u({action:"udesly_wp_lost_password",data:{user_login:this.form.querySelector('[name="user_login"]').value,page_slug:document.body.getAttribute("udesly-page-name")}});case 5:if(!(n=t.sent).ok){t.next=12;break}this.form.style.display="none",this.formDone.style.display="inherit",this.redirect&&setTimeout(function(){window.location=o.redirect},500),t.next=24;break;case 12:return t.prev=12,t.next=15,n.json();case 15:(i=t.sent).data.message&&this.errorMessage&&(this.errorMessage.innerHTML=i.data.message),t.next=23;break;case 19:t.prev=19,t.t0=t.catch(12),console.error(t.t0),this.formFail.style.display="";case 23:this.formFail.style.display="inherit";case 24:this.submitButton.value=this.defaultValue;case 25:case"end":return t.stop()}},t,this,[[12,19]])}));return function(e){return t.apply(this,arguments)}}()}]),t}(),f=function(){function t(e){var r=this;i(this,t),this.form=e,this.formBlock=e.closest(".w-form"),this.formDone=this.formBlock.querySelector(".w-form-done"),this.formFail=this.formBlock.querySelector(".w-form-fail"),this.errorMessage=this.formFail.querySelector('[udy-el="error-message"]'),this.submitButton=e.querySelector('input[type="submit"]'),this.defaultValue=this.submitButton.value,this.loadingValue=this.submitButton.getAttribute("data-wait")||"Wait...";var n=this.formBlock.querySelector('input[name="redirect_to"]');n&&(this.redirect=n.value),e.addEventListener("submit",function(t){r.handleSubmit(t)})}return a(t,[{key:"handleSubmit",value:function(){var t=n(e.mark(function t(r){var n,i,o=this;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r.preventDefault(),this.formFail.style.display="none",this.submitButton.value=this.loadingValue,t.next=5,u({action:"udesly_wp_reset_password",data:{user_key:this.form.querySelector('[name="user_key"]').value,user_login:this.form.querySelector('[name="user_login"]').value,password:this.form.querySelector('[name="password"]').value,password_repeat:this.form.querySelector('[name="password_repeat"]').value}});case 5:if(!(n=t.sent).ok){t.next=12;break}this.form.style.display="none",this.formDone.style.display="inherit",this.redirect&&setTimeout(function(){window.location=o.redirect},500),t.next=24;break;case 12:return t.prev=12,t.next=15,n.json();case 15:(i=t.sent).data.message&&this.errorMessage&&(this.errorMessage.innerHTML=i.data.message),t.next=23;break;case 19:t.prev=19,t.t0=t.catch(12),console.error(t.t0),this.formFail.style.display="";case 23:this.formFail.style.display="inherit";case 24:this.submitButton.value=this.defaultValue;case 25:case"end":return t.stop()}},t,this,[[12,19]])}));return function(e){return t.apply(this,arguments)}}()}]),t}();var m=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};var y=function(t){for(var e=1;e1?(this.nextButton.addEventListener("click",function(e){return t.getNextPage()}),this.prevButton.addEventListener("click",function(e){return t.getPreviousPage()}),this.nextButton.removeAttribute("style")):this.nextButton.setAttribute("style","display: none;"),this.cache={},this.cache[1]=this.itemsList.innerHTML}},{key:"getNextPage",value:function(){if(!this.processing){var t=this.currentPage+1;this.getPage(t)}}},{key:"getPage",value:function(){var t=n(e.mark(function t(r){var n;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.processing=!0,this.itemsList.classList.add("loading"),!(r<=this.maxPages)){t.next=14;break}if(!this.cache[r]){t.next=8;break}this.itemsList.innerHTML=this.cache[r],this.currentPage=r,t.next=12;break;case 8:return t.next=10,this.queryPosts(r);case 10:""!==(n=t.sent)&&(this.cache[r]=n,this.itemsList.innerHTML=n,this.currentPage=r,this.processing=!1);case 12:t.next=15;break;case 14:this.nextButton.setAttribute("style","display: none");case 15:this.itemsList.classList.remove("loading"),this.processing=!1;case 17:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getPreviousPage",value:function(){var t=n(e.mark(function t(){var r;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.processing){t.next=2;break}return t.abrupt("return");case 2:r=this.currentPage-1,this.getPage(r);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"queryPosts",value:function(){var t=n(e.mark(function t(r){var n,i;return e.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u({action:"udesly_get_posts",data:{page:r,name:this.queryName,template:this.queryTemplateName}});case 2:if(!(n=t.sent).ok){t.next=10;break}return t.next=6,n.json();case 6:return i=t.sent,t.abrupt("return",i.data.posts);case 10:return this.processing=!1,this.prevButton.remove(),this.nextButton.remove(),t.abrupt("return","");case 14:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"currentPage",get:function(){return this._currentPage||1},set:function(t){t<=this.maxPages&&(this._currentPage=t),1===this.currentPage?(this.prevButton.setAttribute("style","display: none"),this.nextButton.removeAttribute("style")):this.currentPage===this.maxPages?(this.prevButton.removeAttribute("style"),this.nextButton.setAttribute("style","display: none")):(this.nextButton.removeAttribute("style"),this.prevButton.removeAttribute("style")),this.countPage&&(this.countPage.textContent="".concat(this.currentPage," / ").concat(this.maxPages))}}]),t}();document.addEventListener("DOMContentLoaded",function(){var t=document.querySelectorAll("[udesly-wp-ajax='login']");t.length&&t.forEach(function(t){new c(t)});var e=document.querySelectorAll("[udesly-wp-ajax='register']");e.length&&e.forEach(function(t){new l(t)}),document.querySelectorAll("[udesly-wp-ajax='lost-password']").length&&e.forEach(function(t){new h(t)}),document.querySelectorAll("[udesly-wp-ajax='reset-password']").length&&e.forEach(function(t){new f(t)});var r=document.querySelectorAll("[udesly-wp-ajax='form']");r.length&&r.forEach(function(t){new d(t)});var n=document.querySelectorAll("[data-query-template][data-query-name]");n.length&&n.forEach(function(t){new v(t)})},!1)}); diff --git a/externals/udesly-frontend-editor/udesly-frontend-editor.css b/externals/udesly-frontend-editor/udesly-frontend-editor.css new file mode 100644 index 0000000..b36800f --- /dev/null +++ b/externals/udesly-frontend-editor/udesly-frontend-editor.css @@ -0,0 +1,2 @@ +.screen-reader-text{display:none}[contenteditable=true]:focus{outline:1px solid #2e52ff;outline-offset:5px}body[data-udy-fe-enabled=iframe_] iframe:before,body[data-udy-fe-enabled=link_] a:after{content:"";position:absolute;top:-10px;bottom:-10px;left:-10px;right:-10px}body[data-udy-fe-enabled=link_] a{position:relative}body[data-udy-fe-enabled=iframe_] iframe[data-udy-fe]{position:relative;pointer-events:none;cursor:pointer}body[data-udy-fe-enabled=iframe_] .udesly-hover-indicator{pointer-events:none}.button.udesly-video-button,button.udesly-iframe-button{display:none}body[data-udy-fe-enabled=iframe_] button.udesly-iframe-button,body[data-udy-fe-enabled=video_] button.udesly-video-button{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:50px;height:50px;border-radius:100%;background-color:#2e52ff;color:#fff;display:block} +/*# sourceMappingURL=main.e874e2e7.chunk.css.map */ \ No newline at end of file diff --git a/externals/udesly-frontend-editor/udesly-frontend-editor.js b/externals/udesly-frontend-editor/udesly-frontend-editor.js new file mode 100644 index 0000000..4589028 --- /dev/null +++ b/externals/udesly-frontend-editor/udesly-frontend-editor.js @@ -0,0 +1,6 @@ +!function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],c=0,s=[];c0}),currentItem:"",loading:!1,error:"",message:null,enableFrontendEditor:function(e,t){e.enabled=t!==e.enabled&&t,document.body.setAttribute("data-udy-fe-enabled",e.enabled)},setItems:function(e,t){e.items=t,window.udesly_fe.items=e.items},changeTextValues:function(e,t){e.items=Object(d.a)({},e.items,t),window.udesly_fe.items=e.items,e.modifiedItems=Object(d.a)({},e.modifiedItems,t),e.message={color:"white",text:"".concat(Object.keys(e.modifiedItems).length," items modified")}},setPageName:function(e,t){e.pageName=t},changeIframeValue:function(e,t){e.currentItem.startsWith("iframe_")&&t&&(e.modifiedItems[e.currentItem]=t,e.message={color:"white",text:"".concat(Object.keys(e.modifiedItems).length," items modified")})},changeVideoValue:function(e,t){e.currentItem.startsWith("video_")&&t&&(e.modifiedItems[e.currentItem]=t,e.message={color:"white",text:"".concat(Object.keys(e.modifiedItems).length," items modified")})},changeImageValue:function(e,t){"number"===typeof t&&e.currentItem.startsWith("image_")&&t&&(e.modifiedItems[e.currentItem]=t,e.message={color:"white",text:"".concat(Object.keys(e.modifiedItems).length," items modified")})},changeBackgroundImageValue:function(e,t){"number"===typeof t&&e.currentItem.startsWith("bg_image_")&&t&&(e.modifiedItems[e.currentItem]=t,e.message={color:"white",text:"".concat(Object.keys(e.modifiedItems).length," items modified")})},changeTextValue:function(e,t){e.currentItem.startsWith("text_")&&t&&(e.modifiedItems[e.currentItem]=t,e.message={color:"white",text:"".concat(Object.keys(e.modifiedItems).length," items modified")})},changeLinkValue:function(e,t){e.currentItem.startsWith("link_")&&t&&(e.modifiedItems[e.currentItem]=t,e.message={color:"white",text:"".concat(Object.keys(e.modifiedItems).length," items modified")})},setCurrentItem:function(e,t){e.currentItem=t},saveItems:Object(s.d)(function(){var e=Object(l.a)(u.a.mark(function e(t,n,r){var a,i,o;return u.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.getState,i=a(),t.setLoading(!0),t.setCurrentItem(""),t.setMessage({color:"white",text:"Please wait..."}),e.next=7,f(i.modifiedItems,i.pageName);case 7:(o=e.sent).error?(t.errorSaving(o.error),t.setMessage({color:"#d34436",text:"Error saving"})):(t.savingSuccess(),t.setMessage({color:"#00cb5d",text:"Saved successfully"}),setTimeout(function(){t.setMessage(null)},3e3));case 9:case"end":return e.stop()}},e)}));return function(t,n,r){return e.apply(this,arguments)}}()),errorSaving:function(e,t){e.loading=!1,e.error=t},setLoading:function(e,t){e.loading=t},savingSuccess:function(e,t){e.loading=!1,e.modifiedItems={}},setMessage:function(e,t){e.message=t}}),b=function(e){return a.a.createElement(s.a,{store:g},e.children)},v=n(2),h=n(3);function E(){var e=Object(v.a)(["\n position: fixed;\n z-index: 9999999;\n bottom: 0;\n left: 0;\n width: 100%;\n overflow: hidden;\n display: flex;\n justify-content: space-between;\n & > div {\n display:flex;\n justify-content: center;\n align-items: center;\n }\n background-color: #333333;\n"]);return E=function(){return e},e}var y=h.a.div(E()),w=function(e){return a.a.createElement(y,{id:"udesly-frontend-editor-controls"},e.children)};function x(){var e=Object(v.a)(["\n color: ",";\n cursor: pointer;\n margin:0;\n\n .help-wrapper {\n display: none;\n animation: slide-in 0.6s ease-in;\n animation-fill-mode: backwards;\n }\n\n &:hover .help-wrapper {\n grid-template-columns: auto 1fr;\n grid-gap: 1rem;\n justify-items: center;\n display: grid;\n align-items: center;\n position: fixed;\n bottom: 60px;\n left: 20px;\n padding: 8px 15px;\n text-align: left;\n font-size: 12px;\n background-color: #2f52ff;\n font-weight: lighter;\n border-radius: 4px;\n color: white;\n max-width: 250px;\n min-width: 100px;\n background-color: ",";\n box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.2);\n\n i {\n font-size: 1.2rem;\n margin-right: 0.5rem;\n color: white;\n }\n }\n\n .help-wrapper * {\n margin: 0;\n letter-spacing: 0px;\n }\n .help-wrapper p {\n font-size: 12px;\n color: white;\n }\n"]);return x=function(){return e},e}function j(){var e=Object(v.a)(["\n background-color: ",";\n padding: 8px 12px;\n color: white;\n &:hover {\n cursor: pointer;\n }\n font-family: 'Helvetica', sans-serif;\n"]);return j=function(){return e},e}var k=h.a.div(j(),function(e){return e.isEnabled?"#2f52ff":"#333333"}),O=h.a.label(x(),function(e){return e.theme.primaryColor},function(e){return e.theme.primaryButton}),I=function(e){var t=e.children,n=e.type,r=e.help,i=Object(s.f)(function(e){return e.enabled}),o=Object(s.e)(function(e){return e.enableFrontendEditor});return a.a.createElement(O,null,a.a.createElement("div",{className:"help-wrapper"},a.a.createElement("i",{className:"fas fa-info-circle"}),a.a.createElement("p",null,r)),a.a.createElement(k,{isEnabled:i===n,onClick:function(){return o(n)}},t))},_=n(4);function S(){var e=Object(v.a)(["\n position: fixed;\n width: ","px;\n height: ","px;\n top: ","px;\n left: ","px;\n z-index: 998;\n outline: 1px dashed #2e52ff;\n outline-offset: 5px;\n background-color: transparent;\n display: ",";\n pointer-events: none;\n \n"]);return S=function(){return e},e}var C=h.a.div(S(),function(e){return e.width},function(e){return e.height},function(e){return e.top},function(e){return e.left},function(e){return e.display?"block":"none"}),A=function(e){var t=e.type,n=e.modifier,i=void 0===n?"":n,o=e.onElementClick,c=Object(s.f)(function(e){return e.enabled}),u=Object(r.useState)({}),l=Object(_.a)(u,2),d=l[0],f=l[1],m=function(e){var n=e.target;if(window.isFrontendEditorEnabled===t&&n.getAttribute("data-udy-fe")&&(""===i||n.tagName.toLowerCase()===i)){var r=n.getBoundingClientRect();f({display:"block",width:r.width,height:r.height,top:r.top,left:r.left})}},p=function(e){var n=e.target;window.isFrontendEditorEnabled===t&&(n.classList.contains("w-iframe")||n.querySelector("iframe")||n.getAttribute("data-udy-fe")||f({display:"none"}))},g=function(e){if(window.isFrontendEditorEnabled===t&&(e.preventDefault(),e.target.closest(".w-iframe"))){var n=e.target.closest(".w-iframe").querySelector("iframe");n&&n.getAttribute("data-udy-fe")&&o({target:n})}},b=function(e){if(window.isFrontendEditorEnabled===t&&(e.preventDefault(),e.target.closest(".w-background-video"))){var n=e.target.closest(".w-background-video").querySelector("video");n&&n.getAttribute("data-udy-fe")&&o({target:n})}},v=function(e){window.isFrontendEditorEnabled===t&&(e.preventDefault(),e.target.getAttribute("data-udy-fe")&&(""!==i&&e.target.tagName.toLowerCase()!==i||o(e)))};return Object(r.useEffect)(function(){window.isFrontendEditorEnabled=!1,document.querySelectorAll("".concat(i,'[data-udy-fe*="').concat(t,'"]')).forEach(function(e){if("iframe_"===t){var n=document.createElement("button");n.classList.add("udesly-iframe-button"),n.innerHTML='',n.addEventListener("click",g),e.closest(".w-iframe")&&e.closest(".w-iframe").append(n)}else if("video_"===t){var r=document.createElement("button");r.classList.add("udesly-video-button"),r.innerHTML='',r.addEventListener("click",b),e.closest(".w-background-video")&&e.closest(".w-background-video").append(r)}else e.addEventListener("mouseover",m,!0),e.addEventListener("click",v,!0)}),document.body.addEventListener("mouseover",p)},[]),Object(r.useEffect)(function(){window.isFrontendEditorEnabled=c,document.body.querySelectorAll('[contenteditable="true"]').forEach(function(e){e.removeAttribute("contenteditable")}),c!==t&&f({display:"none"})},[c]),a.a.createElement(C,Object.assign({},d,{className:"udesly-hover-indicator"}))},L=n(26);function N(){var e,t=[];document.querySelectorAll("[data-udy-fe]").forEach(function(e){return t.push(e.getAttribute("data-udy-fe"))}),(e=t,Object(L.a)(new Set(e))).forEach(function(e){document.querySelectorAll('[data-udy-fe="'.concat(e,'"]')).forEach(function(e,t){t>0&&e.removeAttribute("data-udy-fe")})})}var T=n(5),F=n.n(T);function V(){var e=Object(v.a)(["\n -webkit-appearance: none;\n background-color: #2f52ff;\n color: white;\n border-radius: 4px;\n padding: 4px 12px;\n border: 0;\n cursor: ","!important;\n"]);return V=function(){return e},e}var W=h.a.button(V(),function(e){return e.disabled?"not-allowed":"pointer"});function z(){var e=Object(v.a)(["\n outline: none;\n background-color: black;\n border-radius: 4px;\n margin-top: 12px;\n margin-bottom: 12px;\n width: 100%;\n -webkit-appearance: none;\n border: none;\n padding: 10px;\n"]);return z=function(){return e},e}var M=h.a.input(z());function H(){var e=Object(v.a)(["\n min-width: 300px;\n background-color: #333333;\n padding: 30px;\n color: white;\n z-index: 99999999;\n position: relative;\n\n h3 {\n color: white;\n letter-spacing: initial;\n text-transform: none;\n margin-bottom: 10px;\n }\n"]);return H=function(){return e},e}function q(){var e=Object(v.a)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: ",";\n z-index: 9999;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.3);\n"]);return q=function(){return e},e}var D=h.a.div(q(),function(e){return e.open?"flex":"none"}),P=h.a.div(H()),B=function(){var e=Object(s.e)(function(e){return e.changeTextValue}),t=Object(s.e)(function(e){return e.changeTextValues}),n=Object(s.e)(function(e){return e.setCurrentItem}),i=Object(r.useState)([]),o=Object(_.a)(i,2),c=o[0],u=o[1],l=Object(r.useState)(!1),d=Object(_.a)(l,2),f=d[0],m=d[1],p=function(e){13!==e.keyCode&&13!==e.witch||(e.preventDefault(),navigator.userAgent.indexOf("msie")>0?window.insertHtml("
"):document.execCommand("insertHTML",!1,"

"))},g=function(e){13!==e.keyCode&&13!==e.witch||(e.preventDefault(),e.target.value=e.target.value+"
")},b=function(e,t,n){var r;return function(){var a=this,i=arguments,o=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,n||e.apply(a,i)},t),o&&e.apply(a,i)}}(function(t){var n=t.target;e(n.innerHTML)},600);return a.a.createElement(a.a.Fragment,null,a.a.createElement(A,{type:"text_",onElementClick:function(e){var t=e.target,r=t.getAttribute("data-udy-fe").split(","),a=r.filter(function(e){return e.startsWith("text_")});if(a.length>1){var i=function(e){for(var t,n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1);t=r.nextNode();)t.parentNode==e&&n.push(t);return n}(t);u(r.map(function(e,t){return{attr:e,value:window.udesly_fe.items[e],node:i[t]}})),m(!0)}else t.setAttribute("contenteditable",!0),t.focus(),t.removeEventListener("keydown",p),t.removeEventListener("input",b),t.addEventListener("keydown",p),t.addEventListener("input",b),n(a[0])}}),a.a.createElement(D,{open:f},a.a.createElement(F.a,{onClickOutside:function(){return m(!1)}},a.a.createElement(P,null,a.a.createElement("h3",null,"Change the texts"),a.a.createElement("form",{onSubmit:function(e){if(f){e.preventDefault();var n={};e.target.querySelectorAll("input[data-id]").forEach(function(e){n[e.getAttribute("data-id")]=e.value}),console.log(n),t(n),m(!1)}},style:{maxWidth:"400px"}},c.map(function(e){return a.a.createElement(M,{type:"text",key:e.attr,"data-id":e.attr,defaultValue:e.value,onKeyDown:g,onChange:function(t){return function(e,t){var n=e.target.value;t.data=n}(t,e.node)}})}),a.a.createElement(W,{type:"submit"},"Save")),a.a.createElement("small",{style:{display:"block",color:"white",fontSize:"10px",marginTop:"10px"}},"You will see multiple spaces and break lines only after saving and refreshing")))))};function J(){var e=Object(v.a)(["\n min-width: 300px;\n background-color: #333333;\n padding: 30px;\n color: white;\n z-index: 99999999;\n position: relative;\n\n h3 {\n color: white;\n letter-spacing: initial;\n text-transform: none;\n margin-bottom: 10px;\n }\n"]);return J=function(){return e},e}function U(){var e=Object(v.a)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: ",";\n z-index: 9999;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.3);\n"]);return U=function(){return e},e}var K=h.a.div(U(),function(e){return e.open?"flex":"none"}),R=h.a.div(J()),Y=function(){var e=Object(s.e)(function(e){return e.changeLinkValue}),t=Object(s.e)(function(e){return e.setCurrentItem}),n=Object(r.useState)(!1),i=Object(_.a)(n,2),o=i[0],c=i[1],u=Object(r.useState)(""),l=Object(_.a)(u,2),d=l[0],f=l[1],m=Object(r.useState)(null),p=Object(_.a)(m,2),g=p[0],b=p[1],v=function(){o&&"link_"===window.isFrontendEditorEnabled&&(c(!1),g&&g.setAttribute("href",d),e(d))};return a.a.createElement(a.a.Fragment,null,a.a.createElement(A,{type:"link_",modifier:"a",onElementClick:function(e){var n=e.target,r=n.getAttribute("data-udy-fe").split(",").filter(function(e){return e.startsWith("link_")})[0];t(r),c(!0),f(n.getAttribute("href")||"#"),b(n)}}),a.a.createElement(K,{open:o},a.a.createElement(F.a,{onClickOutside:v},a.a.createElement(R,null,a.a.createElement("h3",null,"Change the link"),a.a.createElement(M,{type:"url",value:d,onChange:function(e){var t=e.target;return f(t.value)},onKeyPress:function(e){return function(e){"Enter"===e.key&&v()}(e)}}),a.a.createElement(W,{onClick:v},"Save")))))};function X(e,t,n){var r=window.wp.media({title:"Select or upload "+e,button:{text:"Use this "+e},library:{type:n},multiple:!1});r.on("select",function(){var e=r.state().get("selection").first().toJSON();t(e)}),r.open()}var G=function(){var e=Object(s.e)(function(e){return e.changeImageValue}),t=Object(s.e)(function(e){return e.setCurrentItem});return a.a.createElement(A,{type:"image_",modifier:"img",onElementClick:function(n){var r=n.target,a=r.getAttribute("data-udy-fe").split(",").filter(function(e){return e.startsWith("image_")})[0];t(a),X("image",function(t){t&&(r.setAttribute("src",t.url),r.removeAttribute("srcset"),e(t.id))},["image"])}})},Q=function(){var e=Object(s.e)(function(e){return e.changeBackgroundImageValue}),t=Object(s.e)(function(e){return e.setCurrentItem});return a.a.createElement(A,{type:"bg_image_",onElementClick:function(n){var r=n.target,a=r.getAttribute("data-udy-fe").split(",").filter(function(e){return e.startsWith("bg_image_")})[0];t(a),X("image",function(t){t&&(r.style.backgroundImage="url("+t.url+")",e(t.id))})}})},Z=n(25);function $(){var e=Object(v.a)(["\n -webkit-apperance: none;\n background-color: #2f52ff;\n color: white;\n border-radius: 4px;\n padding: 4px 12px;\n cursor: pointer;\n"]);return $=function(){return e},e}function ee(){var e=Object(v.a)(["\n min-width: 300px;\n background-color: #333333;\n padding: 30px;\n color: white;\n z-index: 99999999;\n position: relative;\n\n h3 {\n color: white;\n letter-spacing: initial;\n text-transform: none;\n margin-bottom: 10px;\n }\n"]);return ee=function(){return e},e}function te(){var e=Object(v.a)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n display: ",";\n z-index: 9999;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.3);\n"]);return te=function(){return e},e}var ne=h.a.div(te(),function(e){return e.open?"flex":"none"}),re=h.a.div(ee()),ae=h.a.button($());var ie=function(){var e=Object(s.e)(function(e){return e.changeIframeValue}),t=Object(s.e)(function(e){return e.setCurrentItem}),n=Object(r.useState)(!1),i=Object(_.a)(n,2),o=i[0],c=i[1],u=Object(r.useState)(""),l=Object(_.a)(u,2),d=l[0],f=l[1],m=Object(r.useState)(null),p=Object(_.a)(m,2),g=p[0],b=p[1],v=function(){if(o&&"iframe_"===window.isFrontendEditorEnabled){c(!1);var t=Object(Z.isAbsolute)(d);g&&g.setAttribute("src",t?d:"https://www.youtube.com/embed/"+d),g&&e(g.getAttribute("src"))}};return a.a.createElement(a.a.Fragment,null,a.a.createElement(A,{type:"iframe_",modifier:"iframe",onElementClick:function(e){var n=e.target,r=n.getAttribute("data-udy-fe").split(",").filter(function(e){return e.startsWith("iframe_")})[0];t(r),c(!0);var a=function(e){var t=e.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/);return!(!t||11!==t[7].length)&&t[7]}(n.getAttribute("src"));f(a||n.getAttribute("src")),b(n)}}),a.a.createElement(ne,{open:o},a.a.createElement(F.a,{onClickOutside:v},a.a.createElement(re,null,a.a.createElement("h3",null,"Change the link"),a.a.createElement(M,{type:"url",value:d,onChange:function(e){var t=e.target;return f(t.value)},onKeyPress:function(e){return function(e){"Enter"===e.key&&v()}(e)}}),a.a.createElement("small",{style:{display:"block",color:"white",fontSize:"10px",marginTop:"10px"}},"You can paste a youtube code or an absolute iframe link"),a.a.createElement(ae,{onClick:v},"Save")))))},oe=function(){var e=Object(s.e)(function(e){return e.changeVideoValue}),t=Object(s.e)(function(e){return e.setCurrentItem});return a.a.createElement(A,{type:"video_",modifier:"video",onElementClick:function(n){var r=n.target,a=r.getAttribute("data-udy-fe").split(",").filter(function(e){return e.startsWith("video_")})[0];t(a),X("video",function(t){if(t&&"video"===t.type){r.innerHTML="";var n=document.createElement("source");n.setAttribute("src",t.url),r.appendChild(n),r.load(),r.play(),e(t.url)}},["video"])}})};function ce(){var e=Object(v.a)(["\n background-color: #2f52ff;\n padding: 8px 12px;\n color: white;\n cursor: ","!important;\n"]);return ce=function(){return e},e}function ue(){var e=Object(v.a)(["\n margin: 0;\n font-size: 12px;\n letter-spacing: initial;\n"]);return ue=function(){return e},e}var le=h.a.p(ue()),de=function(){var e=Object(s.e)(function(e){return e.setItems}),t=Object(s.e)(function(e){return e.saveItems}),n=Object(s.e)(function(e){return e.setPageName}),i=Object(s.f)(function(e){return e.shouldSave}),o=Object(s.f)(function(e){return e.loading}),c=Object(s.f)(function(e){return e.message});Object(r.useEffect)(function(){N(),window.addEventListener("load",function(){try{var t=document.getElementById("udesly-fe-config"),r=t.innerHTML;e(JSON.parse(r)),n(t.getAttribute("data-page"))}catch(a){console.log(a)}})},[]);var u=h.a.div(ce(),function(e){return e.disabled?"not-allowed":"pointer"}),l=i?"Save":"No changes";return l=o?"Saving...":l,a.a.createElement(a.a.Fragment,null,a.a.createElement(w,null,a.a.createElement("div",null,a.a.createElement(I,{type:"text_",help:"Enable texts editing"},a.a.createElement("i",{className:"fas fa-align-left"})),a.a.createElement(I,{type:"link_",help:"Enable link editing"},a.a.createElement("i",{className:"fas fa-link"})),a.a.createElement(I,{type:"image_",help:"Enable image editing"},a.a.createElement("i",{className:"fas fa-images"})),a.a.createElement(I,{type:"bg_image_",help:"Enable background image editing"},a.a.createElement("i",{className:"fas fa-file-image"})),a.a.createElement(I,{type:"iframe_",help:"Enable iframe editing"},a.a.createElement("i",{className:"fab fa-youtube"})),a.a.createElement(I,{type:"video_",help:"Enable video editing"},a.a.createElement("i",{className:"fas fa-video"}))),c&&a.a.createElement("div",null,a.a.createElement(le,{style:{color:c.color}},c.text)),a.a.createElement("div",null,a.a.createElement(u,{className:"udesly-fe-save-button",onClick:function(e){e.preventDefault(),t()},disabled:!i||o},l))),a.a.createElement(B,null),a.a.createElement(Y,null),a.a.createElement(G,null),a.a.createElement(Q,null),a.a.createElement(ie,null),a.a.createElement(oe,null))};o.a.render(a.a.createElement(b,null,a.a.createElement(de,null)),document.getElementById("udesly-frontend-editor-root"))}},[[29,2,1]]]); +//# sourceMappingURL=main.4b523a92.chunk.js.map +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(e,t,n){"use strict";e.exports=n(30)},function(e,t,n){"use strict";var r=n(11),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},i={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function a(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function l(e,t,n){var o;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function");if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error("Expected the enhancer to be a function.");return n(l)(e,t)}if("function"!==typeof e)throw new Error("Expected the reducer to be a function.");var u=e,c=t,s=[],f=s,d=!1;function p(){f===s&&(f=s.slice())}function h(){if(d)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return c}function m(e){if("function"!==typeof e)throw new Error("Expected the listener to be a function.");if(d)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return p(),f.push(e),function(){if(t){if(d)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,p();var n=f.indexOf(e);f.splice(n,1)}}}function y(e){if(!a(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,c=u(c,e)}finally{d=!1}for(var t=s=f,n=0;n0?Promise.all(n.map(function(e){return e(j.dispatch,t,j.getState,m)})):Promise.resolve(),r&&r.length>0?Promise.all(r.map(function(e){return e(_(e.__meta__.parent,R),t,{dispatch:j.dispatch,getState:j.getState,injections:m,meta:e.__meta__})})):Promise.resolve()])};!function e(t,n){return Object.keys(t).forEach(function(r){var o=t[r],a=[].concat(n,[r]),l={parent:n,path:a};if("function"===typeof o)if(o.__select__)o.__selectState__={parentPath:n,key:r,executed:!1},D.push(o);else if(o.__thunk__){var u="@thunk."+a.join(".");o.__actionName__=u;var c=function(e){return o(_(n,R),e,{dispatch:j.dispatch,getState:j.getState,injections:m,meta:l})};S(a,I,c);var s=function e(t){return T().then(function(){return j.dispatch({type:u+"(started)",payload:t})}).then(function(){return j.dispatch(function(){return c(t)})}).then(function(n){return j.dispatch({type:u+"(completed)",payload:t}),B(e.__actionName__,t),n})};s.__actionName__=u,z[u]=s,S(a,R,s)}else if(o.__effect__){var f="@effect."+a.join(".");o.__actionName__=f;var d=function e(t){return T().then(function(){return j.dispatch(function(){return function(e){return i&&j.dispatch({type:f,payload:e}),o(j.dispatch,e,j.getState,m,{parent:n,path:a})}(t)})}).then(function(n){return B(e.__actionName__,t),n})};d.__actionName__=f,z[f]=d,S(a,R,d)}else if(o.__reducer__)L.push({path:a,reducer:o});else if(o.__listeners__)F.push(o);else if(o.__listen__)W.push(o),o.__meta__=l;else{var y="@action."+a.join(".");o.__actionName__=y;var v=function(e,t){return Object(p.a)(e,function(e){return o(e,t,{dispatch:j.dispatch,dispatchLocal:_(a,j.dispatch),getState:j.getState})})};v.actionName=y,S(a,M,v);var g=function e(t){var n=j.dispatch({type:v.actionName,payload:t});return B(e.__actionName__,t),n};g.__actionName__=y,z[y]=g,S(a,R,g)}else if(x(o)&&Object.keys(o).length>0)S(a,A,{}),e(o,a);else{var b=_(n,h);S(a,A,b&&r in b?b[r]:o)}})}(N,[]),D.forEach(function(e){e.__selectImp__=d()(1)(function(t){return n=e(t),u||"function"!==typeof n?n:d()(100)(n);var n})}),W.forEach(function(e){e(function(t,n){"function"===typeof n&&(n.__meta__=e.__meta__,"function"===typeof t&&t.__actionName__&&z[t.__actionName__]?($[t.__actionName__]=$[t.__actionName__]||[],$[t.__actionName__].push(n)):"string"===typeof t&&(V[t]=V[t]||[],V[t].push(n)))})}),F.forEach(function(e){e(R,function(e,t){"function"===typeof e&&e.__actionName__&&z[e.__actionName__]&&(U[e.__actionName__]=U[e.__actionName__]||[],U[e.__actionName__].push(t))})});var H=function(){var e=function e(t,n){var r=Object.keys(t).reduce(function(e,n){var r=t[n];return"function"!==typeof r||r.__effect__?e:[].concat(e,[r])},[]),o=Object.keys(t).reduce(function(e,n){return x(t[n])?[].concat(e,[n]):e},[]).map(function(r){return[r,e(t[r],[].concat(n,[r]))]});return function(e,t){if(void 0===e&&(e=_(n,A)),E(t.type,"@effect."))return e;if(n.length>0&&!E(t.type,"@action."+n.join(".")))return e;var i=r.find(function(e){return e.actionName===t.type});if(i)return i(e,t.payload);for(var a=0;a0?function(t,n){var r=e(t,n);return Object(p.a)(r,function(e){L.forEach(function(t){var r=t.path,o=t.reducer,i=_(r,e);S(r,e,o(i,n))})})}:e,n=function e(t,n){var r=n.__selectState__,o=r.parentPath,i=r.key;if(r.executed)return t;var a=n.__selectDependencies__,l=a?a.reduce(e,t):t,u=t;if(o.length>0){var c=_(o,l);if(c){var s=n.__selectImp__(c);u=Object(p.a)(t,function(e){_(o,e)[i]=s})}}else{var f=n.__selectImp__(l);u=Object(p.a)(t,function(e){e[i]=f})}return n.__selectState__.executed=!0,u},r=!0;return D.length>0?function(e,o){var i=t(e,o);if(e!==i||r){var a=function(e){return D.reduce(n,e)}(i);return r=!1,D.forEach(function(e){e.__selectState__.executed=!1}),a}return i}:t}(),q=r||(i&&"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:c),Q=[],K=l(P(H),A,q(s.apply(void 0,[y,function(){return function(e){return function(t){return V[t.type]&&B(t.type,t.payload),e(t)}}},function(){return function(e){return function(t){if(!g)return e(t);Q.push(t)}}}].concat(w))));return K.getMockedActions=function(){return[].concat(Q)},K.clearMockedActions=function(){Q=[]},Object.keys(R).forEach(function(e){K.dispatch[e]=R[e]}),j.dispatch=K.dispatch,j.getState=K.getState,j.getState.getState=K.getState,K},N=Object(v.createContext)();function j(e,t){void 0===t&&(t=[]);var n=Object(v.useContext)(N),r=Object(v.useState)(e(n.getState())),o=r[0],i=r[1],a=Object(v.useRef)(o),l=Object(v.useRef)(!0);return Object(v.useEffect)(function(){var t=function(){var t=e(n.getState());l.current=!0,t===a.current||x(t)&&x(a.current)&&w()(t,a.current)||(a.current=t,l.current&&i(a.current))};t();var r=n.subscribe(t);return function(){r(),l.current=!1}},t),o}function A(e){return e(Object(v.useContext)(N).dispatch)}var I=function(e){var t=e.children,n=e.store;return g.a.createElement(N.Provider,{value:n},t)}},function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";(function(e,r){var o=n(12),i=n.n(o),a=n(23),l=n.n(a),u=n(0),c=n.n(u),s=n(24),f=n(13),d=n(14),p=(n(19),n(27)),h=n(28),m=function(e,t){for(var n=[e[0]],r=0,o=t.length;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},x=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},_=function(e){return"object"===("undefined"===typeof e?"undefined":y(e))&&e.constructor===Object},S=Object.freeze([]),T=Object.freeze({});function E(e){return"function"===typeof e}function C(e){return e.displayName||e.name||"Component"}function O(e){return e&&"string"===typeof e.styledComponentId}var P="undefined"!==typeof e&&(Object({NODE_ENV:"production",PUBLIC_URL:""}).REACT_APP_SC_ATTR||Object({NODE_ENV:"production",PUBLIC_URL:""}).SC_ATTR)||"data-styled",N="undefined"!==typeof window&&"HTMLElement"in window,j="boolean"===typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||"undefined"!==typeof e&&(Object({NODE_ENV:"production",PUBLIC_URL:""}).REACT_APP_SC_DISABLE_SPEEDY||Object({NODE_ENV:"production",PUBLIC_URL:""}).SC_DISABLE_SPEEDY)||!1;var A=function(e){function t(n){v(this,t);for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i0?" Additional arguments: "+o.join(", "):"")));return x(a)}return w(t,e),t}(Error),I=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,R=function(e){var t=""+(e||""),n=[];return t.replace(I,function(e,t,r){return n.push({componentId:t,matchIndex:r}),e}),n.map(function(e,r){var o=e.componentId,i=e.matchIndex,a=n[r+1];return{componentId:o,cssFromDOM:a?t.slice(i,a.matchIndex):t.slice(i)}})},z=/^\s*\/\/.*$/gm,M=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),L=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),D=[],F=function(e){if(-2===e){var t=D;return D=[],t}},U=l()(function(e){D.push(e)}),W=void 0,$=void 0,V=void 0,B=function(e,t,n){return t>0&&-1!==n.slice(0,t).indexOf($)&&n.slice(t-$.length,t)!==$?"."+W:e};L.use([function(e,t,n){2===e&&n.length&&n[0].lastIndexOf($)>0&&(n[0]=n[0].replace(V,B))},U,F]),M.use([U,F]);function H(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",o=e.join("").replace(z,""),i=t&&n?n+" "+t+" { "+o+" }":o;return W=r,$=t,V=new RegExp("\\"+$+"\\b","g"),L(n||!t?"":t,i)}var q=function(){return n.nc},Q=function(e,t,n){n&&((e[t]||(e[t]=Object.create(null)))[n]=!0)},K=function(e,t){e[t]=Object.create(null)},Y=function(e){return function(t,n){return void 0!==e[t]&&e[t][n]}},G=function(e){var t="";for(var n in e)t+=Object.keys(e[n]).join(" ")+" ";return t.trim()},X=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets.length,n=0;n"+e()+""}},ne=function(e,t){return function(){var n,r=((n={})[P]=G(t),n["data-styled-version"]="4.3.2",n),o=q();return o&&(r.nonce=o),c.a.createElement("style",b({},r,{dangerouslySetInnerHTML:{__html:e()}}))}},re=function(e){return function(){return Object.keys(e)}},oe=function(e){return document.createTextNode(Z(e))},ie=function e(t,n){var r=void 0===t?Object.create(null):t,o=void 0===n?Object.create(null):n,i=function(e){var t=o[e];return void 0!==t?t:o[e]=[""]},a=function(){var e="";for(var t in o){var n=o[t][0];n&&(e+=Z(t)+n)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var n in e)t[n]=b({},e[n]);return t}(r),n=Object.create(null);for(var i in o)n[i]=[o[i][0]];return e(t,n)},css:a,getIds:re(o),hasNameForId:Y(r),insertMarker:i,insertRules:function(e,t,n){i(e)[0]+=t.join(" "),Q(r,e,n)},removeRules:function(e){var t=o[e];void 0!==t&&(t[0]="",K(r,e))},sealed:!1,styleTag:null,toElement:ne(a,r),toHTML:te(a,r)}},ae=function(e,t,n,r,o){if(N&&!n){var i=function(e,t,n){var r=document.createElement("style");r.setAttribute(P,""),r.setAttribute("data-styled-version","4.3.2");var o=q();if(o&&r.setAttribute("nonce",o),r.appendChild(document.createTextNode("")),e&&!t)e.appendChild(r);else{if(!t||!e||!t.parentNode)throw new A(6);t.parentNode.insertBefore(r,n?t:t.nextSibling)}return r}(e,t,r);return j?function(e,t){var n=Object.create(null),r=Object.create(null),o=void 0!==t,i=!1,a=function(t){var o=r[t];return void 0!==o?o:(r[t]=oe(t),e.appendChild(r[t]),n[t]=Object.create(null),r[t])},l=function(){var e="";for(var t in r)e+=r[t].data;return e};return{clone:function(){throw new A(5)},css:l,getIds:re(r),hasNameForId:Y(n),insertMarker:a,insertRules:function(e,r,l){for(var u=a(e),c=[],s=r.length,f=0;f0&&(i=!0,t().insertRules(e+"-import",c))},removeRules:function(a){var l=r[a];if(void 0!==l){var u=oe(a);e.replaceChild(u,l),r[a]=u,K(n,a),o&&i&&t().removeRules(a+"-import")}},sealed:!1,styleTag:e,toElement:ne(l,n),toHTML:te(l,n)}}(i,o):function(e,t){var n=Object.create(null),r=Object.create(null),o=[],i=void 0!==t,a=!1,l=function(e){var t=r[e];return void 0!==t?t:(r[e]=o.length,o.push(0),K(n,e),r[e])},u=function(){var t=X(e).cssRules,n="";for(var i in r){n+=Z(i);for(var a=r[i],l=ee(o,a),u=l-o[a];u0&&(a=!0,t().insertRules(r+"-import",h)),o[s]+=p,Q(n,r,c)},removeRules:function(l){var u=r[l];if(void 0!==u){var c=o[u];!function(e,t,n){for(var r=t-n,o=t;o>r;o-=1)e.deleteRule(o)}(X(e),ee(o,u)-1,c),o[u]=0,K(n,l),i&&a&&t().removeRules(l+"-import")}},sealed:!1,styleTag:e,toElement:ne(u,n),toHTML:te(u,n)}}(i,o)}return ie()},le=/\s+/,ue=void 0;ue=N?j?40:1e3:-1;var ce=0,se=void 0,fe=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N?document.head:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];v(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var n=t.tags[0];return t.importRuleTag=ae(t.target,n?n.styleTag:null,t.forceServer,!0)},ce+=1,this.id=ce,this.forceServer=r,this.target=r?null:n,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!N||this.forceServer)return this;var e=[],t=[],n=!1,r=document.querySelectorAll("style["+P+'][data-styled-version="4.3.2"]'),o=r.length;if(!o)return this;for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];se=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map(function(e){for(var n=e.getIds(),r=e.clone(),o=0;o1?t-1:0),r=1;r=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return((r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16))^r>>>15)>>>0}var ke=52,xe=function(e){return String.fromCharCode(e+(e>25?39:97))};function _e(e){var t="",n=void 0;for(n=e;n>ke;n=Math.floor(n/ke))t=xe(n%ke)+t;return xe(n%ke)+t}function Se(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:T,r=!!n&&e.theme===n.theme;return e.theme&&!r?e.theme:t||n.theme},Ne=/[[\].#*$><+~=|^:(),"'`-]+/g,je=/(^-|-$)/g;function Ae(e){return e.replace(Ne,"-").replace(je,"")}function Ie(e){return"string"===typeof e&&!0}var Re={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},ze={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Me=((Te={})[f.ForwardRef]={$$typeof:!0,render:!0},Te),Le=Object.defineProperty,De=Object.getOwnPropertyNames,Fe=Object.getOwnPropertySymbols,Ue=void 0===Fe?function(){return[]}:Fe,We=Object.getOwnPropertyDescriptor,$e=Object.getPrototypeOf,Ve=Object.prototype,Be=Array.prototype;function He(e,t,n){if("string"!==typeof t){var r=$e(t);r&&r!==Ve&&He(e,r,n);for(var o=Be.concat(De(t),Ue(t)),i=Me[e.$$typeof]||Re,a=Me[t.$$typeof]||Re,l=o.length,u=void 0,c=void 0;l--;)if(c=o[l],!ze[c]&&(!n||!n[c])&&(!a||!a[c])&&(!i||!i[c])&&(u=We(t,c)))try{Le(e,c,u)}catch(s){}return e}return e}var qe=Object(u.createContext)(),Qe=qe.Consumer,Ke=(function(e){function t(n){v(this,t);var r=x(this,e.call(this,n));return r.getContext=Object(d.a)(r.getContext.bind(r)),r.renderInner=r.renderInner.bind(r),r}w(t,e),t.prototype.render=function(){return this.props.children?c.a.createElement(qe.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return c.a.createElement(qe.Provider,{value:t},c.a.Children.only(this.props.children))},t.prototype.getTheme=function(e,t){if(E(e))return e(t);if(null===e||Array.isArray(e)||"object"!==("undefined"===typeof e?"undefined":y(e)))throw new A(8);return b({},t,e)},t.prototype.getContext=function(e,t){return this.getTheme(e,t)}}(u.Component),function(){function e(){v(this,e),this.masterSheet=fe.master,this.instance=this.masterSheet.clone(),this.sealed=!1}e.prototype.seal=function(){if(!this.sealed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.sealed=!0}},e.prototype.collectStyles=function(e){if(this.sealed)throw new A(2);return c.a.createElement(Ge,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new A(3)}}(),Object(u.createContext)()),Ye=Ke.Consumer,Ge=function(e){function t(n){v(this,t);var r=x(this,e.call(this,n));return r.getContext=Object(d.a)(r.getContext),r}return w(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new fe(t);throw new A(4)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.sheet,r=e.target;return c.a.createElement(Ke.Provider,{value:this.getContext(n,r)},t)},t}(u.Component),Xe={};var Je=function(e){function t(){v(this,t);var n=x(this,e.call(this));return n.attrs={},n.renderOuter=n.renderOuter.bind(n),n.renderInner=n.renderInner.bind(n),n}return w(t,e),t.prototype.render=function(){return c.a.createElement(Ye,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fe.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():c.a.createElement(Qe,null,this.renderInner)},t.prototype.renderInner=function(e){var t=this.props.forwardedComponent,n=t.componentStyle,r=t.defaultProps,o=(t.displayName,t.foldedComponentIds),i=t.styledComponentId,a=t.target,l=void 0;l=n.isStatic?this.generateAndInjectStyles(T,this.props):this.generateAndInjectStyles(Pe(this.props,e,r)||T,this.props);var c=this.props.as||this.attrs.as||a,s=Ie(c),f={},d=b({},this.attrs,this.props),h=void 0;for(h in d)"forwardedComponent"!==h&&"as"!==h&&("forwardedRef"===h?f.ref=d[h]:"forwardedAs"===h?f.as=d[h]:s&&!Object(p.a)(h)||(f[h]=d[h]));return this.props.style&&this.attrs.style&&(f.style=b({},this.attrs.style,this.props.style)),f.className=Array.prototype.concat(o,this.props.className,i,this.attrs.className,l).filter(Boolean).join(" "),Object(u.createElement)(c,f)},t.prototype.buildExecutionContext=function(e,t,n){var r=this,o=b({},t,{theme:e});return n.length?(this.attrs={},n.forEach(function(e){var t,n=e,i=!1,a=void 0,l=void 0;for(l in E(n)&&(n=n(o),i=!0),n)a=n[l],i||!E(a)||(t=a)&&t.prototype&&t.prototype.isReactComponent||O(a)||(a=a(o)),r.attrs[l]=a,o[l]=a}),o):o},t.prototype.generateAndInjectStyles=function(e,t){var n=t.forwardedComponent,r=n.attrs,o=n.componentStyle;n.warnTooManyClasses;return o.isStatic&&!r.length?o.generateAndInjectStyles(T,this.styleSheet):o.generateAndInjectStyles(this.buildExecutionContext(e,t,r),this.styleSheet)},t}(u.Component);function Ze(e,t,n){var r=O(e),o=!Ie(e),i=t.displayName,a=void 0===i?function(e){return Ie(e)?"styled."+e:"Styled("+C(e)+")"}(e):i,l=t.componentId,u=void 0===l?function(e,t,n){var r="string"!==typeof t?"sc":Ae(t),o=(Xe[r]||0)+1;Xe[r]=o;var i=r+"-"+e.generateName(r+o);return n?n+"-"+i:i}(Oe,t.displayName,t.parentComponentId):l,s=t.ParentComponent,f=void 0===s?Je:s,d=t.attrs,p=void 0===d?S:d,m=t.displayName&&t.componentId?Ae(t.displayName)+"-"+t.componentId:t.componentId||u,y=r&&e.attrs?Array.prototype.concat(e.attrs,p).filter(Boolean):p,v=new Oe(r?e.componentStyle.rules.concat(n):n,y,m),g=void 0,w=function(e,t){return c.a.createElement(f,b({},e,{forwardedComponent:g,forwardedRef:t}))};return w.displayName=a,(g=c.a.forwardRef(w)).displayName=a,g.attrs=y,g.componentStyle=v,g.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):S,g.styledComponentId=m,g.target=r?e.target:e,g.withComponent=function(e){var r=t.componentId,o=k(t,["componentId"]),i=r&&r+"-"+(Ie(e)?e:Ae(C(e)));return Ze(e,b({},o,{attrs:y,componentId:i,ParentComponent:f}),n)},Object.defineProperty(g,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Object(h.a)(e.defaultProps,t):t}}),g.toString=function(){return"."+g.styledComponentId},o&&He(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),g}var et=function(e){return function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;if(!Object(f.isValidElementType)(n))throw new A(1,String(n));var o=function(){return t(n,r,be.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,b({},r,o))},o.attrs=function(o){return e(t,n,b({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(Ze,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){et[e]=et(e)});!function(){function e(t,n){v(this,e),this.rules=t,this.componentId=n,this.isStatic=Se(t,S),fe.master.hasId(n)||fe.master.deferredInject(n,[])}e.prototype.createStyles=function(e,t){var n=H(ge(this.rules,e,t),"");t.inject(this.componentId,n)},e.prototype.removeStyles=function(e){var t=this.componentId;e.hasId(t)&&e.remove(t)},e.prototype.renderStyles=function(e,t){this.removeStyles(t),this.createStyles(e,t)}}();N&&(window.scCGSHMRCache={});t.a=et}).call(this,n(9),n(18)(e))},function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","onClickOutside"]));return a.default.createElement("div",r({},n,{ref:this.getContainer}),t)}},{key:"componentDidMount",value:function(){document.addEventListener("touchend",this.handle,!0),document.addEventListener("click",this.handle,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("touchend",this.handle,!0),document.removeEventListener("click",this.handle,!0)}}]),t}();c.propTypes={onClickOutside:l.default.func.isRequired},t.default=c},function(e,t,n){e.exports=n(36)},function(e,t,n){"use strict";(function(e){var r;n.d(t,"b",function(){return B});var o="undefined"!==typeof Symbol?Symbol("immer-nothing"):((r={})["immer-nothing"]=!0,r),i="undefined"!==typeof Symbol?Symbol.for("immer-draftable"):"__$immer_draftable",a="undefined"!==typeof Symbol?Symbol.for("immer-state"):"__$immer_state";function l(e){return!!e&&!!e[a]}function u(e){if(!e||"object"!==typeof e)return!1;if(Array.isArray(e))return!0;var t=Object.getPrototypeOf(e);return!t||t===Object.prototype||(!!e[i]||!!e.constructor[i])}var c=Object.assign||function(e,t){for(var n in t)h(t,n)&&(e[n]=t[n]);return e},s="undefined"!==typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:"undefined"!==typeof Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function f(e,t){if(void 0===t&&(t=!1),Array.isArray(e))return e.slice();var n=Object.create(Object.getPrototypeOf(e));return s(e).forEach(function(r){if(r!==a){var o=Object.getOwnPropertyDescriptor(e,r),i=o.value;if(o.get){if(!t)throw new Error("Immer drafts cannot have computed properties");i=o.get.call(e)}o.enumerable?n[r]=i:Object.defineProperty(n,r,{value:i,writable:!0,configurable:!0})}}),n}function d(e,t){if(Array.isArray(e))for(var n=0;n=0;t--){var n=e[t][a];n.modified||(Array.isArray(n.base)?P(n)&&_(n):O(n)&&_(n))}}function O(e){for(var t=e.base,n=e.draft,r=Object.keys(n),o=r.length-1;o>=0;o--){var i=r[o],l=t[i];if(void 0===l&&!h(t,i))return!0;var u=n[i],c=u&&u[a];if(c?c.base!==l:!m(u,l))return!0}return r.length!==Object.keys(t).length}function P(e){var t=e.draft;if(t.length!==e.base.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var N=Object.freeze({willFinalize:function(e,t,n){e.drafts.forEach(function(e){e[a].finalizing=!0}),n?l(t)&&t[a].scope===e&&C(e.drafts):(e.patches&&function e(t){if(t&&"object"===typeof t){var n=t[a];if(n){var r=n.base,o=n.draft,i=n.assigned;if(Array.isArray(t)){if(P(n)){if(_(n),i.length=!0,o.lengths&&a[f-1]===l[f+c-1];)--f;for(var d=s;d=f;--y){var v=t.concat([y]);n[m+y-f]={op:"add",path:v,value:l[y]},h&&r.push({op:"remove",path:v})}h||r.push({op:"replace",path:t.concat(["length"]),value:a.length})}(e,t,n,r):function(e,t,n,r){var o=e.base,i=e.copy;d(e.assigned,function(e,a){var l=o[e],u=i[e],c=a?e in o?"replace":"add":"remove";if(l!==u||"replace"!==c){var s=t.concat(e);n.push("remove"===c?{op:c,path:s}:{op:c,path:s,value:u}),r.push("add"===c?{op:"remove",path:s}:"remove"===c?{op:"add",path:s,value:l}:{op:"replace",path:s,value:l})}})}(e,t,n,r)}function F(e,t){for(var n=0;n0;)n[r]=arguments[r+1];return i.produce(e,function(e){return t.call.apply(t,[e,e].concat(n))})}}if("function"!==typeof t)throw new Error("The first or second argument to `produce` must be a function");if(void 0!==n&&"function"!==typeof n)throw new Error("The third argument to `produce` must be a function or undefined");if(u(e)){var l=y.enter(),c=this.createProxy(e),s=!0;try{r=t.call(c,c),s=!1}finally{s?l.revoke():l.leave()}return r instanceof Promise?r.then(function(e){return l.usePatches(n),i.processResult(e,l)},function(e){throw l.revoke(),e}):(l.usePatches(n),this.processResult(r,l))}return void 0===(r=t(e))?e:r!==o?r:void 0},W.prototype.createDraft=function(e){if(!u(e))throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object");var t=y.enter(),n=this.createProxy(e);return n[a].isManual=!0,t.leave(),n},W.prototype.finishDraft=function(e,t){var n=e&&e[a];if(!n||!n.isManual)throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`");if(n.finalized)throw new Error("The given draft is already finalized");var r=n.scope;return r.usePatches(t),this.processResult(void 0,r)},W.prototype.setAutoFreeze=function(e){this.autoFreeze=e},W.prototype.setUseProxies=function(e){this.useProxies=e,c(this,e?L:N)},W.prototype.applyPatches=function(e,t){return l(e)?F(e,t):this.produce(e,function(e){return F(e,t)})},W.prototype.processResult=function(e,t){var n=t.drafts[0],r=void 0!==e&&e!==n;if(this.willFinalize(t,e,r),r){if(n[a].modified)throw t.revoke(),new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.");u(e)&&(e=this.finalize(e,null,t)),t.patches&&(t.patches.push({op:"replace",path:[],value:e}),t.inversePatches.push({op:"replace",path:[],value:n[a].base}))}else e=this.finalize(n,[],t);return t.revoke(),t.patches&&t.patchListener(t.patches,t.inversePatches),e!==o?e:void 0},W.prototype.finalize=function(e,t,n){var r=this,o=e[a];if(!o)return Object.isFrozen(e)?e:this.finalizeTree(e,null,n);if(o.scope!==n)return e;if(!o.modified)return o.base;if(!o.finalized){if(o.finalized=!0,this.finalizeTree(o.draft,t,n),this.onDelete)if(this.useProxies){var i=o.assigned;for(var l in i)i[l]||this.onDelete(o,l)}else{var u=o.base,c=o.copy;d(u,function(e){h(c,e)||r.onDelete(o,e)})}this.onCopy&&this.onCopy(o),this.autoFreeze&&n.canAutoFreeze&&Object.freeze(o.copy),t&&n.patches&&D(o,t,n.patches,n.inversePatches)}return o.copy},W.prototype.finalizeTree=function(e,t,n){var r=this,o=e[a];o&&(this.useProxies||(o.copy=f(o.draft,!0)),e=o.copy);var i=!!t&&!!n.patches;return d(e,function a(c,s,f){if(s===f)throw Error("Immer forbids circular references");var h=!!o&&f===e;if(l(s)){var y=h&&i&&!o.assigned[c]?t.concat(c):null;if(l(s=r.finalize(s,y,n))&&(n.canAutoFreeze=!1),Array.isArray(f)||p(f,c)?f[c]=s:Object.defineProperty(f,c,{value:s}),h&&s===o.base[c])return}else{if(h&&m(s,o.base[c]))return;u(s)&&!Object.isFrozen(s)&&d(s,a)}h&&r.onAssign&&r.onAssign(o,c,s)}),e};var $=new W,V=$.produce,B=$.setAutoFreeze.bind($);$.setUseProxies.bind($),$.applyPatches.bind($),$.createDraft.bind($),$.finishDraft.bind($);t.a=V}).call(this,n(9))},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(c){return void n(c)}l.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var a=e.apply(t,n);function l(e){r(a,o,i,l,u,"next",e)}function u(e){r(a,o,i,l,u,"throw",e)}l(void 0)})}}n.d(t,"a",function(){return o})},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],s=!1,f=-1;function d(){s&&u&&(s=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!s){var e=l(d);s=!0;for(var t=c.length;t;){for(u=c,c=[];++f1)for(var n=1;n=0?(this.lastItem=this.list[t],this.list[t].val):void 0},r.prototype.set=function(e,t){var n;return this.lastItem&&this.isEqual(this.lastItem.key,e)?(this.lastItem.val=t,this):(n=this.indexOf(e))>=0?(this.lastItem=this.list[n],this.list[n].val=t,this):(this.lastItem={key:e,val:t},this.list.push(this.lastItem),this.size++,this)},r.prototype.delete=function(e){var t;if(this.lastItem&&this.isEqual(this.lastItem.key,e)&&(this.lastItem=void 0),(t=this.indexOf(e))>=0)return this.size--,this.list.splice(t,1)[0]},r.prototype.has=function(e){var t;return!(!this.lastItem||!this.isEqual(this.lastItem.key,e))||(t=this.indexOf(e))>=0&&(this.lastItem=this.list[t],!0)},r.prototype.forEach=function(e,t){var n;for(n=0;n0&&(f[s]={cacheItem:c,arg:arguments[s]},d?function(e,t){var n,r,o,i,a,l=e.length,u=t.length;for(r=0;re&&function(e){var t,n,r=e.length,o=e[r-1];for(o.cacheItem.delete(o.arg),n=r-2;n>=0&&(o=e[n],!(t=o.cacheItem.get(o.arg))||!t.size);n--)o.cacheItem.delete(o.arg)}(n.shift())),i.wasMemoized=d,i.numArgs=s+1,l};return i.limit=e,i.wasMemoized=!1,i.cache=t,i.lru=n,i}}},{"map-or-similar":1}]},{},[3])(3)},function(e,t,n){"use strict";(function(e,r){var o,i=n(22);o="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof e?e:r;var a=Object(i.a)(o);t.a=a}).call(this,n(17),n(18)(e))},function(e,t,n){e.exports=function e(t){"use strict";var n=/^\0+/g,r=/[\0\r\f]/g,o=/: */g,i=/zoo|gra/,a=/([,: ])(transform)/g,l=/,+\s*(?![^(]*[)])/g,u=/ +\s*(?![^(]*[)])/g,c=/ *[\0] */g,s=/,\r+?/g,f=/([\t\r\n ])*\f?&/g,d=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,p=/\W+/g,h=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,y=/:(read-only)/g,v=/\s+(?=[{\];=:>])/g,g=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,k=/([^\(])(:+) */g,x=/[svh]\w+-[tblr]{2}/,_=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,T=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,O=/([^-])(image-set\()/,P="-webkit-",N="-moz-",j="-ms-",A=59,I=125,R=123,z=40,M=41,L=91,D=93,F=10,U=13,W=9,$=64,V=32,B=38,H=45,q=95,Q=42,K=44,Y=58,G=39,X=34,J=47,Z=62,ee=43,te=126,ne=0,re=12,oe=11,ie=107,ae=109,le=115,ue=112,ce=111,se=105,fe=99,de=100,pe=112,he=1,me=1,ye=0,ve=1,ge=1,be=1,we=0,ke=0,xe=0,_e=[],Se=[],Te=0,Ee=null,Ce=-2,Oe=-1,Pe=0,Ne=1,je=2,Ae=3,Ie=0,Re=1,ze="",Me="",Le="";function De(e,t,o,i,a){for(var l,u,s=0,f=0,d=0,p=0,v=0,g=0,b=0,w=0,x=0,S=0,T=0,E=0,C=0,O=0,q=0,we=0,Se=0,Ee=0,Ce=0,Oe=o.length,Ue=Oe-1,qe="",Qe="",Ke="",Ye="",Ge="",Xe="";q0&&(Qe=Qe.replace(r,"")),Qe.trim().length>0)){switch(b){case V:case W:case A:case U:case F:break;default:Qe+=o.charAt(q)}b=A}if(1===Se)switch(b){case R:case I:case A:case X:case G:case z:case M:case K:Se=0;case W:case U:case F:case V:break;default:for(Se=0,Ce=q,v=b,q--,b=A;Ce0&&(++q,b=v);case R:Ce=Oe}}switch(b){case R:for(v=(Qe=Qe.trim()).charCodeAt(0),T=1,Ce=++q;q0&&(Qe=Qe.replace(r,"")),g=Qe.charCodeAt(1)){case de:case ae:case le:case H:l=t;break;default:l=_e}if(Ce=(Ke=De(t,l,Ke,g,a+1)).length,xe>0&&0===Ce&&(Ce=Qe.length),Te>0&&(l=Fe(_e,Qe,Ee),u=Be(Ae,Ke,l,t,me,he,Ce,g,a,i),Qe=l.join(""),void 0!==u&&0===(Ce=(Ke=u.trim()).length)&&(g=0,Ke="")),Ce>0)switch(g){case le:Qe=Qe.replace(_,Ve);case de:case ae:case H:Ke=Qe+"{"+Ke+"}";break;case ie:Ke=(Qe=Qe.replace(h,"$1 $2"+(Re>0?ze:"")))+"{"+Ke+"}",Ke=1===ge||2===ge&&$e("@"+Ke,3)?"@"+P+Ke+"@"+Ke:"@"+Ke;break;default:Ke=Qe+Ke,i===pe&&(Ye+=Ke,Ke="")}else Ke="";break;default:Ke=De(t,Fe(t,Qe,Ee),Ke,i,a+1)}Ge+=Ke,E=0,Se=0,O=0,we=0,Ee=0,C=0,Qe="",Ke="",b=o.charCodeAt(++q);break;case I:case A:if((Ce=(Qe=(we>0?Qe.replace(r,""):Qe).trim()).length)>1)switch(0===O&&((v=Qe.charCodeAt(0))===H||v>96&&v<123)&&(Ce=(Qe=Qe.replace(" ",":")).length),Te>0&&void 0!==(u=Be(Ne,Qe,t,e,me,he,Ye.length,i,a,i))&&0===(Ce=(Qe=u.trim()).length)&&(Qe="\0\0"),v=Qe.charCodeAt(0),g=Qe.charCodeAt(1),v){case ne:break;case $:if(g===se||g===fe){Xe+=Qe+o.charAt(q);break}default:if(Qe.charCodeAt(Ce-1)===Y)break;Ye+=We(Qe,v,g,Qe.charCodeAt(2))}E=0,Se=0,O=0,we=0,Ee=0,Qe="",b=o.charCodeAt(++q)}}switch(b){case U:case F:if(f+p+d+s+ke===0)switch(S){case M:case G:case X:case $:case te:case Z:case Q:case ee:case J:case H:case Y:case K:case A:case R:case I:break;default:O>0&&(Se=1)}f===J?f=0:ve+E===0&&i!==ie&&Qe.length>0&&(we=1,Qe+="\0"),Te*Ie>0&&Be(Pe,Qe,t,e,me,he,Ye.length,i,a,i),he=1,me++;break;case A:case I:if(f+p+d+s===0){he++;break}default:switch(he++,qe=o.charAt(q),b){case W:case V:if(p+s+f===0)switch(w){case K:case Y:case W:case V:qe="";break;default:b!==V&&(qe=" ")}break;case ne:qe="\\0";break;case re:qe="\\f";break;case oe:qe="\\v";break;case B:p+f+s===0&&ve>0&&(Ee=1,we=1,qe="\f"+qe);break;case 108:if(p+f+s+ye===0&&O>0)switch(q-O){case 2:w===ue&&o.charCodeAt(q-3)===Y&&(ye=w);case 8:x===ce&&(ye=x)}break;case Y:p+f+s===0&&(O=q);break;case K:f+d+p+s===0&&(we=1,qe+="\r");break;case X:case G:0===f&&(p=p===b?0:0===p?b:p);break;case L:p+f+d===0&&s++;break;case D:p+f+d===0&&s--;break;case M:p+f+s===0&&d--;break;case z:if(p+f+s===0){if(0===E)switch(2*w+3*x){case 533:break;default:T=0,E=1}d++}break;case $:f+d+p+s+O+C===0&&(C=1);break;case Q:case J:if(p+s+d>0)break;switch(f){case 0:switch(2*b+3*o.charCodeAt(q+1)){case 235:f=J;break;case 220:Ce=q,f=Q}break;case Q:b===J&&w===Q&&Ce+2!==q&&(33===o.charCodeAt(Ce+2)&&(Ye+=o.substring(Ce,q+1)),qe="",f=0)}}if(0===f){if(ve+p+s+C===0&&i!==ie&&b!==A)switch(b){case K:case te:case Z:case ee:case M:case z:if(0===E){switch(w){case W:case V:case F:case U:qe+="\0";break;default:qe="\0"+qe+(b===K?"":"\0")}we=1}else switch(b){case z:O+7===q&&108===w&&(O=0),E=++T;break;case M:0==(E=--T)&&(we=1,qe+="\0")}break;case W:case V:switch(w){case ne:case R:case I:case A:case K:case re:case W:case V:case F:case U:break;default:0===E&&(we=1,qe+="\0")}}Qe+=qe,b!==V&&b!==W&&(S=b)}}x=w,w=b,q++}if(Ce=Ye.length,xe>0&&0===Ce&&0===Ge.length&&0===t[0].length==0&&(i!==ae||1===t.length&&(ve>0?Me:Le)===t[0])&&(Ce=t.join(",").length+2),Ce>0){if(l=0===ve&&i!==ie?function(e){for(var t,n,o=0,i=e.length,a=Array(i);o1)){if(d=u.charCodeAt(u.length-1),p=n.charCodeAt(0),t="",0!==s)switch(d){case Q:case te:case Z:case ee:case V:case z:break;default:t=" "}switch(p){case B:n=t+Me;case te:case Z:case ee:case V:case M:case z:break;case L:n=t+n+Me;break;case Y:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(be>0){n=t+n.substring(8,f-1);break}default:(s<1||l[s-1].length<1)&&(n=t+Me+n)}break;case K:t="";default:n=f>1&&n.indexOf(":")>0?t+n.replace(k,"$1"+Me+"$2"):t+n+Me}u+=n}a[o]=u.replace(r,"").trim()}return a}(t):t,Te>0&&void 0!==(u=Be(je,Ye,l,e,me,he,Ce,i,a,i))&&0===(Ye=u).length)return Xe+Ye+Ge;if(Ye=l.join(",")+"{"+Ye+"}",ge*ye!=0){switch(2!==ge||$e(Ye,2)||(ye=0),ye){case ce:Ye=Ye.replace(y,":"+N+"$1")+Ye;break;case ue:Ye=Ye.replace(m,"::"+P+"input-$1")+Ye.replace(m,"::"+N+"$1")+Ye.replace(m,":"+j+"input-$1")+Ye}ye=0}}return Xe+Ye+Ge}function Fe(e,t,n){var r=t.trim().split(s),o=r,i=r.length,a=e.length;switch(a){case 0:case 1:for(var l=0,u=0===a?"":e[0]+" ";l0&&ve>0)return o.replace(d,"$1").replace(f,"$1"+Le);break;default:return e.trim()+o.replace(f,"$1"+e.trim())}default:if(n*ve>0&&o.indexOf("\f")>0)return o.replace(f,(e.charCodeAt(0)===Y?"":"$1")+e.trim())}return e+o}function We(e,t,n,r){var c,s=0,f=e+";",d=2*t+3*n+4*r;if(944===d)return function(e){var t=e.length,n=e.indexOf(":",9)+1,r=e.substring(0,n).trim(),o=e.substring(n,t-1).trim();switch(e.charCodeAt(9)*Re){case 0:break;case H:if(110!==e.charCodeAt(10))break;default:for(var i=o.split((o="",l)),a=0,n=0,t=i.length;a$&&f<90||f>96&&f<123||f===q||f===H&&c.charCodeAt(1)!==H))switch(isNaN(parseFloat(c))+(-1!==c.indexOf("("))){case 1:switch(c){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:c+=ze}}s[n++]=c}o+=(0===a?"":",")+s.join(" ")}}return o=r+o+";",1===ge||2===ge&&$e(o,1)?P+o+o:o}(f);if(0===ge||2===ge&&!$e(f,1))return f;switch(d){case 1015:return 97===f.charCodeAt(10)?P+f+f:f;case 951:return 116===f.charCodeAt(3)?P+f+f:f;case 963:return 110===f.charCodeAt(5)?P+f+f:f;case 1009:if(100!==f.charCodeAt(4))break;case 969:case 942:return P+f+f;case 978:return P+f+N+f+f;case 1019:case 983:return P+f+N+f+j+f+f;case 883:return f.charCodeAt(8)===H?P+f+f:f.indexOf("image-set(",11)>0?f.replace(O,"$1"+P+"$2")+f:f;case 932:if(f.charCodeAt(4)===H)switch(f.charCodeAt(5)){case 103:return P+"box-"+f.replace("-grow","")+P+f+j+f.replace("grow","positive")+f;case 115:return P+f+j+f.replace("shrink","negative")+f;case 98:return P+f+j+f.replace("basis","preferred-size")+f}return P+f+j+f+f;case 964:return P+f+j+"flex-"+f+f;case 1023:if(99!==f.charCodeAt(8))break;return c=f.substring(f.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),P+"box-pack"+c+P+f+j+"flex-pack"+c+f;case 1005:return i.test(f)?f.replace(o,":"+P)+f.replace(o,":"+N)+f:f;case 1e3:switch(s=(c=f.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(s)){case 226:c=f.replace(x,"tb");break;case 232:c=f.replace(x,"tb-rl");break;case 220:c=f.replace(x,"lr");break;default:return f}return P+f+j+c+f;case 1017:if(-1===f.indexOf("sticky",9))return f;case 975:switch(s=(f=e).length-10,d=(c=(33===f.charCodeAt(s)?f.substring(0,s):f).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(c.charCodeAt(8)<111)break;case 115:f=f.replace(c,P+c)+";"+f;break;case 207:case 102:f=f.replace(c,P+(d>102?"inline-":"")+"box")+";"+f.replace(c,P+c)+";"+f.replace(c,j+c+"box")+";"+f}return f+";";case 938:if(f.charCodeAt(5)===H)switch(f.charCodeAt(6)){case 105:return c=f.replace("-items",""),P+f+P+"box-"+c+j+"flex-"+c+f;case 115:return P+f+j+"flex-item-"+f.replace(T,"")+f;default:return P+f+j+"flex-line-pack"+f.replace("align-content","").replace(T,"")+f}break;case 973:case 989:if(f.charCodeAt(3)!==H||122===f.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?We(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):f.replace(c,P+c)+f.replace(c,N+c.replace("fill-",""))+f;break;case 962:if(f=P+f+(102===f.charCodeAt(5)?j+f:"")+f,n+r===211&&105===f.charCodeAt(13)&&f.indexOf("transform",10)>0)return f.substring(0,f.indexOf(";",27)+1).replace(a,"$1"+P+"$2")+f}return f}function $e(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10),o=e.substring(n+1,e.length-1);return Ee(2!==t?r:r.replace(E,"$1"),o,t)}function Ve(e,t){var n=We(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(S," or ($1)").substring(4):"("+t+")"}function Be(e,t,n,r,o,i,a,l,u,c){for(var s,f=0,d=t;f0&&(ze=o.replace(p,i===L?"":"-")),i=1,1===ve?Le=o:Me=o;var a,l=[Le];Te>0&&void 0!==(a=Be(Oe,n,l,l,me,he,0,0,0,0))&&"string"==typeof a&&(n=a);var u=De(_e,l,n,0,0);return Te>0&&void 0!==(a=Be(Ce,u,l,l,me,he,u.length,0,0,0))&&"string"!=typeof(u=a)&&(i=0),ze="",Le="",Me="",ye=0,me=1,he=1,we*i==0?u:u.replace(r,"").replace(v,"").replace(g,"$1").replace(b,"$1").replace(w," ")}return Qe.use=function e(t){switch(t){case void 0:case null:Te=Se.length=0;break;default:if("function"==typeof t)Se[Te++]=t;else if("object"==typeof t)for(var n=0,r=t.length;nA.length&&A.push(e)}function z(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case a:u=!0}}if(u)return r(o,t,""===n?"."+M(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;cthis.eventPool.length&&this.eventPool.push(e)}function fe(e){e.eventPool=[],e.getPooled=ce,e.release=se}o(ue.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ae)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ae)},persist:function(){this.isPersistent=ae},isPersistent:le,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=le,this._dispatchInstances=this._dispatchListeners=null}}),ue.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ue.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,fe(n),n},fe(ue);var de=ue.extend({data:null}),pe=ue.extend({data:null}),he=[9,13,27,32],me=H&&"CompositionEvent"in window,ye=null;H&&"documentMode"in document&&(ye=document.documentMode);var ve=H&&"TextEvent"in window&&!ye,ge=H&&(!me||ye&&8=ye),be=String.fromCharCode(32),we={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ke=!1;function xe(e,t){switch(e){case"keyup":return-1!==he.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function _e(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Se=!1;var Te={eventTypes:we,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(me)e:{switch(e){case"compositionstart":o=we.compositionStart;break e;case"compositionend":o=we.compositionEnd;break e;case"compositionupdate":o=we.compositionUpdate;break e}o=void 0}else Se?xe(e,n)&&(o=we.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=we.compositionStart);return o?(ge&&"ko"!==n.locale&&(Se||o!==we.compositionStart?o===we.compositionEnd&&Se&&(i=ie()):(re="value"in(ne=r)?ne.value:ne.textContent,Se=!0)),o=de.getPooled(o,t,n,r),i?o.data=i:null!==(i=_e(n))&&(o.data=i),B(o),i=o):i=null,(e=ve?function(e,t){switch(e){case"compositionend":return _e(t);case"keypress":return 32!==t.which?null:(ke=!0,be);case"textInput":return(e=t.data)===be&&ke?null:e;default:return null}}(e,n):function(e,t){if(Se)return"compositionend"===e||!me&&xe(e,t)?(e=ie(),oe=re=ne=null,Se=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1