diff --git a/Gruntfile.coffee b/Gruntfile.coffee old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE new file mode 100755 index 00000000..94a9ed02 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md old mode 100644 new mode 100755 index c7d440f5..0c44fde7 --- a/README.md +++ b/README.md @@ -1,48 +1,2 @@ -# doofinder-woocommerce - -Integrate Doofinder in your WooCommerce site with (almost) no effort. - -To learn more check the [plugin page](https://wordpress.org/plugins/doofinder-for-woocommerce/) in the WordPress Plugins Repository. - -## Developers - -### Docker - -``` -$ docker-compose up -``` - -#### Import test data - -In the WooCommerce importer choose _Show advanced options_ and use this path: - -``` -# previously: wp-content/plugins/woocommerce/dummy-data/dummy-data.csv -wp-content/plugins/woocommerce/sample-data/sample_products.csv -``` - -Then click _Run the importer_. - -### Update library - -The [Doofinder library](https://github.com/doofinder/php-doofinder) has some dependencies. - -To install them and perform some cleanup run: - -``` -$ ./update_lib.sh -``` - -That will: - -- Remove `doofinder-for-woocommerce/lib/vendor` -- Reinstall dependencies -- Remove some useless files -- Prefix libraries so they are all under the `Doofinder\` namespace to prevent conflicts with other plugins - -### Release - -``` -$ grunt # Changes version number -$ grunt build # Builds the release -``` +# doofinder-wordpress +Integrate Doofinder in your WordPress site with (almost) no effort. diff --git a/assets/icon-128x128.png b/assets/icon-128x128.png old mode 100644 new mode 100755 diff --git a/assets/icon-256x256.png b/assets/icon-256x256.png old mode 100644 new mode 100755 diff --git a/assets/screenshot-1.png b/assets/screenshot-1.png old mode 100644 new mode 100755 diff --git a/assets/screenshot-2.png b/assets/screenshot-2.png old mode 100644 new mode 100755 diff --git a/assets/screenshot-3.png b/assets/screenshot-3.png old mode 100644 new mode 100755 diff --git a/assets/screenshot-4.png b/assets/screenshot-4.png old mode 100644 new mode 100755 diff --git a/assets/screenshot-5.png b/assets/screenshot-5.png old mode 100644 new mode 100755 diff --git a/assets/screenshot-6.png b/assets/screenshot-6.png old mode 100644 new mode 100755 diff --git a/assets/screenshot-7.png b/assets/screenshot-7.png new file mode 100755 index 00000000..d8c7949d Binary files /dev/null and b/assets/screenshot-7.png differ diff --git a/assets/screenshot-8.png b/assets/screenshot-8.png new file mode 100755 index 00000000..3b4d9274 Binary files /dev/null and b/assets/screenshot-8.png differ diff --git a/docker-compose.yml b/docker-compose.yml index b6fac4d1..b2b086cf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: - db build: . volumes: - - ./html:/var/www/html + - ./html:/var/www/html/ restart: unless-stopped environment: WORDPRESS_DB_HOST: db:3306 diff --git a/docker/apache2-hello.sh b/docker/apache2-hello.sh old mode 100644 new mode 100755 diff --git a/docker/install-wordpress.sh b/docker/install-wordpress.sh old mode 100644 new mode 100755 diff --git a/doofinder-for-woocommerce/.gitignore b/doofinder-for-woocommerce/.gitignore new file mode 100755 index 00000000..320b5ee3 --- /dev/null +++ b/doofinder-for-woocommerce/.gitignore @@ -0,0 +1 @@ +/logs diff --git a/doofinder-for-woocommerce/assets/css/admin.css b/doofinder-for-woocommerce/assets/css/admin.css old mode 100644 new mode 100755 index 23173ec3..96c840a6 --- a/doofinder-for-woocommerce/assets/css/admin.css +++ b/doofinder-for-woocommerce/assets/css/admin.css @@ -1,76 +1,380 @@ -.doofinder-for-wc-welcome-screen .button { user-select: none; display: inline-block; padding: .575rem 2rem; margin: 0.8rem 0; vertical-align: middle; font-size: 1.3rem; font-weight: 400; line-height: 1.5; text-align: center; color: #fff; white-space: nowrap; border: 1px solid #c85b81; border-radius: 2px; background-color: #c85b81; cursor: pointer; } +.doofinder-for-wp-warning { + color: #ff9900; +} -.doofinder-for-wc-welcome-screen .button:hover { color: #fff; border-color: #a94769; background-color: #a94769; } +.doofinder-for-wp-progress-bar { + height: 25px; -.doofinder-for-wc-welcome-screen .button-error { background-color: #cc0000; } + margin: 20px 0; -.doofinder-for-wc-welcome-screen .button-error:hover { background-color: #dc320d; } + background-color: white; + background-image: linear-gradient(top, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; -.doofinder-for-wc-warning { color: #ff9900; } + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + border-radius: 0; -.doofinder-for-wc-progress-bar { height: 25px; margin: 20px 0; border-radius: 0; background-color: white; background-image: linear-gradient(top, #f5f5f5, #f9f9f9); background-repeat: repeat-x; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); overflow: hidden; } + overflow: hidden; +} -.doofinder-for-wc-progress-bar .doofinder-for-wc-bar { box-sizing: border-box; width: 0; height: 100%; background-color: #0e90d2; background-image: linear-gradient(top, #149bdf, #0480be); background-repeat: repeat-x; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); transition: width .15s ease; } +.doofinder-for-wp-progress-bar .doofinder-for-wp-bar { + box-sizing: border-box; -.doofinder-for-wc-progress-bar-status { color: #607d8b; } + width: 0; + height: 100%; -.doofinder-for-wc-progress-bar-status p { display: none; } + background-color: #0e90d2; + background-image: linear-gradient(top, #149bdf, #0480be); + background-repeat: repeat-x; + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -.doofinder-for-wc-progress-bar-status p.active { display: block; } + transition: width 0.15s ease; +} -.doofinder-for-wc-additional-messages { display: none; margin-bottom: 25px; color: #607d8b; } +.doofinder-for-wp-progress-bar-status { + color: #607d8b; +} -.doofinder-for-wc-additional-messages.active { display: block; } +.doofinder-for-wp-progress-bar-status p { + display: none; +} -.doofinder-for-wc-indexing-error { display: none; color: #cc0000; } +.doofinder-for-wp-progress-bar-status p.active { + display: block; +} -.dfwc-setup-step__progress-bar-wrapper .doofinder-for-wc-indexing-error { margin-bottom: 5px; font-size: 1.4rem; } +.doofinder-for-wp-additional-messages { + display: none; -.doofinder-for-wc-indexing-error.active { display: block; } + margin-bottom: 25px; -.doofinder-for-wc-spinner { float: none; } + color: #607d8b; +} -.form-table td { position: relative; } +.doofinder-for-wp-additional-messages.active { + display: block; +} -.doofinder-tooltip { display: inline-block; width: 16px; height: 16px; position: absolute; top: 21px; left: -17px; vertical-align: middle; font-size: 15px; line-height: 1; color: #666; cursor: help; } +.doofinder-for-wp-indexing-error { + display: none; -.doofinder-tooltip::after { content: "\f223"; width: 100%; height: 100%; position: absolute; top: 0; left: 0; font-family: Dashicons; line-height: 1; text-align: center; cursor: help; speak: none; } + color: #cc0000; +} -.doofinder-tooltip > span { pointer-events: none; min-width: 151px; max-width: 200px; padding: 7px 11px; position: absolute; z-index: 2; top: calc(100% + 8px); left: 50%; transform: translateX(calc(-50% + .5px)); font-size: 10px; line-height: 18px; text-align: center; color: #fff; border-radius: 3px; background: #333; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); cursor: default; opacity: 0; transition: opacity .3s; } +.doofinder-for-wp-indexing-error.active { + display: block; +} -.doofinder-tooltip > span::after { content: ''; width: 0; height: 0; position: absolute; top: -12px; left: 50%; transform: translateX(calc(-50% - .5px)); border: 6px solid transparent; border-bottom-color: #333; } +.doofinder-for-wp-spinner { + float: none; +} -.doofinder-tooltip:hover > span { opacity: 1; } +.form-table td { + position: relative; +} -p.description { font-style: normal; } +.doofinder-tooltip { + display: inline-block; -.custom-list li::before { content: '- '; } + height: 16px; + width: 16px; -/* Custom attributes */ -.doofinder-for-wc-attributes th, .doofinder-for-wc-attributes td { padding: 0 10px 0 0; } + vertical-align: middle; + position: absolute; + left: -17px; + top: 21px; + + font-size: 15px; + line-height: 1; + color: #666; + + cursor: help; +} + +.doofinder-tooltip::after { + content: "\f223"; + + width: 100%; + height: 100%; + + position: absolute; + top: 0; + left: 0; -.doofinder-for-wc-attributes [type=text], .doofinder-for-wc-attributes select { display: block; width: 100%; } + font-family: Dashicons; + text-align: center; + line-height: 1; -.doofinder-wc-additional-attributes th, .doofinder-wc-additional-attributes td { padding: 0; } + speak: none; + cursor: help; +} -.doofinder-wc-additional-attributes input, .doofinder-wc-additional-attributes select { width: 100% !important; } +.doofinder-tooltip > span { + max-width: 200px; + min-width: 151px; + padding: 7px 11px; -.doofinder-log { padding: 5px 10px; font-size: 12px; line-height: 14px; border: 1px solid grey; border-radius: 3px; } + position: absolute; + top: calc(100% + 8px); + left: 50%; + transform: translateX(calc(-50% + 0.5px)); + z-index: 2; -.doofinder-log .entry { padding: 5px 0; white-space: pre-wrap; border-bottom: 1px solid rgba(128, 128, 128, 0.3); } + text-align: center; + font-size: 10px; + line-height: 18px; + color: #fff; -.doofinder-log .entry:last-child { border: none; } + background: #333; + border-radius: 3px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); -.doofinder-search-settings-wrap input[readonly="readonly"], .doofinder-search-settings-wrap textarea[readonly="readonly"] { border: 0; background: transparent; } + cursor: default; + pointer-events: none; + opacity: 0; -.doofinder-search-settings-wrap input[readonly="readonly"]:focus, .doofinder-search-settings-wrap textarea[readonly="readonly"]:focus { box-shadow: none; } + transition: opacity 0.3s; +} -.doofinder-for-wc-welcome-screen { display: flex; flex-flow: column nowrap; align-items: center; padding: 8vw 0; text-align: center; } +.doofinder-tooltip > span::after { + content: ""; -.doofinder-for-wc-welcome-screen__icon img { width: 70px; margin-left: -20px; } + height: 0; + width: 0; -.doofinder-for-wc-welcome-screen__heading { margin: 1rem 0; font-size: 3.1rem; line-height: 1; font-weight: 400; } + position: absolute; + top: -12px; + left: 50%; + transform: translateX(calc(-50% - 0.5px)); -.doofinder-for-wc-welcome-screen__text h4 { margin: 1rem 0; font-size: 1.6rem; line-height: 1.375; font-weight: 400; } + border: 6px solid transparent; + border-bottom-color: #333; +} + +.doofinder-tooltip:hover > span { + opacity: 1; +} + +p.description { + font-style: normal; +} + +.custom-list li::before { + content: "- "; +} + +/* Custom attributes */ -.doofinder-for-wc-welcome-screen .button { display: block; font-size: 1.6rem; line-height: 2.15; } +.doofinder-for-wp-attributes th, +.doofinder-for-wp-attributes td { + padding: 0 10px 0 0; +} + +.doofinder-for-wp-attributes [type="text"], +.doofinder-for-wp-attributes select { + display: block; + width: 100%; +} + +/* +Indexation Status Notice +*/ + +.lds-spinner { + color: official; + display: inline-block; + position: relative; + width: 80px; + height: 80px; +} + +.lds-spinner div { + transform-origin: 40px 40px; + animation: lds-spinner 1.2s linear infinite; +} + +.lds-spinner div:after { + content: " "; + display: block; + position: absolute; + top: 3px; + left: 37px; + width: 6px; + height: 18px; + border-radius: 20%; + background: #000; +} + +.lds-spinner div:nth-child(1) { + transform: rotate(0deg); + animation-delay: -1.1s; +} + +.lds-spinner div:nth-child(2) { + transform: rotate(30deg); + animation-delay: -1s; +} + +.lds-spinner div:nth-child(3) { + transform: rotate(60deg); + animation-delay: -0.9s; +} + +.lds-spinner div:nth-child(4) { + transform: rotate(90deg); + animation-delay: -0.8s; +} + +.lds-spinner div:nth-child(5) { + transform: rotate(120deg); + animation-delay: -0.7s; +} + +.lds-spinner div:nth-child(6) { + transform: rotate(150deg); + animation-delay: -0.6s; +} + +.lds-spinner div:nth-child(7) { + transform: rotate(180deg); + animation-delay: -0.5s; +} + +.lds-spinner div:nth-child(8) { + transform: rotate(210deg); + animation-delay: -0.4s; +} + +.lds-spinner div:nth-child(9) { + transform: rotate(240deg); + animation-delay: -0.3s; +} + +.lds-spinner div:nth-child(10) { + transform: rotate(270deg); + animation-delay: -0.2s; +} + +.lds-spinner div:nth-child(11) { + transform: rotate(300deg); + animation-delay: -0.1s; +} + +.lds-spinner div:nth-child(12) { + transform: rotate(330deg); + animation-delay: 0s; +} + +@keyframes lds-spinner { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +.indexation-status.processing .status-processed { + display: none; +} + +.indexation-status.processed .status-processed { + display: block; +} + +.indexation-status.processed .status-processing { + display: none; +} + +.success-icon-wrapper img { + width: 50px; +} + +/* +Toggle +*/ +.df-toggle-switch { + position: relative; + display: inline-block; + width: 50px; + height: 24px; +} +.df-toggle-switch input { + opacity: 0; + width: 0; + height: 0; +} +.df-toggle-switch .toggle-slider { + position: absolute; + cursor: pointer; + border-radius: 50px; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + -webkit-transition: 0.4s; + transition: 0.4s; +} +.df-toggle-switch .toggle-slider:before { + border-radius: 50px; + position: absolute; + content: ""; + height: 16px; + width: 16px; + left: 4px; + bottom: 4px; + background-color: white; + -webkit-transition: 0.4s; + transition: 0.4s; +} +.df-toggle-switch input:checked + .toggle-slider { + background-color: #33268c; +} +.df-toggle-switch input:checked + .toggle-slider:before { + transform: translateX(26px); +} + +/* Notice styles */ +.df-notice .submit a { + margin: 5px !important; +} + +.df-notice-row { + display: flex; + align-items: center; +} + +.df-notice-row.flex-end { + display: flex-end; +} + +.df-notice-col.logo { + width: 100px; +} + +.df-notice-col.content { + flex-grow: 1; +} + +.df-notice-col.extra { + display: flex; + justify-content: flex-end; +} + +.df-notice-col.align-center { + align-self: center; +} + + +/* Update on save buton */ + +.update-on-save-btn .dashicons{ + padding-top: 3px; +} + +.update-result-wrapper{ + margin: 15px; + font-weight: bold; +} diff --git a/doofinder-for-woocommerce/assets/css/styles.css b/doofinder-for-woocommerce/assets/css/styles.css deleted file mode 100644 index 9fce452a..00000000 --- a/doofinder-for-woocommerce/assets/css/styles.css +++ /dev/null @@ -1,3 +0,0 @@ -.doofinder-for-woocommerce-search-banner { margin-bottom: 25px; } - -.doofinder-for-woocommerce-search-banner img { display: block; max-width: 100%; margin: 0 auto; } diff --git a/doofinder-for-woocommerce/assets/css/wizard.css b/doofinder-for-woocommerce/assets/css/wizard.css old mode 100644 new mode 100755 index 0d1e8b92..bc5b6871 --- a/doofinder-for-woocommerce/assets/css/wizard.css +++ b/doofinder-for-woocommerce/assets/css/wizard.css @@ -60,59 +60,59 @@ a:hover { color: #a94769; } .has-checkbox { font-size: 1rem; font-weight: normal; text-transform: initial; cursor: pointer; } -.dfwc-setup-steps { display: none; } +.df-setup-steps { display: none; } -.dfwc-setup-steps.active { display: block; } +.df-setup-steps.active { display: block; } -.dfwc-setup-step { display: flex; align-items: flex-start; padding: 0 0 2rem 0; position: relative; margin: 1rem 0; } +.df-setup-step { display: flex; align-items: flex-start; padding: 0 0 2rem 0; position: relative; margin: 1rem 0; } -.dfwc-setup-step:first-of-type { margin-top: 0; } +.df-setup-step:first-of-type { margin-top: 0; } -.dfwc-setup-step:last-of-type { margin-bottom: 0; } +.df-setup-step:last-of-type { margin-bottom: 0; } -.dfwc-setup-step:before { content: ""; display: block; width: 1px; height: calc(95% - 2.4rem); position: absolute; bottom: 0; left: 0.9rem; background-color: #e3e3e4; } +.df-setup-step:before { content: ""; display: block; width: 1px; height: calc(95% - 2.4rem); position: absolute; bottom: 0; left: 0.9rem; background-color: #e3e3e4; } -.dfwc-setup-step:last-of-type:before { display: none; } +.df-setup-step:last-of-type:before { display: none; } -.dfwc-setup-step__wrap { flex: 1; } +.df-setup-step__wrap { flex: 1; } -.dfwc-setup-step__content { display: none; padding: 1rem 0 0; } +.df-setup-step__content { display: none; padding: 1rem 0 0; } -.dfwc-setup-step.active .dfwc-setup-step__content { display: block; } +.df-setup-step.active .df-setup-step__content { display: block; } -.dfwc-setup-step__title { margin: 1rem 0; font-size: 1.6rem; line-height: 1; } +.df-setup-step__title { margin: 1rem 0; font-size: 1.6rem; line-height: 1; } -.dfwc-setup-step__title:first-of-type { margin-top: 0.3rem; } +.df-setup-step__title:first-of-type { margin-top: 0.3rem; } -.dfwc-setup-step.active .dfwc-setup-step__title { font-weight: 700; } +.df-setup-step.active .df-setup-step__title { font-weight: 700; } -.dfwc-setup-step__desc { margin: 1rem 0; line-height: 1; color: #777; font-size: 1.3rem; line-height: 1.07692; } +.df-setup-step__desc { margin: 1rem 0; line-height: 1; color: #777; font-size: 1.3rem; line-height: 1.07692; } -.dfwc-setup-step__number { display: flex; flex: 0 auto; align-items: center; justify-content: center; width: 2rem; height: auto; padding: 0; margin: 0 1rem 1rem 0; font-weight: 500; color: #333; border-radius: 50%; background-color: #e3e3e4; font-size: 1.4rem; line-height: 1; } +.df-setup-step__number { display: flex; flex: 0 auto; align-items: center; justify-content: center; width: 2rem; height: auto; padding: 0; margin: 0 1rem 1rem 0; font-weight: 500; color: #333; border-radius: 50%; background-color: #e3e3e4; font-size: 1.4rem; line-height: 1; } -.dfwc-setup-step__number:before { content: ""; margin-top: 100%; } +.df-setup-step__number:before { content: ""; margin-top: 100%; } -.dfwc-setup-step.active .dfwc-setup-step__number, .dfwc-setup-step.finished .dfwc-setup-step__number { color: #fff; background: #765da5; } +.df-setup-step.active .df-setup-step__number, .df-setup-step.finished .df-setup-step__number { color: #fff; background: #765da5; } -.dfwc-setup-step__actions { display: flex; align-items: center; justify-content: flex-start; } +.df-setup-step__actions { display: flex; align-items: center; justify-content: flex-start; } -@media screen and (max-width: 767px) { .dfwc-setup-step__actions { flex-flow: column nowrap; } } +@media screen and (max-width: 767px) { .df-setup-step__actions { flex-flow: column nowrap; } } -.indexing .dfwc-setup-step__actions { display: none; } +.indexing .df-setup-step__actions { display: none; } -.dfwc-setup-step__actions > * { display: block; margin-right: 1.5rem; } +.df-setup-step__actions > * { display: block; margin-right: 1.5rem; } -.dfwc-setup-step__progress-bar-wrapper { display: none; margin: 1.5rem 0; color: #c85b81; font-size: 1.3rem; line-height: 1.23077; } +.df-setup-step__progress-bar-wrapper { display: none; margin: 1.5rem 0; color: #c85b81; font-size: 1.3rem; line-height: 1.23077; } -.dfwc-setup-step__progress-bar-wrapper .small, .dfwc-setup-step__progress-bar-wrapper p, .dfwc-setup-step__progress-bar-wrapper div { font-size: 1.2rem; line-height: 1.25; } +.df-setup-step__progress-bar-wrapper .small, .df-setup-step__progress-bar-wrapper p, .df-setup-step__progress-bar-wrapper div { font-size: 1.2rem; line-height: 1.25; } -.dfwc-setup-step__progress-bar-wrapper.active { display: block; } +.df-setup-step__progress-bar-wrapper.active { display: block; } -.dfwc-setup-step .loading { color: #c85b81; } +.df-setup-step .loading { color: #c85b81; } -.doofinder-for-wc-progress-bar-status { color: #c85b81; } +.doofinder-progress-bar-status { color: #c85b81; } -.doofinder-for-wc-additional-messages { color: #9e9e9e; } +.doofinder-additional-messages { color: #9e9e9e; } .progress-bar { width: 100%; height: 3px; margin: 0.5rem 0; background: #e4e4e4; overflow: hidden; } @@ -122,18 +122,18 @@ a:hover { color: #a94769; } .notice, div.updated, div.error { margin: 1.5rem auto; } -.dfwc-setup-finished { display: none; } +.df-setup-finished { display: none; } -.dfwc-setup-finished.active { display: flex; flex-flow: column nowrap; align-items: center; justify-content: center; padding: 4rem 0 7rem; } +.df-setup-finished.active { display: flex; flex-flow: column nowrap; align-items: center; justify-content: center; padding: 4rem 0 7rem; } -.dfwc-setup-finished button { font-size: 1.5rem; } +.df-setup-finished button { font-size: 1.5rem; } -.dfwc-setup-finished__icon { margin: 2rem auto; font-size: 7.2rem; line-height: 1; } +.df-setup-finished__icon { margin: 2rem auto; font-size: 7.2rem; line-height: 1; } -.dfwc-setup-finished__title { margin: 1rem auto; font-size: 3.6rem; line-height: 1.16667; } +.df-setup-finished__title { margin: 1rem auto; font-size: 3.6rem; line-height: 1.16667; } -.dfwc-setup-finished__desc { margin: 0.8rem auto 2rem; font-size: 1.7rem; line-height: 1.35294; } +.df-setup-finished__desc { margin: 0.8rem auto 2rem; font-size: 1.7rem; line-height: 1.35294; } -.dfwc-setup-skip-main { margin: 0 auto; text-align: center; } +.df-setup-skip-main { margin: 0 auto; text-align: center; } -.dfwc-setup-step__actions select { height: 35px; } \ No newline at end of file +.df-setup-step__actions select { height: 35px; } \ No newline at end of file diff --git a/doofinder-for-woocommerce/assets/img/green_checkmark.png b/doofinder-for-woocommerce/assets/img/green_checkmark.png new file mode 100755 index 00000000..b542d4a1 Binary files /dev/null and b/doofinder-for-woocommerce/assets/img/green_checkmark.png differ diff --git a/doofinder-for-woocommerce/assets/img/waving-hand_light-skin-tone.png b/doofinder-for-woocommerce/assets/img/waving-hand_light-skin-tone.png deleted file mode 100644 index c71207df..00000000 Binary files a/doofinder-for-woocommerce/assets/img/waving-hand_light-skin-tone.png and /dev/null differ diff --git a/doofinder-for-woocommerce/assets/js/admin.js b/doofinder-for-woocommerce/assets/js/admin.js index 498d9052..4e0b4703 100644 --- a/doofinder-for-woocommerce/assets/js/admin.js +++ b/doofinder-for-woocommerce/assets/js/admin.js @@ -1,284 +1,75 @@ -jQuery(() => { - const $ = jQuery.noConflict(); - class ProgressBar { - constructor(bar) { - this.bar = bar.querySelector("[data-bar]"); - this.status = document.getElementById("progress-value"); - } - set(value) { - if (value < 0) { - value = 0; - } - if (value > 100) { - value = 100; - } - this.bar.style.width = `${value}%`; - if (this.status) { - this.status.innerText = `${Math.ceil(value)}`; - } - } - } - const button = document.getElementById("doofinder-for-wc-index-button"); - const spinner = document.getElementById("doofinder-for-wc-spinner"); - const progressBarElement = document.getElementById( - "doofinder-for-wc-progress-bar" - ); - const progressBarStatusElement = document.getElementById( - "doofinder-for-wc-progress-bar-status" - ); - const additionalMessagesElement = document.getElementById( - "doofinder-for-wc-additional-messages" - ); - const indexingError = document.getElementById( - "doofinder-for-wc-indexing-error" - ); - if (!button) { - return; - } - const progressBar = new ProgressBar(progressBarElement); - const maxRetries = 3; - let errorCount = 0; - const maxTimeout = 5 * 60 * 1000; - let currentTimeout = 0; - const indexContentTimeout = 5000; - let preparing = true; - const ajaxIndexContent = () => { - console.info("ajaxIndexContent - start"); - if (preparing) { - setProgressBarStatus(false, true); - } - console.info( - 'ajaxIndexContent - Current Language: "' + doofinderCurrentLanguage + '"' - ); - $.ajax({ - type: "POST", - dataType: "json", - url: DoofinderForWC.ajaxUrl, - data: { - action: "doofinder_for_wc_index_content", - lang: doofinderCurrentLanguage, - }, - }).then((response) => { - console.info("ajaxIndexContent - Ajax response"); - console.info(response); - if (!response.success) { - handleError(response); - return; - } - errorCount = 0; - currentTimeout = 0; - if ("progress" in response.data) { - updateProgressBar(response); - } - if ("message" in response.data) { - showAdditionalMessages(response); - } - if (!response.data.completed) { - ajaxIndexContent(); - return; - } - confirmLeavePage(false); - setMessageCookie(); - window.location.reload(); - }); - console.info("ajaxIndexContent - end"); - }; - const ajaxCreateSearchEngines = () => { - console.info("ajaxCreateSearchEngines - start"); - setProgressBarStatus(false, false, true); - $.ajax({ - type: "POST", - dataType: "json", - url: DoofinderForWC.ajaxUrl, - data: { - action: "doofinder_for_wc_process_step_3", - lang: doofinderCurrentLanguage, - process_step: "3", - }, - }).then((response) => { - console.info("ajaxCreateSearchEngines - Ajax response"); - console.info(response); - if (!response.success) { - handleError(response); - return; - } - if ("message" in response.data) { - showAdditionalMessages(response); - } - ajaxIndexContent(); - }); - console.info("ajaxCreateSearchEngines - End"); - }; - const handleError = (response) => { - if (response.data && response.data.status === "indexing_in_progress") { - currentTimeout += indexContentTimeout; - } else { - errorCount++; - } - if ("message" in response.data) { - showAdditionalMessages(response); - } - if ( - errorCount > maxRetries || - currentTimeout > maxTimeout || - response.data.error - ) { - if ( - response.data.status !== "invalid_search_engine" && - response.data.status !== "not_authenticated" - ) { - indexingError.classList.add("active"); - } - button.disabled = false; - spinner.style.display = ""; - spinner.style.visibility = ""; - errorCount = 0; - currentTimeout = 0; - setProgressBarStatus(); - preparing = true; - confirmLeavePage(false); - } else { - setTimeout(() => { - ajaxIndexContent(); - }, indexContentTimeout); - } - }; - const updateProgressBar = (response) => { - progressBar.set(response.data.progress); - setProgressBarStatus(true); - preparing = false; - }; - const showAdditionalMessages = (response) => { - const errorClass = "doofinder-for-wc-indexing-error"; - additionalMessagesElement.classList.add("active"); - if (response.data.error) { - additionalMessagesElement.classList.add(errorClass); - } else { - additionalMessagesElement.classList.remove(errorClass); - } - additionalMessagesElement.innerText = response.data.message; - }; - const setProgressBarStatus = ( - indexing = false, - preparing = false, - creatingEngines = false - ) => { - console.info("setProgressBarStatus"); - const indexingStatus = progressBarStatusElement.querySelector(".indexing"); - const preparingStatus = - progressBarStatusElement.querySelector(".preparing"); - const creatingEnginesStatus = - progressBarStatusElement.querySelector(".creating-engines"); - if (indexing) { - indexingStatus.classList.add("active"); - } else { - indexingStatus.classList.remove("active"); - } - if (preparing) { - preparingStatus.classList.add("active"); - } else { - preparingStatus.classList.remove("active"); - } - if (creatingEngines) { - creatingEnginesStatus.classList.add("active"); - } else { - creatingEnginesStatus.classList.remove("active"); - } - }; - const confirmLeavePage = (active = true) => { - if (active) { - window.onbeforeunload = () => ""; - } else { - window.onbeforeunload = () => null; - } - }; - const setMessageCookie = () => { - document.cookie = "doofinder_wc_show_success_message=true"; - }; - const initAjaxIndexContent = () => { - window.initAjaxIndexContentLoaded = true; - $(button).click(() => { - indexingError.classList.remove("active"); - button.disabled = true; - spinner.style.display = "inline-block"; - spinner.style.visibility = "visible"; - confirmLeavePage(); - if ( - typeof createSearchEnginesBeforeIndexing !== "undefined" && - createSearchEnginesBeforeIndexing - ) { - ajaxCreateSearchEngines(); - } else { - ajaxIndexContent(); - } - }); - }; - initAjaxIndexContent(); -}); -jQuery(() => { - const $ = jQuery.noConflict(); - const cancelButton = document.querySelector( - "#doofinder-for-wc-cancel-indexing" - ); - if (!cancelButton) { - return; - } - cancelButton.addEventListener("click", (e) => { - e.preventDefault(); - $.ajax({ - type: "POST", - dataType: "json", - url: DoofinderForWC.ajaxUrl, - data: { - action: "doofider_for_wc_cancel_indexing", - }, - }).then(() => { - window.location.reload(); - }); - }); -}); -jQuery(() => { - const deleteButtons = document.querySelectorAll( - ".doofinder-for-wc-delete-attribute-btn" - ); - if (!deleteButtons.length) { - return; - } - deleteButtons.forEach((button) => { - button.addEventListener("click", (event) => { - event.preventDefault(); - button.closest("tr").remove(); - }); - }); -}); -jQuery(() => { - const skipButtons = document.querySelectorAll(".dfwc-setup-skip"); - const currentForm = document.querySelector(".dfwc-setup-finished"); - if (!skipButtons.length && !currentForm) { - return; - } - skipButtons.forEach((button) => { - button.addEventListener("click", (event) => { - event.preventDefault(); - currentForm.submit(); - }); - }); -}); -jQuery(() => { - const inputUrls = document.querySelectorAll(".dfwc-url-input"); - if (!inputUrls.length) { - return; - } - inputUrls.forEach((item) => { - const urlPattern = new RegExp( - /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/ - ); - item.onblur = inputBlur; - function inputBlur() { - if (urlPattern.test(String(item.value).toLowerCase()) == true) { - item.value = item.value.replace("https://", "").replace("http://", ""); - item.value = "https://" + item.value; - } - } - }); -}); +jQuery(function () { + let $ = jQuery.noConflict(); + let indexingCheckInterval = null; + let ajaxIndexingStatus = function () { + $.ajax({ + type: "post", + dataType: "json", + url: ajaxurl, + data: { + action: "doofinder_check_indexing_status", + }, + success: function (response) { + if (response.status === "processed") { + $(".indexation-status").toggleClass("processing processed"); + //Enable Layer switch + $("input[name='doofinder_for_wp_enable_js_layer']").attr("checked", true) + clearInterval(indexingCheckInterval); + } + }, + }); + }; + + if (Doofinder.show_indexing_notice === "true") { + indexingCheckInterval = setInterval(ajaxIndexingStatus, 10000); + } + + let UpdateOnSaveHandler = function () { + force_update_btn.attr('disabled', true); + $.ajax({ + type: "post", + dataType: "json", + url: ajaxurl, + data: { + action: "doofinder_force_update_on_save", + }, + success: function (response) { + message = "Error updating your data, please try again layer"; + if (response.success) { + message = "Your data is being updated..."; + } + $(".update-result-wrapper") + .hide() + .empty() + .append(message) + .fadeIn(); + + setTimeout(function () { + $(".update-result-wrapper").fadeOut(); + $(".update-result-wrapper").empty(); + force_update_btn.attr('disabled', false); + }, 5000); + }, + }); + }; + + let force_update_btn = $("#force-update-on-save"); + force_update_btn.on("click", UpdateOnSaveHandler); + + $("body").on( + "click", + ".notice.doofinder.is-dismissible .notice-dismiss", + function () { + let notice_id = $(this).parents('.notice.doofinder').attr("id"); + $.ajax({ + type: "post", + dataType: "json", + url: ajaxurl, + data: { + action: "doofinder_notice_dismiss", + notice_id: notice_id, + } + }); + } + ); +}); diff --git a/doofinder-for-woocommerce/assets/js/df-add-to-cart.js b/doofinder-for-woocommerce/assets/js/df-add-to-cart.js old mode 100644 new mode 100755 index bb6c057c..3f228e78 --- a/doofinder-for-woocommerce/assets/js/df-add-to-cart.js +++ b/doofinder-for-woocommerce/assets/js/df-add-to-cart.js @@ -1,68 +1,68 @@ (function ($) { - $(document).ready(function () { - document.addEventListener("doofinder.cart.add", function (event) { - const { item_id, amount } = event.detail; - addProductToCart(item_id, amount); + $(document).ready(function () { + document.addEventListener("doofinder.cart.add", function (event) { + const { item_id, amount } = event.detail; + addProductToCart(item_id, amount); + }); }); - }); - function addProductToCart(item_id, amount) { - amount = !amount ? 1 : parseInt(amount); - item_id = parseInt(item_id); + function addProductToCart(item_id, amount) { + amount = !amount ? 1 : parseInt(amount); + item_id = parseInt(item_id); - $.ajax({ - type: "post", - url: df_cart.ajax_url, - dataType: "json", - data: { - action: "doofinder_get_product_info", - id: item_id, - }, - success: function (response) { - if (response.add_to_cart) { - wc_add_to_cart(response.product, response.variation, amount); - } else { - window.location = response.product_url; - return; - } - }, - }); - } + $.ajax({ + type: "post", + url: df_cart.ajax_url, + dataType: "json", + data: { + action: "doofinder_get_product_info", + id: item_id, + }, + success: function (response) { + if (response.add_to_cart) { + wc_add_to_cart( + response.product, + response.variation, + amount + ); + } else { + window.location = response.product_url; + } + }, + }); + } - function wc_add_to_cart(product_id, variation_id, product_qty) { - var data = { - action: "doofinder_ajax_add_to_cart", - product_id: product_id, - quantity: product_qty, - variation_id: variation_id, - }; + function wc_add_to_cart(product_id, variation_id, product_qty) { + var data = { + action: "doofinder_ajax_add_to_cart", + product_id: product_id, + quantity: product_qty, + variation_id: variation_id, + }; - $fakebutton = $(""); + $fakebutton = $(""); - $(document.body).trigger("adding_to_cart", [$fakebutton, data]); + $(document.body).trigger("adding_to_cart", [$fakebutton, data]); - $.ajax({ - type: "post", - url: df_cart.ajax_url, - data: data, - success: function (response) { - if (response.error & response.product_url) { - window.location = response.product_url; - return; - } else { - if (typeof(wc_add_to_cart_params) != 'undefined') { - //Woocommerce cart is included, trigger add to cart event - $(document.body).trigger("added_to_cart", [ - response.fragments, - response.cart_hash, - $fakebutton, - ]); - } else { - //No woocommerce cart, reload the page - location.reload(); - } - } - }, - }); - } + $.ajax({ + type: "post", + url: df_cart.ajax_url, + data: data, + success: function (response) { + if (response.error & response.product_url) { + window.location = response.product_url; + } else if (typeof wc_add_to_cart_params != "undefined") { + //Woocommerce cart is included, trigger add to cart event + $(document.body).trigger("added_to_cart", [ + response.fragments, + response.cart_hash, + $fakebutton, + ]); + } else { + //No woocommerce cart, reload the page + location.reload(); + } + }, + }); + } })(jQuery); diff --git a/doofinder-for-woocommerce/assets/js/wizard.js b/doofinder-for-woocommerce/assets/js/wizard.js old mode 100644 new mode 100755 index 4a7e96af..a19e9754 --- a/doofinder-for-woocommerce/assets/js/wizard.js +++ b/doofinder-for-woocommerce/assets/js/wizard.js @@ -1,121 +1,117 @@ -jQuery(() => { - const $ = jQuery.noConflict(); - - let connectModal; - - const popupCenter = ({ url, title, w, h }) => { - const dualScreenLeft = - window.screenLeft !== undefined ? window.screenLeft : window.screenX; - const dualScreenTop = - window.screenTop !== undefined ? window.screenTop : window.screenY; - const width = window.innerWidth - ? window.innerWidth - : document.documentElement.clientWidth - ? document.documentElement.clientWidth - : screen.width; - const height = window.innerHeight - ? window.innerHeight - : document.documentElement.clientHeight - ? document.documentElement.clientHeight - : screen.height; - const systemZoom = width / window.screen.availWidth; - const left = (width - w) / 2 / systemZoom + dualScreenLeft; - const top = (height - h) / 2 / systemZoom + dualScreenTop; - const newWindow = window.open( - url, - title, - ` - scrollbars=yes, - width=${w / systemZoom}, - height=${h / systemZoom}, - top=${top}, - left=${left} - ` - ); - - if (window.focus) { - newWindow.focus(); - } - - return newWindow; - }; - - const confirmLeavePage = (active = true) => { - if (active) { - window.onbeforeunload = () => ""; - } else { - window.onbeforeunload = () => null; - } - }; - - $("#doofinder-for-wc-index-button").click(() => { - const progressBarWrapper = $(".dfwc-setup-step__progress-bar-wrapper").get( - 0 - ); - progressBarWrapper.classList.add("active"); - progressBarWrapper.parentElement.classList.add("indexing"); - }); - - $(".open-window").click((e) => { - const pageType = $(e.currentTarget).attr("data-type"); - connectModal = popupCenter({ - url: `${doofinderAdminPath}/plugins/${pageType}/woocommerce?email=${doofinderConnectEmail}&token=${doofinderConnectToken}`, - title: "DoofinderConnect", - w: 600, - h: 700, - }); - }); - - window.addEventListener( - "message", - (event) => { - const doofinder_regex = /.*\.doofinder\.com/gm; - //Check that the sender is doofinder - if (!doofinder_regex.test(event.origin)) return; - if (event.data) { - data = event.data.split("|"); - event_name = data[0]; - event_data = JSON.parse(atob(data[1])); - processMessage(event_name, event_data); - } - }, - false - ); - - function processMessage(name, data) { - if (name === "set_doofinder_data") send_connect_data(data); - } - - function send_connect_data(data) { - data["action"] = "doofinder_set_connection_data"; - $.ajax({ - type: "POST", - dataType: "json", - url: DoofinderForWC.ajaxUrl, - data: data, - success: function (response) { - if (response.success) { - confirmLeavePage(false); - window.location.href = doofinderSetupWizardUrl; - return; - } else { - set_errors(response.errors); - } - }, - }); - } - - function set_errors(errors) { - $(".errors-wrapper ul").remove(); - if (errors) { - errors_html = "
    "; - for (er in errors) { - error = errors[er]; - errors_html += "
  • " + error + "
  • "; - } - errors_html += "
"; - $(".errors-wrapper").append(errors_html); - $(".errors-wrapper").show(); - } - } -}); +jQuery(() => { + const $ = jQuery.noConflict(); + + let connectModal; + + const popupCenter = ({ url, title, w, h }) => { + const dualScreenLeft = + window.screenLeft !== undefined + ? window.screenLeft + : window.screenX; + const dualScreenTop = + window.screenTop !== undefined ? window.screenTop : window.screenY; + const width = window.innerWidth + ? window.innerWidth + : document.documentElement.clientWidth + ? document.documentElement.clientWidth + : screen.width; + const height = window.innerHeight + ? window.innerHeight + : document.documentElement.clientHeight + ? document.documentElement.clientHeight + : screen.height; + const systemZoom = width / window.screen.availWidth; + const left = (width - w) / 2 / systemZoom + dualScreenLeft; + const top = (height - h) / 2 / systemZoom + dualScreenTop; + const newWindow = window.open( + url, + title, + ` + scrollbars=yes, + width=${w / systemZoom}, + height=${h / systemZoom}, + top=${top}, + left=${left} + ` + ); + + if (window.focus) { + newWindow.focus(); + } + + return newWindow; + }; + + const confirmLeavePage = (active = true) => { + if (active) { + window.onbeforeunload = () => ""; + } else { + window.onbeforeunload = () => null; + } + }; + + $(".open-window").click((e) => { + const pageType = $(e.currentTarget).attr("data-type"); + connectModal = popupCenter({ + url: `${doofinderAdminPath}/plugins/${pageType}/wordpress?token=${doofinderConnectToken}`, // Change in future task endpoint name in doomanager. + title: "DoofinderConnect", + w: 600, + h: 700, + }); + }); + + window.addEventListener( + "message", + (event) => { + const doofinder_regex = /.*\.doofinder\.com/gm; + //Check that the sender is doofinder + if (!doofinder_regex.test(event.origin)) return; + if (event.data) { + data = event.data.split("|"); + event_name = data[0]; + event_data = JSON.parse(atob(data[1])); + processMessage(event_name, event_data); + } + }, + false + ); + + function processMessage(name, data) { + if (name === "set_doofinder_data") send_connect_data(data); + } + + function send_connect_data(data) { + data["action"] = "doofinder_set_connection_data"; + $.ajax({ + type: "POST", + dataType: "json", + url: Doofinder.ajaxUrl, + data: data, + success: function (response) { + if (response.success) { + confirmLeavePage(false); + window.location.href = doofinderSetupWizardUrl; + return; + } else if (response.data.errors) { + set_errors(response.data.errors); + } else { + set_errors(response.errors); + } + }, + }); + } + + function set_errors(errors) { + $(".errors-wrapper ul").remove(); + if (errors) { + errors_html = "
    "; + for (er in errors) { + error = errors[er]; + errors_html += "
  • " + error + "
  • "; + } + errors_html += "
"; + $(".errors-wrapper").append(errors_html); + $(".errors-wrapper").show(); + } + } +}); diff --git a/doofinder-for-woocommerce/assets/svg/imagotipo1.svg b/doofinder-for-woocommerce/assets/svg/imagotipo1.svg old mode 100644 new mode 100755 diff --git a/doofinder-for-woocommerce/doofinder-for-woocommerce.php b/doofinder-for-woocommerce/doofinder-for-woocommerce.php index a5dca1a6..dc279175 100644 --- a/doofinder-for-woocommerce/doofinder-for-woocommerce.php +++ b/doofinder-for-woocommerce/doofinder-for-woocommerce.php @@ -1,440 +1,480 @@ get_route() === "/wp/v2/product_cat") { + $terms = $result->data; + foreach ($terms as $key => $term) { + // get the thumbnail id using the queried category term_id + $thumbnail_id = get_term_meta($term['id'], 'thumbnail_id', true); + $term['image_link'] = empty($thumbnail_id) ? "" : wp_get_attachment_url($thumbnail_id); + $result->data[$key] = $term; + } } + return $result; + }, 10, 3); + }); - /* - * Class name after and path after the plugins prefix. - */ - $relative_class = substr($class, $len); - - /* - * Class names and folders are lowercase and hyphen delimited. - */ - $relative_class = strtolower(str_replace('_', '-', $relative_class)); - - /* - * WordPress coding standards state that files containing classes should begin - * with 'class-' prefix. Also, we are looking specifically for .php files. - */ - $classes = explode('\\', $relative_class); - $last_element = end($classes); - $classes[count($classes) - 1] = "class-$last_element.php"; - $filename = $dir . implode('/', $classes); - - if (file_exists($filename)) { - require_once $filename; - } - }); - } + add_action('plugins_loaded', array($class, 'plugin_update')); + self::initialize_rest_endpoints(); - /** - * Get the plugin path. - * - * @since 1.0.0 - * @return string - */ - public static function plugin_path() - { - return plugin_dir_path(__FILE__); + if (is_admin()) { + Admin_Notices::init(); } + } - /** - * Get the plugin URL. - * - * @since 1.0.0 - * @return string - */ - public static function plugin_url() - { - return plugin_dir_url(__FILE__); - } + /** + * Autoload custom classes. Folders represent namespaces (after the predefined plugin prefix), + * and files containing classes begin with "class-" prefix, so for example following file: + * example-folder/class-example.php + * Contains following class: + * Doofinder\WP\Example_Folder\Example + * + * @since 1.0.0 + * + * @param string $dir Root directory of libraries (where to begin lookup). + */ + public static function autoload($dir) + { + $self = __CLASS__; + spl_autoload_register(function ($class) use ($self, $dir) { + $prefix = 'Doofinder\\WP\\'; + + /* + * Check if the class uses the plugins namespace. + */ + $len = strlen($prefix); + if (strncmp($prefix, $class, $len) !== 0) { + return; + } - /** - * Initialize all functionalities that register custom URLs. - * - * @since 1.0.0 - */ - public static function register_urls() - { - Data_Feed::register(); - Config::register(); - } + /* + * Class name after and path after the plugins prefix. + */ + $relative_class = substr($class, $len); + + /* + * Class names and folders are lowercase and hyphen delimited. + */ + $relative_class = strtolower(str_replace('_', '-', $relative_class)); + + /* + * WordPress coding standards state that files containing classes should begin + * with 'class-' prefix. Also, we are looking specifically for .php files. + */ + $classes = explode('\\', $relative_class); + $last_element = end($classes); + $classes[count($classes) - 1] = "class-$last_element.php"; + $filename = $dir . implode('/', $classes); + + if (file_exists($filename)) { + require_once $filename; + } + }); + } - /* Plugin activation and deactivation *****************************************/ + /** + * Get the plugin path. + * + * @since 1.0.0 + * @return string + */ + public static function plugin_path() + { + return plugin_dir_path(__FILE__); + } + /** + * Get the plugin URL. + * + * @since 1.0.0 + * @return string + */ + public static function plugin_url() + { + return plugin_dir_url(__FILE__); + } - /** - * Activation Hook to configure routes and so on - * - * @since 1.0.0 - * @return void - */ - public static function plugin_enabled() - { - self::autoload(self::plugin_path() . 'includes/'); - self::register_urls(); - flush_rewrite_rules(); + /** + * Initialize all functionalities that register custom URLs. + * + * @since 1.0.0 + */ + public static function register_urls() + { + Platform_Confirmation::register(); + } - $log = new Log(); - $log->log('plugin enabled'); + /* Plugin activation and deactivation *****************************************/ - if (Setup_Wizard::should_activate()) { - Setup_Wizard::activate(true); - } + /** + * Activation Hook to configure routes and so on + * + * @since 1.0.0 + * @return void + */ + public static function plugin_enabled() + { + $df_wc_plugin = 'doofinder/doofinder.php'; + if (is_plugin_active($df_wc_plugin)) + deactivate_plugins($df_wc_plugin); - if (Setup_Wizard::should_show_notice()) { - Setup_Wizard::add_notice(); - } + self::autoload(self::plugin_path() . 'includes/'); + self::register_urls(); + flush_rewrite_rules(); - if (Setup_Wizard::should_migrate()) { - Setup_Wizard::migrate(); - } - } + Update_On_Save::create_update_on_save_db(); + Update_On_Save::activate_update_on_save_task(); - /** - * Deactivation Hook to flush routes - * - * @since 1.0.0 - * @return void - */ - public static function plugin_disabled() - { - flush_rewrite_rules(); - - $log = new Log(); - $log->log('plugin disabled'); - Setup_Wizard::remove_notice(); - //Reset migration status - Setup_Wizard::remove_migration_notice(); - update_option(Setup_Wizard::$wizard_migration_option, ''); - } + $log = new Log(); + $log->log('Plugin enabled'); - /** - * Declare compatibility with WC features. - * - * @return void - */ - public static function declare_wc_compatibility() { - if ( class_exists( FeaturesUtil::class ) ) { - FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); - } + if (Setup_Wizard::should_activate()) { + Setup_Wizard::activate(true); } + } - /** - * This function runs when WordPress completes its upgrade process - * It iterates through each plugin updated to see if ours is included - * - * @param array $upgrader_object - * @param array $options - */ - public static function upgrader_process_complete($upgrader_object, $options) - { - $log = new Log(); - $log->log('upgrader_process - start'); - // The path to our plugin's main file - $our_plugin = plugin_basename(__FILE__); - - $log->log($our_plugin); - $log->log($options); - - // If an update has taken place and the updated type is plugins and the plugins element exists - if ($options['action'] == 'update' && $options['type'] == 'plugin') { - - $log->log('upgrader_process - updating plugin'); - - if (isset($options['plugins'])) { - $plugins = $options['plugins']; - } elseif (isset($options['plugin'])) { - $plugins = [$options['plugin']]; - } + /** + * Deactivation Hook to flush routes + * + * @since 1.0.0 + * @return void + */ + public static function plugin_disabled() + { + flush_rewrite_rules(); + Update_On_Save::clean_update_on_save_db(); + Update_On_Save::delete_update_on_save_db(); + Update_On_Save::deactivate_update_on_save_task(); + } - $log->log($plugins); - // Iterate through the plugins being updated and check if ours is there - foreach ($plugins as $plugin) { - $log->log($plugin); + public static function plugin_update() + { + if (Settings::get_plugin_version() != self::$version) { + Update_Manager::check_updates(self::$version); + } + } + + /** + * This function runs when WordPress completes its upgrade process + * It iterates through each plugin updated to see if ours is included + * + * @param array $upgrader_object + * @param array $options + */ + public static function upgrader_process_complete($upgrader_object, $options) + { + $log = new Log(); + $log->log('upgrader_process - start'); + // The path to our plugin's main file + $our_plugin = plugin_basename(__FILE__); - if ($plugin == $our_plugin) { + $log->log($our_plugin); + $log->log($options); - if (Setup_Wizard::should_activate()) { - Setup_Wizard::activate(); - } + // If an update has taken place and the updated type is plugins and the plugins element exists + if ($options['action'] == 'update' && $options['type'] == 'plugin') { - if (Setup_Wizard::should_show_notice()) { - Setup_Wizard::add_notice(); - } + $log->log('upgrader_process - updating plugin'); - $log->log('upgrader_process - try to migrate'); - // Try to migrate settings if possible and necessary - if (Setup_Wizard::should_migrate()) { - Setup_Wizard::migrate(); - } - } - } + if (isset($options['plugins'])) { + $plugins = $options['plugins']; + } elseif (isset($options['plugin'])) { + $plugins = [$options['plugin']]; } - } - /** - * Add settings link next to deactivate on plugin's page in admin panel - * - * @since 1.0.0 - * @return string - */ - public static function plugin_add_settings_link($links) - { - $links['settings'] = '' . __('Settings', 'woocommerc-doofinder') . ''; - - return array_reverse($links); // array reverse to display "Settings" link first + $log->log($plugins); } + } - public static function plugin_update() - { - if (Settings::get_plugin_version() != self::$version) { - Update_Manager::check_updates(self::$version); - } - } + public static function register_admin_scripts_and_styles() + { + add_action('admin_enqueue_scripts', function () { + wp_enqueue_script('doofinder-admin-js', plugins_url('assets/js/admin.js', __FILE__)); + wp_localize_script('doofinder-admin-js', 'Doofinder', [ + 'show_indexing_notice' => Setup_Wizard::should_show_indexing_notice() ? 'true' : 'false' + ]); + + // CSS + wp_enqueue_style('doofinder-admin-css', Doofinder_For_WordPress::plugin_url() . '/assets/css/admin.css'); + }); } - endif; + public static function initialize_rest_endpoints() + { + add_action('rest_api_init', function () { + Config::register(); + register_rest_route('doofinder/v1', '/index-status', array( + 'methods' => 'POST', + 'callback' => function (\WP_REST_Request $request) { + $log = new Log('index-status.log'); + $log->log("Received indexing status request with payload:\n" . print_r($request, true)); + $valid_message = "Sources were processed successfully."; + if ($request->get_param('token') != Settings::get_api_key()) { + return new WP_REST_Response( + [ + 'status' => 401, + 'response' => "Invalid token" + ], + 401 + ); + } - register_activation_hook(__FILE__, array('\Doofinder\WC\Doofinder_For_WooCommerce', 'plugin_enabled')); - register_deactivation_hook(__FILE__, array('\Doofinder\WC\Doofinder_For_WooCommerce', 'plugin_disabled')); + $error_message = $request->get_param('message'); + if (!empty($error_message) && $error_message != $valid_message) { + Setup_Wizard::dismiss_indexing_notice(); + Admin_Notices::add_notice("indexing-status-failed", __("The indexation failed", "wordpress-doofinder"), $error_message, 'error', null, '', true); + + return new WP_REST_Response( + [ + 'status' => 200, + 'indexing_status' => 'failed', + 'response' => $request->get_param('message') + ] + ); + } - add_action('plugins_loaded', array('\Doofinder\WC\Doofinder_For_WooCommerce', 'instance'), 0); - add_action('upgrader_process_complete', array('\Doofinder\WC\Doofinder_For_WooCommerce', 'upgrader_process_complete'), 10, 2); - add_filter('plugin_action_links_' . plugin_basename(__FILE__), array('\Doofinder\WC\Doofinder_For_WooCommerce', 'plugin_add_settings_link')); + $multilanguage = Multilanguage::instance(); + $lang = ($multilanguage->get_current_language() === $multilanguage->get_base_language()) ? "" : $multilanguage->get_current_language(); + //Hide the indexing notice + Setup_Wizard::dismiss_indexing_notice(); + Settings::set_indexing_status('processed', $lang); + // Enable JS Layer for the indexed language + Settings::enable_js_layer($lang); + + return new WP_REST_Response( + [ + 'status' => 200, + 'indexing_status' => Settings::get_indexing_status($lang), + 'response' => "Indexing status updated" + ] + ); + }, + 'permission_callback' => '__return_true' + )); + }); + } -else : + /** + * Register an ajax action that processes wizard step 2 and creates search engines. + * + * + * @since 1.0.0 + */ + private static function register_ajax_action() + { + //Check Indexing status + add_action('wp_ajax_doofinder_check_indexing_status', function () { + $multilanguage = Multilanguage::instance(); + $lang = ($multilanguage->get_current_language() === $multilanguage->get_base_language()) ? "" : $multilanguage->get_current_language(); + wp_send_json([ + 'status' => Settings::get_indexing_status($lang) + ]); + exit; + }); + //Force Update on save + add_action('wp_ajax_doofinder_force_update_on_save', function () { + do_action("doofinder_update_on_save"); + wp_send_json([ + 'success' => true + ]); + exit; + }); + + //Force Update on save + add_action('wp_ajax_doofinder_notice_dismiss', function () { + $notice_id = $_POST['notice_id']; + Admin_Notices::remove_notice($notice_id); + wp_send_json([ + 'success' => true + ]); + exit; + }); + } + + public static function add_schedules() + { + return [ + 'wp_doofinder_each_15_minutes' => [ + 'display' => sprintf(__('Each %s minutes', 'doofinder_for_wp'), 15), + 'interval' => 60 * 15 + ], + 'wp_doofinder_each_30_minutes' => [ + 'display' => sprintf(__('Each %s minutes', 'doofinder_for_wp'), 30), + 'interval' => 60 * 30 + ], + 'wp_doofinder_each_60_minutes' => [ + 'display' => __('Each hour', 'doofinder_for_wp'), + 'interval' => HOUR_IN_SECONDS + ], + 'wp_doofinder_each_2_hours' => [ + 'display' => sprintf(__('Each %s hours', 'doofinder_for_wp'), 2), + 'interval' => HOUR_IN_SECONDS * 2 + ], + 'wp_doofinder_each_6_hours' => [ + 'display' => sprintf(__('Each %s hours', 'doofinder_for_wp'), 6), + 'interval' => HOUR_IN_SECONDS * 6 + ], + 'wp_doofinder_each_12_hours' => [ + 'display' => sprintf(__('Each %s hours', 'doofinder_for_wp'), 12), + 'interval' => HOUR_IN_SECONDS * 12 + ], + 'wp_doofinder_each_day' => [ + 'display' => __('Each day', 'doofinder_for_wp'), + 'interval' => DAY_IN_SECONDS + ] + ]; + } + } - // Doofinder requires WooCommerce plugin installed - add_action('admin_notices', function () { +endif; -?>

log('-------- API FACTORY - GET -----------'); - - if ( self::$instance && !$get_new ) { - $log->log('API FACTORY - GET - Instance already exists'); - return self::$instance; - } - - $multilang = Multilanguage::instance(); - - $base_language = $multilang->get_base_language(); - - $language = $language === $base_language ? '' : $language; - - //$log->log('API FACTORY - GET - LANG : ' . $language ); - - // Use real API in production. - // Dump data to local log file when in development. - - $is_debug_mode = Helpers::is_debug_mode(); - - if ($is_debug_mode) { - - $log->log( 'API FACTORY - DEBUG MODE IS ENABLED' ); - } - - if ( $is_debug_mode ) { - self::$instance = new Local_Dump($language); - } else { - self::$instance = new Doofinder_Api($language); - } - - return self::$instance; - } -} diff --git a/doofinder-for-woocommerce/includes/api/class-api-status.php b/doofinder-for-woocommerce/includes/api/class-api-status.php deleted file mode 100644 index c3a4bae5..00000000 --- a/doofinder-for-woocommerce/includes/api/class-api-status.php +++ /dev/null @@ -1,79 +0,0 @@ -error->code) && isset($exception_body->error->message)) { - return array( - 'status' => $exception_body->error->code, - 'message' => $api_message . ' ' .$exception_body->error->message, - 'error' => true - ); - } - - return false; - } -} diff --git a/doofinder-for-woocommerce/includes/api/class-api-wrapper.php b/doofinder-for-woocommerce/includes/api/class-api-wrapper.php deleted file mode 100644 index 31c3efd1..00000000 --- a/doofinder-for-woocommerce/includes/api/class-api-wrapper.php +++ /dev/null @@ -1,53 +0,0 @@ -language = $language; - - // Get global disable_api_calls flag - $this->disable_api = Doofinder_For_WooCommerce::$disable_api_calls ?? $this->disable_api; - - $this->log = new Log('api.txt' ); - //$this->log->log( '------------- Doofinder API construct ------------' ); - - if ($this->disable_api) { - $this->log->log( '------------- API IS DISABLED ------------- ' ); - } - - $this->api_key = Settings::get_api_key(); - $this->api_host = Settings::get_api_host(); - $language_key = Helpers::get_language_from_locale($language); - $this->hash = Settings::get_search_engine_hash($language_key); - - - if ( ! $this->api_key || ! $this->hash || !$this->api_host ) { - $this->log->log( 'Doofinder Api: Api key or Api host or Hash ID is missing.' ); - - return Api_Status::$unknown_error; - } - - $this->client = false; - $this->search_engine = false; - - try { - $this->log->log( 'Crate Api Client' ); - $this->log->log( 'API Key: ' . $this->api_key ); - $this->log->log( 'API Host: ' . $this->api_host ); - $this->client = new Client($this->api_host, $this->api_key); - } catch ( \Exception $exception ) { - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - } - - if ( $this->client ) { - $this->client = new Throttle( $this->client ); - //$this->log->log( 'Wrap Client in Throttle' ); - } - - try { - $this->search_engine = $this->get_search_engine(); - $this->log->log($this->search_engine); - } catch ( NotFound $exception ) { - - $this->log->log( 'Could not get search engine - Not Found' ); - $this->log->log( 'Status code: ' . $exception->getCode() ); - $this->log->log( $exception->getMessage() ); - $this->log->log( get_class($exception)); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - - $this->search_engine_api_status = Api_Status::$invalid_search_engine; - - } catch ( NotAllowed $exception ) { - - $this->log->log( 'Could not get search engine - Not Allowed' ); - $this->log->log( 'Status code: ' . $exception->getCode() ); - $this->log->log( $exception->getMessage() ); - $this->log->log( get_class($exception)); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - - $this->search_engine_api_status = Api_Status::$not_authenticated; - - } catch ( \Exception $exception ) { - - $this->log->log( 'Could not get search engine - Unknown' ); - $this->log->log( 'Status code: ' . $exception->getCode() ); - $this->log->log( $exception->getMessage() ); - $this->log->log( get_class($exception)); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - - $this->search_engine_api_status = Api_Status::$unknown_error; - - } - - //$this->log->log( '------------- Doofinder API End construct ------------- ' ); - } - - /** - * Update the data of a single item in the API. - * - * @param string $item_type - * @param int $id - * @param array $data - * @param int $update_time Timestamp of the update time - * - * @return mixed - */ - public function update_item( $item_type, $id, $data, $update_time = null ) { - $this->log->log('Update Item' . "\n"); - // Doofinder API throws exceptions if something goes wrong. - try { - if ( ! $this->search_engine ) { - $this->log->log( 'Update Item: Invalid search engine.' ); - - return $this->search_engine_api_status; - } - - // Update item in Doofinder index. - - $this->log->log('Update Item - Try update item' . "\n"); - $this->log->log( $item_type ); - $this->log->log( $id ); - $this->log->log( $data ); - $this->log->log( $this->hash ); - - if (!$this->disable_api) { - $this->log->log('=== API CALL === '); - $this->client->updateItem($this->hash, $id, $item_type, json_encode($data)); - $this->api_calls++; - } - Settings::set_last_modified_index($this->language, $update_time); - - $this->log->log('Update Item - Item updated' . "\n"); - return Api_Status::$success; - - } catch ( BadRequest $exception ) { - // If updating item failed it might mean that the post does not exist in the - // index yet, so we will try to create it instead - - $this->log->log('Update Item - Exception 1' . "\n"); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - - // Item type may not exist, but is required. - // Let's create it. - - try { - // Lets first try to create type if it doesn't exist - $this->maybe_create_type( $item_type ); - - $this->log->log('Update Item - Try Create item' . "\n"); - - if (!$this->disable_api) { - $this->log->log('=== API CALL === '); - $this->client->createItem($this->hash, $item_type, json_encode($data)); - $this->api_calls++; - } - Settings::set_last_modified_index($this->language, $update_time); - - $this->log->log('Update Item - Item created' . "\n"); - return Api_Status::$success; - - } catch ( \Exception $exception ) { - - $this->log->log('Update Item - Item does not exist or cannot create item.' . "\n"); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - - return Api_Status::$bad_request; - - } - - } catch ( \Exception $exception ) { - $this->log->log('Update Item - Exception 2' . "\n"); - $this->log->log( get_class($exception)); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - - return Api_Status::$unknown_error; - } - } - - /** - * Remove given item from indexing. - * - * @param string $item_type - * @param int $id - * @param int $update_time Timestamp of the update time - * - * @return mixed - */ - public function remove_item( $item_type, $id, $update_time = null ) { - $this->log->log('Remove item' . "\n"); - // Doofinder API throws exceptions if something goes wrong. - try { - if ( ! $this->search_engine ) { - $this->log->log( 'Remove item: Invalid search engine.' ); - - return $this->search_engine_api_status; - } - - // Remove item from Doofinder index. - - $this->log->log('Remove Item - Try delete item' . "\n"); - $this->log->log( $item_type ); - $this->log->log( $id ); - $this->log->log( $this->hash ); - - if (!$this->disable_api) { - $this->log->log('=== API CALL === '); - $this->client->deleteItem($this->hash, $id, $item_type); - $this->api_calls++; - } - Settings::set_last_modified_index($this->language, $update_time); - - $this->log->log('Remove Item - Item deleted' . "\n"); - return Api_Status::$success; - - } catch ( \Exception $exception ) { - $this->log->log('Remove Item - Exception' . "\n"); - $this->log->log( get_class($exception)); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - - return Api_Status::$unknown_error; - } - } - - /** - * @inheritdoc - */ - public function send_batch( $items_type, array $items, $language = null ) { - $this->log->log( 'Start Send Batch' . "\n" ); - $this->log->log( 'Send batch - items type: "' . $items_type .'"' ); - $this->log->log( 'Send batch - language: "' . $language . '"' ); - - // Doofinder API will throw an exception in case of invalid token - // or something like that. - - // Check if we need to add the type in our own status. - // This should reduce the number of requests made to the - // Doofinder API. - $indexing_data = Indexing_Data::instance(); - - try { - if ( ! $this->search_engine ) { - $this->log->log( 'Send batch: Invalid search engine.' ); - $this->log->log( 'Send batch: API Status: ' . $this->search_engine_api_status ); - return $this->search_engine_api_status; - } - - $this->log->log( 'Send Batch - Temp Index Status' ); - $this->log->log( $indexing_data->get('temp_index') ); - - if ( ! $indexing_data->has( 'temp_index', $items_type ) ) { - try { - $this->create_index($items_type); - } catch (\Exception $ex) { - if($ex->getMessage() === Api_Status::$unknown_error){ - return Api_Status::$unknown_error; - } - } - } - - $this->log->log( 'Send Batch - Before Create Bulk Temp Index Status' ); - - $temp_index = $indexing_data->get('temp_index'); - $this->log->log( $temp_index ); - $this->log->log(json_encode($items)); - - if (!$this->disable_api) { - $this->log->log('=== API CALL === '); - $this->client->createTempBulk( - $this->hash, - $items_type, //index_name - json_encode($items) - ); - $this->api_calls++; - } - - $this->log->log( 'Send batch - Batch Sent' ); - $this->log->log( 'Send batch - API CALLS ------ : ' . $this->api_calls ); - - return Api_Status::$success; - - } catch ( NotFound $exception ) { - //The API returned that the temporary index wasn't found, we'll reset temp_index and call send_batch again - $this->log->log( 'Temp index not found, reset temp_index and retry' . "\n" ); - $indexing_data->set( 'temp_index', [], true ); - return $this->send_batch( $items_type, $items, $language ); - } catch ( \Exception $exception ) { - $this->log->log( 'Send Batch - Exception 1' . "\n" ); - $this->log->log( get_class($exception)); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - - // Show doofinder api response message for user in the backend - $response_status = Api_Status::get_api_response_status($exception->getMessage(),$exception->getBody()); - if ( $response_status ) { - return $response_status; - } - } - - return Api_Status::$unknown_error; - } - - $this->log->log('End Send Batch' . "\n"); - } - - public function create_index($items_type){ - $this->log->log('Send batch - createTemporaryIndex' . "\n"); - // Try to create the temp index. - try { - $this->create_temporary_index($items_type); - } catch ( NotFound $exception ) { - // If real index does not exists creating temp index will fail, - // So we need to create real index first - $this->create_real_index($items_type); - - // Finally try to create temp index - try { - $this->create_temporary_index($items_type); - } catch ( \Exception $exception ) { - // For some reason Index could not be created. - $this->log->log('Send batch - Temp Index NOT Created' . "\n"); - $this->log->log( get_class($exception)); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - throw new \Exception(Api_Status::$unknown_error); - - } - } catch ( \Exception $exception ) { - // Temp Index could not be created it probably exists already. Move on. - $this->log->log('Send batch - Temp Index probably exists already' . "\n"); - $this->log->log( get_class($exception)); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - } - } - - public function create_temporary_index($items_type){ - $indexing_data = Indexing_Data::instance(); - - $this->log->log('Send batch - Try to create Temp Index' . "\n"); - if (!$this->disable_api) { - $this->log->log('=== API CALL === '); - $this->client->createTemporaryIndex( $this->hash, $items_type ); - $this->api_calls++; - } - $this->log->log('Send batch - Temp Index Created' . "\n"); - - // Mark it in our status. - $indexing_data->set( 'temp_index', $items_type ); - } - - public function create_real_index($items_type){ - $this->log->log('Send batch - Exception - Real Index Not Found' . "\n"); - - try { - $this->log->log('Send batch - Try to create Real Index' . "\n"); - if (!$this->disable_api) { - $this->log->log('=== API CALL === '); - // Prepare index data - $body = [ - 'name' => $items_type, - 'preset' => 'product' - ]; - $this->client->createIndex( $this->hash, json_encode($body) ); - $this->api_calls++; - } - $this->log->log('Send batch - Real Index Created' . "\n"); - } catch ( \Exception $exception ) { - // For some reason Index could not be created. - $this->log->log('Send batch - Real Index NOT Created' . "\n"); - $this->log->log( get_class($exception)); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - throw new \Exception(Api_Status::$unknown_error); - } - } - - /** - * @inheritdoc - */ - public function remove_types() { - $this->log->log('Remove types' . "\n"); - - // This is not needed in API v2, because of using temp indexes - - /* if ( ! $this->search_engine ) { - $this->log->log( 'Remove types: Invalid search engine.' ); - - return $this->search_engine_api_status; - } - - // Doofinder API will throw an exception in case of invalid token - // or something like that. - try { - $this->search_engine->deleteType( Settings::get_post_types_to_index() ); - - return Api_Status::$success; - } catch ( \Exception $exception ) { - // This exception is thrown after we've sent request to delete a type - // and the server is not finished processing it yet. - // We'll have to retry the request in a moment. - - $this->log->log( $exception->getMessage() ); - - return Api_Status::$indexing_in_progress; - } catch ( \Exception $exception ) { - $this->log->log( $exception->getMessage() ); - - return Api_Status::$unknown_error; - } */ - return null; - } - - /** - * Retrieve search engine based on keys from settings. - * - * @return SearchEngine - * @throws \Exception - */ - private function get_search_engine() { - $this->log->log('Start Get search engine' . "\n"); - - if (!$this->disable_api) { - $this->log->log('=== API CALL === '); - /** @var SearchEngine[] $search_engine */ - $this->log->log( 'Get search engine - hash: ' . $this->hash); - - $search_engine = $this->client->getSearchEngine($this->hash); - $this->api_calls++; - } else { - $search_engine = true; - } - - $this->log->log('Search Engine: '); - $this->log->log($search_engine); - - if ($search_engine) { - $this->log->log( 'End Get search engine - success' . "\n" ); - return $search_engine; - } - - $this->log->log( 'End Get search engine - failed' . "\n"); - // We have not found the selected search engine. - // Most likely user provided a wrong hash. - return null; - } - - /** - * Add a type to the index, if the type does not exist yet. - * - * @param string $item_type - */ - private function maybe_create_type( $item_type ) { - $this->log->log('Maybe create type : ' . $item_type . "\n"); - $this->log->log('Maybe create type - listIndices' . "\n"); - - if (!$this->disable_api) { - $this->log->log('=== API CALL === '); - try { - $types = $this->client->listIndices($this->hash); - $this->api_calls++; - } catch (\Exception $exception) { - $this->log->log('Maybe create type - Exception 1'); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - } - } - - $this->log->log('Indices: ' . "\n"); - - $typesList = []; - - foreach($types as $type) { - $typesList[] = $type->name; - } - - $this->log->log( $typesList ); - - - if ( ! in_array( $item_type, $typesList ) ) { - $this->log->log('Maybe create type - createIndex' . "\n"); - - if (!$this->disable_api) { - $this->log->log('=== API CALL === '); - - // Prepare request body - $body = [ - 'name' => $item_type, - 'preset' => $item_type - ]; - - try { - $this->client->createIndex( $this->hash, json_encode($body) ); - $this->api_calls++; - } catch (\Exception $exception) { - // The index probably exists already or could not be created - // Move on - $this->log->log('Maybe create type - Exception 2'); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - } - } - } else { - $this->log->log('Maybe create type - index already exists' . "\n"); - } - } - - /** - * Replace real index with temporary one. - * - * @param string $index_name Name of the index to replace - */ - public function replace_index( $index_name ) { - $this->log->log('Replace Index Start' . "\n"); - - try { - if ( ! $this->search_engine ) { - $this->log->log( 'Replace Index - Invalid search engine.' ); - - return $this->search_engine_api_status; - } - $indexing_data = Indexing_Data::instance(); - - // Clear internal status of the temp index - $this->log->log( 'Replace Index - Clear Inner Temp Index Status' ); - $indexing_data->set( 'temp_index', [], true ); - $this->log->log( $indexing_data->get( 'temp_index')); - - // Replace index - $this->log->log( 'Replace Index - Replace with: ' . $index_name ); - - if (!$this->disable_api) { - $this->log->log('=== API CALL === '); - $this->client->replace($this->hash, $index_name ); - $this->api_calls++; - } - Settings::set_last_modified_index($this->language); - - $this->log->log( 'Replace Index - "'.$index_name.'" index replaced successfully' ); - $this->log->log( 'Replace Index - API CALLS ------ : ' . $this->api_calls ); - - return Api_Status::$success; - - } catch ( \Exception $exception ) { - $this->log->log('Replace Index - Exception' . "\n"); - $this->log->log( get_class($exception)); - $this->log->log( $exception->getMessage() ); - - if ( $exception instanceof DoofinderError ) { - $this->log->log( $exception->getBody() ); - } - - return Api_Status::$unknown_error; - } - } - - - /** - * Create index body array used as parameter in $this->client->createIndex($has,$index_body) - * - * @param string $item_type - */ - public function create_index_body( $item_type ) { - - $index_body = [ - 'name' => $item_type, - 'preset' => $item_type - ]; - $index_body = json_encode($index_body); - - $this->log->log('Index body: ' . $index_body); - - return $index_body; - } -} diff --git a/doofinder-for-woocommerce/includes/api/class-local-dump.php b/doofinder-for-woocommerce/includes/api/class-local-dump.php deleted file mode 100644 index f3e5531f..00000000 --- a/doofinder-for-woocommerce/includes/api/class-local-dump.php +++ /dev/null @@ -1,170 +0,0 @@ -language = Multilanguage::instance(); - $this->log = new Log( 'api.txt' ); - //$this->log->log( 'Local_Dump construct' ); - } - - /** - * Update the data of a single item in the API. - * - * @param string $item_type - * @param int $id - * @param array $data - * - * @return mixed - */ - public function update_item( $item_type, $id, $data ) { - // Fail the API call if we want to test something. - if ( $this->should_fail ) { - return Api_Status::$unknown_error; - } - - $this->log->log( 'Update Item' ); - - $status = 'Updating a post'; - if ( $this->language->get_active_language() ) { - $status .= ' - ' . $this->language->get_active_language(); - } - - $this->log->log( $status ); - $this->log->log( $item_type ); - $this->log->log( $id ); - $this->log->log( $data ); - - return Api_Status::$success; - } - - /** - * Remove given item from indexing. - * - * @param string $item_type - * @param int $id - * - * @return mixed - */ - public function remove_item( $item_type, $id ) { - // Fail the API call if we want to test something. - if ( $this->should_fail ) { - return Api_Status::$unknown_error; - } - - $this->log->log( 'Remove Item' ); - - $status = 'Removing post from index'; - if ( $this->language->get_active_language() ) { - $status .= ' - ' . $this->language->get_active_language(); - } - - $this->log->log( $status ); - $this->log->log( $item_type ); - $this->log->log( $id ); - - return Api_Status::$success; - } - - /** - * @inheritdoc - */ - public function send_batch( $items_type, array $items ) { - // Fail the API call if we want to test something. - - if ( $this->should_fail ) { - return Api_Status::$unknown_error; - } - - $this->log->log( 'Send batch' ); - - // Fake updating the status. - $indexing_data = Indexing_Data::instance(); - if ( ! $indexing_data->has( 'temp_index', $items_type ) ) { - $this->log->log( 'Send batch - create index: ' . $items_type ); - // Mark it in our status. - $indexing_data->set( 'temp_index', $items_type ); - } - - $this->log->log( 'Send batch - generate items: ' ); - - $itemsTitles = []; - foreach($items as $item) { - $itemsTitles[] = $item['title']; - } - $this->log->log( $itemsTitles ); - - $this->log->log( 'Send batch - sent. ' ); - - return Api_Status::$success; - } - - /** - * @inheritdoc - */ - public function remove_types() { - // Fail the API call if we want to test something. - if ( $this->should_fail ) { - return Api_Status::$unknown_error; - } - - $this->log->log('- Removing all post types -'); - - return Api_Status::$success; - } - - /** - * @inheritdoc - */ - public function replace_index( $index_name ) { - // Fail the API call if we want to test something. - if ( $this->should_fail ) { - return Api_Status::$unknown_error; - } - - $this->log->log( 'Replace Index' ); - - $indexing_data = Indexing_Data::instance(); - - // Clear internal status of the temp index - $indexing_data->set( 'temp_index', [] ); - - $this->log->log('- Replacing real index with temp index -'); - $this->log->log('- Deleting temp index -'); - - return Api_Status::$success; - } -} diff --git a/doofinder-for-woocommerce/includes/api/class-store-api.php b/doofinder-for-woocommerce/includes/api/class-store-api.php index 1be3ed46..e430d0e0 100644 --- a/doofinder-for-woocommerce/includes/api/class-store-api.php +++ b/doofinder-for-woocommerce/includes/api/class-store-api.php @@ -1,37 +1,56 @@ disable_api = Doofinder_For_WooCommerce::$disable_api_calls ?? $this->disable_api; - $this->log = new Log('stores-api.txt'); - if ($this->disable_api) { - $this->log->log('------------- API IS DISABLED ------------- '); - } - $this->api_key = Settings::get_api_key(); - $this->admin_host = Settings::get_admin_endpoint(); //This api + $this->api_host = Settings::get_api_host(); $this->log->log('------------- API HOST ------------- '); $this->log->log($this->api_host); @@ -49,80 +68,341 @@ public function __construct() public function create_store($api_keys) { if (is_array($api_keys)) { - $primary_language = get_locale(); - if ($this->language->is_active()) { - $primary_language = $this->language->get_base_language(); - } - $primary_language = $this->format_language_code($primary_language); + $store_payload = $this->build_store_payload($api_keys); + $this->log->log("store_data: "); + $this->log->log($store_payload); + return $this->sendRequest("plugins/create-store", $store_payload); + } + } - $domain = str_ireplace('www.', '', parse_url(get_bloginfo('url'), PHP_URL_HOST)); + /** + * Sends a request to update the store options with the api password and to create any missing datatype + * Payload example: + * $payload = array( + * 'store_options' => array( + * 'url' => 'http://pedro-wordpress.ngrok.doofinder.com', + * 'api_pass' => 'G41cXNeVoX4JGL2bhvbcMlQ4', + * 'api_user' => 'pedro' + * ), + * 'search_engines' => array( + * 'fde92a8f364b8d769262974e95d82dba' => array( + * 'feed_type' => 'post', + * 'url' => 'http://pedro-wordpress.ngrok.doofinder.com' + * ) + * ) + * ) + * @return void + */ + public function normalize_store_and_indices() + { + $wizard = Setup_Wizard::instance(); + $api_keys = Setup_Wizard::are_api_keys_present($wizard->process_all_languages, $wizard->language); - $store_data = [ - "name" => get_bloginfo('name'), - "platform" => "woocommerce", - "primary_language" => $primary_language, - "skip_indexation" => true, - "search_engines" => [], - "sector" => Settings::get_sector() + if (!Multilanguage::$is_multilang) { + $api_keys = [ + '' => [ + 'hash' => Settings::get_search_engine_hash() + ] ]; + } + + $store_payload = $this->build_store_payload($api_keys); + + $payload = [ + 'store_options' => $store_payload['options'] + ]; - foreach ($api_keys as $item) { - if ($item['hash'] === 'no-hash') { - //Prioritize the locale code - $code = $item['lang']['locale'] ?? $item['lang']['code'] ?? $primary_language; - $code = $this->format_language_code($code); - // Prepare search engine body - $this->log->log('Wizard Step 2 - Prepare Search Enginge body : '); - $store_data["search_engines"][] = [ - 'name' => $domain . ($code ? ' (' . strtoupper($code) . ')' : ''), - 'language' => $code, - 'currency' => get_woocommerce_currency(), - 'site_url' => get_bloginfo('url'), - 'datatypes' => [ - [ - "name" => "product", - "preset" => "product" - ] - ] - ]; - } + foreach ($store_payload['search_engines'] as $search_engine) { + $lang = Helpers::get_language_from_locale($search_engine['language']); + + //If the installation is not multilanguage, replace the lang with '' + if (is_a($this->language, No_Language_Plugin::class) || $lang === $this->language->get_base_language()) { + $lang = ''; } - $this->log->log("store_data: "); - $this->log->log($store_data); + $se_hashid = Settings::get_search_engine_hash($lang); + $payload['search_engines'][$se_hashid] = $search_engine['datatypes'][0]['datasources'][0]['options']; + } - $response = $this->sendRequest("POST", "plugins/create-store", $store_data); - return $this->process_response($response); + $this->log->log("Sending request to normalize indices."); + $response = $this->sendRequest("plugins/wordpress/normalize-indices/", $payload); + if (array_key_exists('errors', $response)) { + $this->log->log("The store and indices normalization has failed!"); + $this->log->log(print_r($response['errors'], true)); + } else { + $this->log->log("The store and indices normalization has finished succesfully!"); + $this->log->log("Response: \n" . print_r($response, true)); } + } - throw new Exception("API keys must be an array"); + /** + * This method checks if there is an application password set. + * + * @return boolean + */ + public static function has_application_credentials() + { + return WP_Application_Passwords::application_name_exists_for_user(get_current_user_id(), 'doofinder'); } - public function sendRequest($method, $endpoint, $body) + /** + * Send a POST request with the given $body to the given $endpoint. + * + * @param string $endpoint The endpoint url. + * @param array $body The array containing the payload to be sent. + * @return array The request decoded response + */ + private function sendRequest($endpoint, $body) { - $client = new GuzzleClient(); - $uri = "{$this->admin_host}/{$endpoint}"; - $options = [ + $data = [ 'headers' => [ - 'Authorization' => "Token {$this->api_key}" + 'Authorization' => "Token {$this->api_key}", + 'Content-Type' => 'application/json; charset=utf-8' ], - 'json' => $body + 'body' => json_encode($body), + 'method' => 'POST', + 'data_format' => 'body', + 'timeout' => 20 + ]; + + $url = "{$this->api_host}/{$endpoint}"; + $this->log->log("Making a request to: $url"); + $response = wp_remote_post($url, $data); + $response_code = wp_remote_retrieve_response_code($response); + + if (is_wp_error($response)) { + $error_message = $response->get_error_message(); + throw new Exception($error_message, (int)$response->get_error_code()); + } + + if ($response_code < 200 || $response_code >= 400) { + $error_message = wp_remote_retrieve_response_message($response); + throw new Exception($error_message, $response_code); + } + + $response_body = wp_remote_retrieve_body($response); + $decoded_response = json_decode($response_body, true); + return $decoded_response; + } + + /** + * Generates the create-store payload + * + * @param array $api_keys The list of search engine ids + * @return void + */ + private function build_store_payload($api_keys) + { + $primary_language = $this->get_primary_language(); + + $store_payload = [ + "name" => get_bloginfo('name'), + "platform" => is_plugin_active('woocommerce/woocommerce.php') ? "woocommerce" : "wordpress", + "primary_language" => $primary_language, + "search_engines" => [], + "sector" => Settings::get_sector(), + "callback_urls" => $this->get_callback_urls($api_keys, $primary_language), + "options" => $this->get_store_options(), + "search_engines" => $this->build_search_engines($api_keys, $primary_language) + ]; + return $store_payload; + } + + private function build_search_engines($api_keys, $primary_language) + { + $search_engines = []; + $domain = str_ireplace('www.', '', parse_url(get_bloginfo('url'), PHP_URL_HOST)); + $currency = is_plugin_active('woocommerce/woocommerce.php') ? get_woocommerce_currency() : "EUR"; + + foreach ($api_keys as $item) { + //Prioritize the locale code + $code = $item['lang']['locale'] ?? $item['lang']['code'] ?? $primary_language; + $code = Helpers::format_locale_to_hyphen($code); + $lang = Helpers::get_language_from_locale($code); + + // Prepare search engine body + $this->log->log('Wizard Step 2 - Prepare Search Enginge body : '); + $search_engines[] = [ + 'name' => $domain . ($code ? ' (' . strtoupper($code) . ')' : ''), + 'language' => $code, + 'currency' => $currency, + 'site_url' => $this->language->get_home_url($lang), + 'datatypes' => [ + $this->get_datatype($lang) + ] + ]; + } + + return $search_engines; + } + + /** + * This function returns the primary language in locale format: en-US, + * es-ES, etc. + * + * @return string Primary language. + */ + private function get_primary_language() + { + $primary_language = get_locale(); + if ($this->language->get_languages() != null) { + $primary_language = $this->language->get_base_locale(); + } + $primary_language = Helpers::format_locale_to_hyphen($primary_language); + return $primary_language; + } + + private function get_datatype($language) + { + return is_plugin_active('woocommerce/woocommerce.php') ? + $this->get_product_datatype($language) : + $this->get_post_datatype($language); + } + + /** + * Generates the product datatype structure. + * + * @return array The product datatype structure. + */ + private function get_product_datatype($language) + { + return [ + "name" => "product", + "preset" => "product", + "datasources" => [ + [ + "type" => "wordpress", + "options" => [ + "feed_type" => "product", + "url" => $this->language->get_home_url($language) + ] + ] + ] ]; - return $client->request($method, $uri, $options); } - public function process_response($response) + /** + * Generates the post datatype structure. + * + * @return array The post datatype structure. + */ + private function get_post_datatype($language) + { + return [ + "name" => "post", + "preset" => "generic", + "datasources" => [ + [ + "type" => "wordpress", + "options" => [ + "feed_type" => "post", + "url" => $this->language->get_home_url($language) + ] + ] + ] + ]; + } + + private function get_callback_urls($api_keys, $primary_language) + { + $callback_urls = []; + $currency = 'EUR'; + foreach ($api_keys as $item) { + $code = $item['lang']['locale'] ?? $item['lang']['code'] ?? $primary_language; + $lang = Helpers::get_language_from_locale($code); + $code = Helpers::format_locale_to_hyphen($code); + $callback_urls[$code][$currency] = $this->build_callback_url( + $this->language->get_home_url($lang), + '/wp-json/doofinder/v1/index-status/?token=' . $this->api_key + ); + } + return $callback_urls; + } + + /** + * This method takes the base url and adds + * + * @param [type] $base_url + * @param [type] $endpoint_path + * @return void + */ + private function build_callback_url($base_url, $endpoint_path) + { + $parsed_url = parse_url($base_url); + $parameters = null; + if (array_key_exists('query', $parsed_url)) { + parse_str($parsed_url['query'], $parameters); + } + + $callback_url = $parsed_url['scheme'] . '://' . $parsed_url['host']; + $callback_url .= isset($parsed_url['path']) ? rtrim($parsed_url['path'], '/') : ''; + $callback_url .= '/' . ltrim($endpoint_path, '/'); + + // Combine any existing parameters with any possible endopoint path parameters + if (!empty($parameters)) { + parse_str(parse_url($callback_url, PHP_URL_QUERY), $endpoint_parameters); + $combined_parameters = array_merge($parameters, $endpoint_parameters); + $callback_url = strtok($callback_url, '?'); + $callback_url .= '?' . http_build_query($combined_parameters); + } + + return $callback_url; + } + + /** + * Generates an api_password and returns the store options. + * + * @return void + */ + private function get_store_options() { - $body = $response->getBody()->getContents(); - if ($response->getStatusCode() > 199 && $response->getStatusCode() <= 299) { - return json_decode($body); + $password_data = $this->create_application_credentials(); + if (!is_null($password_data)) { + return [ + "url" => get_bloginfo('url'), + 'api_pass' => $password_data['api_pass'], + 'api_user' => $password_data['api_user'] + ]; } else { - throw new Exception("Error #{$response->getStatusCode()} creating store structure. $body", $response->getStatusCode()); + throw new Exception("Error creating application credentials"); } } - public function format_language_code($code) - { - return str_replace('_', '-', $code); - } + /** + * Creates a new application password. + * If a password exists, it deletes it and creates a new password. + * + * We store the user_id and the uuid in order to know which application + * password we must delete. + * + * @return array Array containing api_user and api_pass + */ + private function create_application_credentials() + { + $user_id = get_current_user_id(); + $user = get_user_by('id', $user_id); + $credentials_option_name = "doofinder_for_wp_app_credentials_" . get_current_blog_id(); + $credentials = get_option($credentials_option_name); + $password_data = NULL; + $app_name = 'doofinder_' . get_current_blog_id(); + + if (is_array($credentials) && array_key_exists('user_id', $credentials) && array_key_exists('uuid', $credentials)) { + WP_Application_Passwords::delete_application_password($credentials['user_id'], $credentials['uuid']); + } + + if (!WP_Application_Passwords::application_name_exists_for_user($user_id, $app_name)) { + $app_pass = WP_Application_Passwords::create_new_application_password($user_id, array('name' => $app_name)); + $credentials = [ + 'user_id' => $user_id, + 'uuid' => $app_pass[1]['uuid'] + ]; + update_option($credentials_option_name, $credentials); + + $password_data = [ + 'api_user' => $user->data->user_login, + 'api_pass' => $app_pass[0] + ]; + } + return $password_data; + } } diff --git a/doofinder-for-woocommerce/includes/api/class-throttle.php b/doofinder-for-woocommerce/includes/api/class-throttle.php deleted file mode 100644 index a22b26a0..00000000 --- a/doofinder-for-woocommerce/includes/api/class-throttle.php +++ /dev/null @@ -1,106 +0,0 @@ -target = $target; - } - - /** - * Passes the method call to the class we are throttling for, - * but handles throttling of the calls to that method. - * - * Than means if the method call does not success we wait a bit, - * and then try again. - * - * @param string $name - * @param array $arguments - * - * @return mixed - * @throws \Exception - */ - public function __call( $name, array $arguments ) { - if ( ! method_exists( $this->target, $name ) ) { - throw new \InvalidArgumentException( - "Method $name does not exist on " . get_class( $this->target ) - ); - } - - return $this->throttle( $name, $arguments ); - } - - /** - * Throttle the method call. - * - * Call the method, if the exception is thrown we wait a bit, and then - * retry calling the same method, until it succeeds. - * - * @see Throttle::MAX_RETRIES - * - * @param string $method - * @param array $arguments - * @param int $count - * - * @return mixed - * @throws \Exception - * - */ - private function throttle( $method, array $arguments, $count = 1 ) { - $log = new Log(); - - try { - return call_user_func_array( array( $this->target, $method ), $arguments ); - } catch ( IndexingInProgress $exception ) { - $log->log( "Throttling when indexing - $method: $count" ); - if ( $count >= self::MAX_RETRIES ) { - throw $exception; - } - - sleep( 3 ); - } catch ( \Exception $exception ) { - $log->log( "Throttling $method: $count" ); - if ( $count >= self::MAX_RETRIES ) { - throw $exception; - } - - sleep( 1 ); - } - - return $this->throttle( $method, $arguments, $count + 1 ); - } -} diff --git a/doofinder-for-woocommerce/includes/api/class-update-on-save-api.php b/doofinder-for-woocommerce/includes/api/class-update-on-save-api.php new file mode 100644 index 00000000..a1f9f046 --- /dev/null +++ b/doofinder-for-woocommerce/includes/api/class-update-on-save-api.php @@ -0,0 +1,137 @@ +log = new Log('update-on-save-api.log'); + $this->api_key = Settings::get_api_key(); + $this->api_host = Settings::get_api_host(); + $this->hash = Settings::get_search_engine_hash($language); + $this->authorization_header = array( + 'Authorization' => "Token $this->api_key", + 'content-type' => 'application/json' + ); + + $this->log->log('Create Management API Client'); + $this->log->log('API Key: ' . $this->api_key); + $this->log->log('API Host: ' . $this->api_host); + $this->log->log('Hash: ' . $this->hash); + } + + /** + * Handle sending requests to API + * + * @param $url + * @param $data + * + */ + private function sendRequest($url, $ids) + { + $this->log->log("Making a request to: $url"); + $data = [ + 'headers' => $this->authorization_header, + 'method' => 'POST', + 'body' => json_encode($ids), + ]; + + $response = wp_remote_request($url, $data); + if (!is_wp_error($response)) { + $response_body = wp_remote_retrieve_body($response); + $decoded_response = json_decode($response_body, true); + $this->log->log("The request has been made correctly: $decoded_response"); + } else { + $error_message = $response->get_error_message(); + $this->log->log("Error in the request: $error_message"); + } + } + + public function buildURL($path) + { + return "{$this->api_host}/{$path}"; + } + + /** + * Updates multiple items in the Doofinder index. + * + * This method updates multiple items of a specific post type in the Doofinder index. + * It sends a POST request to the Doofinder API with the data to be updated. + * + * @param string $post_type The post type for which the items should be updated. + * @param array $ids The ids representing the items to be updated. + * @return mixed The response from the Doofinder API. + * @since 1.0.0 + */ + public function updateBulk($post_type, $ids) + { + $this->log->log('Update items'); + + $uri = $this->buildURL("plugins/wordpress/" . $this->hash . "/" . $post_type . "/product_update"); + + return $this->sendRequest($uri, $ids); + } + + /** + * Deletes multiple items from the Doofinder index. + * + * This method deletes multiple items of a specific post type from the Doofinder index. + * It sends a POST request to the Doofinder API with the data to be deleted. + * + * @param string $post_type The post type for which the items should be deleted. + * @param array $ids The ids representing the items to be deleted. + * @return mixed The response from the Doofinder API. + * @since 1.0.0 + */ + public function deleteBulk($post_type, $ids) + { + $this->log->log('Delete items'); + + $uri = $this->buildURL("plugins/wordpress/" . $this->hash . "/" . $post_type . "/product_delete"); + + return $this->sendRequest($uri, $ids); + } +} diff --git a/doofinder-for-woocommerce/includes/class-add-to-cart.php b/doofinder-for-woocommerce/includes/class-add-to-cart.php old mode 100644 new mode 100755 index fbd7f301..d6777be3 --- a/doofinder-for-woocommerce/includes/class-add-to-cart.php +++ b/doofinder-for-woocommerce/includes/class-add-to-cart.php @@ -1,9 +1,8 @@ $notice) { + if (isset($notice['is_custom']) && $notice['is_custom']) { + self::render_custom_notice($notice['html']); + } else { + self::render_notice($notice_id, $notice); + } + } + } + }); + } + + public static function add_notice($notice_name, $title, $message, $type = 'info', $extra = null, $classes = '', $dismissible = false) + { + $current_notices = self::get_custom_notices(); + $current_notices[$notice_name] = [ + 'type' => $type, + 'title' => $title, + 'message' => $message, + 'extra' => $extra, + 'classes' => $classes, + 'dismissible' => $dismissible + ]; + update_option('doofinder_for_wp_notices', $current_notices); + } + + + public static function add_custom_notice($notice_name, $html) + { + $current_notices = self::get_custom_notices(); + $current_notices[$notice_name] = [ + 'is_custom' => true, + 'html' => $html + ]; + update_option('doofinder_for_wp_notices', $current_notices); + } + + public static function remove_notice($id) + { + if (!self::is_notice_active($id)) { + return; + } + + $current_notices = self::get_custom_notices(); + if (array_key_exists($id, $current_notices)) { + unset($current_notices[$id]); + update_option('doofinder_for_wp_notices', $current_notices); + } + } + + + public static function get_custom_notices() + { + return get_option('doofinder_for_wp_notices', []); + } + + public static function render_notice($notice_id, $notice) + { + + $classes = "wordpress-message df-notice migration-complete " . $notice['classes'] +?> +
"> +
+
+ +
+ +

+ +

+ +

+
+ +
+ +
+ +
+
+
+enqueue_styles(); - $this->add_doofinder_settings(); - } - - /** - * Enqueue custom admin panel styles. - * - * @since 1.0.0 - */ - private function enqueue_styles() { - add_action( 'admin_enqueue_scripts', function( $hook ) { - if ( 'woocommerce_page_wc-settings' === $hook ) { - wp_enqueue_style( - 'doofinder-for-wc-styles', - Doofinder_For_WooCommerce::plugin_url() . 'assets/css/admin.css' - ); - } - } ); - } - - /** - * Add Doofinder settings to the WooCommerce settings page. - * - * @since 1.0.0 - */ - private function add_doofinder_settings() { - add_filter( 'woocommerce_get_settings_pages', function( $settings ) { - $settings[] = new Settings_Page(); - return $settings; - } ); - } -} diff --git a/doofinder-for-woocommerce/includes/class-both-sides.php b/doofinder-for-woocommerce/includes/class-both-sides.php deleted file mode 100644 index 25be1e56..00000000 --- a/doofinder-for-woocommerce/includes/class-both-sides.php +++ /dev/null @@ -1,51 +0,0 @@ -register_widgets(); - } - - /** - * Register all widgets. - * - * @since 1.3.0 - */ - private function register_widgets() { - add_action( 'widgets_init', function () { - register_widget( Search_Banner_Widget::class ); - } ); - } -} diff --git a/doofinder-for-woocommerce/includes/class-config.php b/doofinder-for-woocommerce/includes/class-config.php old mode 100644 new mode 100755 index 9457f3f9..9892bb88 --- a/doofinder-for-woocommerce/includes/class-config.php +++ b/doofinder-for-woocommerce/includes/class-config.php @@ -1,159 +1,171 @@ generate(); - } ); - } - - /** - * Prepare the Doofinder configuration feed. - * - * @since 1.0.0 - */ - public function __construct() { - $multilanguage = Multilanguage::instance(); - - if ( $multilanguage->is_active() ) { - $configuration = $this->get_multilanguage_configuration(); - } else { - $configuration = $this->get_single_language_configuration(); - } - - $this->config = array( - 'platform' => array( - 'name' => 'WooCommerce', - 'version' => \WC()->version, - ), - - 'module' => array( - 'configuration' => $configuration, - - 'options' => array( - 'language' => array_map( 'strtoupper', $this->get_languages() ), - ), - - 'version' => Doofinder_For_WooCommerce::$version, - - 'wizard' => $this->get_wizard_status(), - ), - ); - } - - /** - * Output the feed. - */ - public function generate() { - header( 'Content-Type: application/json' ); - echo json_encode( $this->config ); - } - - /** - * Get module.configuration part of the feed for the multilanguage installations. - * - * @return array - */ - private function get_multilanguage_configuration() { - $multilanguage = Multilanguage::instance(); - $configuration = array(); - - $languages = $multilanguage->get_languages(); - foreach ( $languages as $code => $language ) { - $code_label = strtoupper( $code ); - $secured = ( 'yes' === Settings::get( 'feed', 'password_protected', $code ) ); - - $configuration[ $code_label ] = array( - 'currency' => get_woocommerce_currency(), - 'language' => $code_label, - 'feed' => $multilanguage->get_feed_link( 'doofinder', $code ), - 'secured' => $secured - ); - } - - return $configuration; - } - - /** - * Get module.configuration part of the feed for installations without internationalization. - * - * @return array - */ - private function get_single_language_configuration() { - $language_code = $this->get_locale_language_code(); - - $configuration = array(); - $secured = ( 'yes' === Settings::get( 'feed', 'password_protected' ) ); - $configuration[ $language_code ] = array( - 'currency' => get_woocommerce_currency(), - 'language' => $language_code, - 'feed' => get_feed_link( 'doofinder' ), - 'secured' => $secured - ); - - return $configuration; - } - - /** - * Get (capitalized) language code from WP locale. - */ - private function get_locale_language_code() { - $locale = get_locale(); - $parts = preg_split( '/_/', $locale ); - - return strtoupper( $parts[0] ); - } - - /** - * Get the list of languages. - * Comes from internationalization plugin if internationalization is available, - * and from WP locale otherwise. - */ - private function get_languages() { - $multilanguage = Multilanguage::instance(); - if ( $multilanguage->is_active() ) { - return array_keys( $multilanguage->get_languages() ); - } - - return array( $this->get_locale_language_code() ); - } - - /** - * Get wizard status for configuration - * - * @return string - */ - private function get_wizard_status() { - $wizard = get_option(Setup_Wizard::$wizard_status); - if ( $wizard ) { - return $wizard; - } - - return Settings::is_configuration_complete() - ? Setup_Wizard::$wizard_status_finished - : Setup_Wizard::$wizard_status_pending; - } +namespace Doofinder\WP; + +use Doofinder\WP\Multilanguage; +use Doofinder\WP\Settings; +use Doofinder\WP\Setup_Wizard; +use WP_REST_Response; + +defined('ABSPATH') or die; + +class Config +{ + + /** + * Plugin configuration that Doofinder website will read. + * + * @var array + */ + private $config; + + /** + * Register the feed with WordPress. + * Necessary for Doofinder website to access plugin configuration. + * + * @since 1.0.0 + */ + public static function register() + { + $class = __CLASS__; + $config = new $class(); + + register_rest_route('doofinder/v1', '/config', array( + 'methods' => 'GET', + 'callback' => [$config, 'generate'], + 'permission_callback' => '__return_true' + )); + } + + /** + * Prepare the Doofinder configuration feed. + * + * @since 1.0.0 + */ + public function __construct() + { + global $wp_version; + $multilanguage = Multilanguage::instance(); + + if ($multilanguage->is_active()) { + $configuration = $this->get_multilanguage_configuration(); + } else { + $configuration = $this->get_single_language_configuration(); + } + + $config = array( + 'platform' => array( + 'name' => 'WordPress', + 'version' => $wp_version + ), + 'module' => array( + 'configuration' => $configuration, + 'options' => array( + 'language' => array_map('strtoupper', $this->get_languages()), + ), + 'version' => Doofinder_For_WordPress::$version, + 'wizard' => $this->get_wizard_status() + ) + ); + + if (is_plugin_active('woocommerce/woocommerce.php')) { + $config['platform'] = array( + 'name' => 'WooCommerce', + 'version' => \WC()->version, + 'wordpress_version' => $wp_version + ); + } + + $this->config = $config; + } + + public function generate() + { + return new WP_REST_Response($this->config); + } + + /** + * Get module.configuration part of the feed for the multilanguage installations. + * + * @return array + */ + private function get_multilanguage_configuration() + { + $multilanguage = Multilanguage::instance(); + $configuration = array(); + + $languages = $multilanguage->get_languages(); + foreach ($languages as $code => $language) { + $code_label = strtoupper($code); + + $configuration[$code_label] = array( + 'currency' => get_woocommerce_currency(), + 'language' => $code_label + ); + } + + return $configuration; + } + + /** + * Get module.configuration part of the feed for installations without internationalization. + * + * @return array + */ + private function get_single_language_configuration() + { + $language_code = $this->get_locale_language_code(); + + $currency = is_plugin_active('woocommerce/woocommerce.php') ? get_woocommerce_currency() : "EUR"; + $configuration = array(); + $configuration[$language_code] = array( + 'currency' => $currency, + 'language' => $language_code + ); + + return $configuration; + } + + /** + * Get (capitalized) language code from WP locale. + */ + private function get_locale_language_code() + { + $locale = get_locale(); + $parts = preg_split('/_/', $locale); + + return strtoupper($parts[0]); + } + + /** + * Get the list of languages. + * Comes from internationalization plugin if internationalization is available, + * and from WP locale otherwise. + */ + private function get_languages() + { + $multilanguage = Multilanguage::instance(); + if ($multilanguage->is_active()) { + return array_keys($multilanguage->get_languages()); + } + + return array($this->get_locale_language_code()); + } + + /** + * Get wizard status for configuration + * + * @return string + */ + private function get_wizard_status() + { + $wizard = get_option(Setup_Wizard::$wizard_status); + if ($wizard) { + return $wizard; + } + + return Settings::is_configuration_complete() + ? Setup_Wizard::$wizard_status_finished + : Setup_Wizard::$wizard_status_pending; + } } diff --git a/doofinder-for-woocommerce/includes/class-data-feed.php b/doofinder-for-woocommerce/includes/class-data-feed.php deleted file mode 100644 index a7298bfb..00000000 --- a/doofinder-for-woocommerce/includes/class-data-feed.php +++ /dev/null @@ -1,382 +0,0 @@ -generate(); - }); - } - - /* Initialization *************************************************************/ - - /** - * Data_Feed constructor. - * - * @since 1.0.0 - * - * @param string $language Language of the feed to show. - */ - public function __construct($xml = true, $product_ids = null, $language = null) - { - - $multilanguage = Multilanguage::instance(); - - $this->log = new Log('api.txt'); - - if ($language) { - $this->language = $language; - } else { - $this->language = $multilanguage->get_language_code(); - } - - if ($xml) { - // Create XML document to fill out. - $this->feed = new Feed_XML(); - } else { - $this->feed = new stdClass(); - } - - // Load settings. - $this->settings = array( - // Doofinder settings - 'export_prices' => Settings::get('feed', 'export_prices'), - 'export_tags' => Settings::get('feed', 'export_tags'), - 'image_size' => Settings::get('feed', 'image_size'), - 'split_variable' => Settings::get('feed', 'split_variable'), - 'protected' => Settings::get('feed', 'password_protected'), - 'password' => Settings::get('feed', 'password'), - - // WooCommerce settings - 'include_taxes' => ('incl' === get_option('woocommerce_tax_display_shop')), - ); - - // Load required data from DB. - foreach (get_terms('product_cat') as $term) { - $this->terms_cache[$term->term_id] = $term; - } - - $this->load_products($product_ids, $language); - } - - /** - * Load all the products to be included in the feed from DB. - * - * @since 1.0.0 - */ - private function load_products($product_ids = null, $language = null) - { - global $woocommerce; - - $language = Helpers::get_language_from_locale($language); - - $this->log->log('Load products'); - - if ($language) { - global $sitepress; - $current_lang = $sitepress->get_current_language(); - $sitepress->switch_lang($language); - } - - $args = array( - 'post_type' => 'product', - 'post_status' => 'publish', - - 'ignore_sticky_posts' => 1, - - 'posts_per_page' => -1, - - 'orderby' => 'ID', - 'order' => 'ASC', - - 'cache_results' => false, - 'update_post_meta_cache' => false, - 'update_post_term_cache' => false, - ); - - if ('yes' === Settings::get('feed', 'split_variable')) { - $args['post_type'] = ['product', 'product_variation']; - } - - if (is_array($product_ids) && !empty($product_ids)) { - $args['post__in'] = $product_ids; - } - - // Visibility - // We should only show products that have catalog visibility set to search. - // However different WooCommerce version store it in different places. - - // Version 3+ - // Since version 3.0.0 catalog visibility became a taxonomy. - // Whenever the product is hidden from search the term "exclude-from-search" - // is added. - if (version_compare($woocommerce->version, '3.0.0', '>=')) { - $args['tax_query'] = array( - array( - 'taxonomy' => 'product_visibility', - 'field' => 'name', - 'terms' => array('exclude-from-search'), - 'operator' => 'NOT IN', - ), - ); - } - - // Version 2+ - // In older versions visibility was stored as a post meta on the product. - else { - $args['meta_query'] = array( - 'relation' => 'OR', - array( - 'key' => '_visibility', - 'compare' => 'NOT EXISTS', - ), - array( - 'key' => '_visibility', - 'value' => array('search', 'visible'), - 'compare' => 'IN', - ), - array( - 'key' => '_visibility', - 'value' => '', - ), - ); - } - - // GET parameters - // 'limit' and 'offset' parameters create pagination. - $limit = 0; - if (isset($_GET['limit']) && !empty($_GET['limit'])) { - $limit = (int) $_GET['limit']; - $args['posts_per_page'] = $_GET['limit']; - } - - $offset = 0; - if (isset($_GET['offset']) && !empty($_GET['offset'])) { - $offset = (int) $_GET['offset']; - $args['offset'] = $_GET['offset']; - } - - $query = new \WP_Query($args); - - //$this->log->log('Load products - Query: '); - //$this->log->log($query); - - $this->products = $query->posts; - - $this->log->log('Load products - Count: ' . count($this->products)); - - $this->log->log('Current Memory Usage: ' . Helpers::get_memory_usage()); - - // Check if this is the beginning or end of the feed - if (0 === $offset) { - $this->is_first = true; - } - - if (!isset($_GET['limit']) || $offset + $limit >= $query->found_posts) { - $this->is_last = true; - } - - if ($language) { - $sitepress->switch_lang($current_lang); - } - } - - /* Feed generation ************************************************************/ - - /** - * Build an XML document and print it out. - * - * @since 1.0.0 - */ - public function generate() - { - Doofinder_For_WooCommerce::maybe_suppress_notices(); - header('Content-Type: text/plain'); - //header( 'Content-Type: text/html' ); - - if ( - 'yes' !== $this->settings['protected'] || - (isset($_GET['secret']) && $this->settings['password'] === $_GET['secret']) - ) { - - $this->add_store_information(); - $this->add_products(); - $this->render(); - } - echo ''; - Doofinder_For_WooCommerce::maybe_restore_notices(); - } - - - /** - * Get array of products to index. - * - * @since 1.0.0 - */ - public function get_items() - { - - $this->add_store_information(); - $this->add_products(); - - return $this->feed->items ?? []; - } - - /** - * Add general information about the store to the XML document. - * - * @since 1.0.0 - */ - private function add_store_information() - { - $this->feed->header['title'] = get_bloginfo('name'); - $this->feed->header['link'] = Multilanguage::get_home_url($this->language); - $this->feed->header['description'] = sanitize_text_field(get_bloginfo('description')); - } - - /** - * Add all items (products) to the feed. - * - * @since 1.0.0 - */ - private function add_products() - { - - foreach ($this->products as $post) { - $df_post = new Post($post); - if (!$df_post->is_indexable()) { - continue; - } - $item = new Data_Feed_Item( - $post, - null, - $this->settings, - $this->paths_cache, - $this->terms_cache - ); - $fields = $item->get_fields(); - $this->add_item_to_feed($fields); - } - } - - /** - * Add set of fields generated using Data_Feed_Item to the XML feed. - * - * @param array $fields Fields of the item to add. - */ - private function add_item_to_feed($fields) - { - $this->feed->items[] = $fields; - } - - /** - * Render the generated XML document in the browser. - * - * @since 1.0.0 - */ - private function render() - { - if (empty($this->products)) { - echo ''; - } else { - $this->feed->render($this->is_first, $this->is_last); - echo $this->feed->get(); - } - } -} diff --git a/doofinder-for-woocommerce/includes/class-data-index.php b/doofinder-for-woocommerce/includes/class-data-index.php deleted file mode 100644 index bbfac8c7..00000000 --- a/doofinder-for-woocommerce/includes/class-data-index.php +++ /dev/null @@ -1,1157 +0,0 @@ -language = Multilanguage::instance(); - $this->indexing_data = Indexing_Data::instance(); - $this->current_language = $_POST['lang'] ?? ''; - $this->process_all_languages = $this->language->get_languages() && $this->current_language === ''; - - $this->log = new Log('api.txt'); - - $this->log->log('-------------------------------------------------------------------------------------------------------------------------------------'); - $this->log->log('-------------------------------------------------------------------------------------------------------------------------------------'); - $this->log->log('-------------------------------------------------------------------------------------------------------------------------------------'); - //$this->log->log( '---------------------------------------------------------------------------------------------' ); - //$this->log->log( 'Data Index _construct ' ); - - } - - /** - * - * Handle ajax request - * - * Index active language if $language param is not present. - * - * @param string $language Language code of posts to index. - */ - public function ajax_handler() - { - - //$this->log->log( 'Ajax Handler ' ); - - $status = $this->indexing_data->get('status'); - - // If the indexing has been completed we are reindexing. - // Reset the status of indexing. - if ($status === 'completed') { - $this->log->log('Ajax Handler - Reset indexing data '); - $this->indexing_data->reset(); - } - - - // Index the posts. - if ($this->index_posts()) { - - $this->ajax_response(true, 'Wrapping up...'); - - return; - } - - $post_type = $this->get_post_type_name($this->indexing_data->get('post_type')); - $lang_message = ''; - - if ($this->process_all_languages) { - $language = $this->get_language_name($this->indexing_data->get('lang')); - $lang_message = ", for \"$language\" language"; - } - - - $this->ajax_response(false, "Indexing \"$post_type\" type contents" . $lang_message . "..."); - } - - /** - * Get posts from DB, send via API, and return status - * (if the process of indexing has been completed) as JSON. - * - * @since 1.0.0 - * @param string $language Language code of posts to index. - * @return bool True if the indexing has finished. - */ - public function index_posts($language = null) - { - - if (self::$should_fail) { - $this->ajax_response_error(array( - 'status' => Api_Status::$unknown_error, - 'message' => 'Some text for forced error', - 'error' => true - )); - - return; - } - - // TODO Maybe make it work with different post types enabled, not only with products - - //$this->log->log( 'Index Posts -----------------------------' ); - - // Change indexing status to 'processing' - $this->set_processing_status(); - - // This is not needed anymore, in API v2 we utilize temp indexes - //$this->maybe_remove_posts(); - - - - // Load languages - $this->log->log('Load Languages'); - $this->load_languages(); - $this->log->log($this->languages); - - - // Load the data that we'll use to fetch posts. - $this->log->log('Load Post Types'); - $this->load_post_types(); - $this->log->log($this->post_types); - - - // Count have many posts there are to process - $this->calculate_progress(true); - - - // This function also removes the current post type. - // This is done because "load_posts_id" can skip a post type - // if it contains 0 posts, but we still need to remove - // the post type, or the old posts will remain in the DB. - $this->log->log('Load Post IDs'); - $this->load_posts_ids($language); - $this->log->log('Post IDs : '); - $this->log->log($this->posts_ids); - - - // Get API client instance (for current language) - $language = $this->indexing_data->get('lang'); - $this->log->log('Index Posts - lang: ' . $language); - $this->log->log('Index Posts - Get API Client Instance'); - $this->api = Api_Factory::get($language, true); - - // We fetch next batch of post IDs, from the current post type, - // but advance to the next post type, if there are no more posts. - // If we hit 0 posts at this point that means we checked current - // post type, advanced to the next one, there was none, which - // means we are done. - if ($this->post_count === 0) { - - // We are done so replace real index with temp one. - // If replacing is not successfull will send api error response. - $this->log->log('Index Posts - Call replace Index'); - $this->call_replace_index(); - - // Set indexing status if above is successfull - $this->indexing_data->set('status', 'completed'); - - return true; - } - - // Load actual posts and their data. - // For now we only index product so this is not needed. - - //$this->load_posts(); - //$this->load_posts_meta(); - - // Prepare posts to be sent to the API. - //$this->log->log( 'Generate Items - Start' ); - $this->generate_items(); - //$this->log->log( 'Generate Items - End' ); - //$this->log->log( $this->items ); - - - // Send posts to the API. - // At this point if the posts are sent successfully - // we'll advance the "pointer" pointing to the last - // indexed post. - - if ($this->items) { - - $sent_to_api = $this->api->send_batch( - $this->indexing_data->get('post_type'), - $this->items, - $this->indexing_data->get('lang') - ); - - // Show ajax response from api response body - if (is_array($sent_to_api)) { - - $this->ajax_response_error(array( - 'status' => $sent_to_api['status'] ?? '', - 'message' => $sent_to_api['message'] ?? '', - 'error' => isset($sent_to_api['error']) ? $sent_to_api['error'] : true - )); - } else if ($sent_to_api !== Api_Status::$success) { - $post_type = $this->get_post_type_name($this->indexing_data->get('post_type')); - - $lang_message = ''; - - if ($this->process_all_languages) { - $language_code = $this->get_language_name($this->indexing_data->get('lang')); - $lang_message = " for \"$language_code\" language"; - } - - // Setting error flag to true will cause indexing to stop without additional retries - // For example when api key or hash id is invalid we do not need to retry the request - $error = false; - - $message = __("Indexing \"$post_type\" type contents" . $lang_message . "...", 'woocommerce-doofinder'); - - if ($sent_to_api === Api_Status::$indexing_in_progress) { - $message = __("Processing \"$post_type\" index" . $lang_message . "...", 'woocommerce-doofinder'); - } - - if ($sent_to_api === Api_Status::$invalid_search_engine) { - $error = true; - $message = __("Invalid search engine. Please check hash id" . $lang_message, 'woocommerce-doofinder'); - } - - if ($sent_to_api === Api_Status::$not_authenticated) { - $error = true; - $message = __("Request not authenticated. Please check API key" . $lang_message, 'woocommerce-doofinder'); - } - - if ($sent_to_api === Api_Status::$unknown_error) { - $error = true; - $message = __("An unknown error has occured while indexing data", 'woocommerce-doofinder'); - } - - $this->ajax_response_error(array( - 'status' => $sent_to_api, - 'message' => $message, - 'error' => $error - )); - } - } - - // We land here in two cases: - // 1. We had items and sent them to API successfully. If API - // call fails the script will terminate. - // 2. There were no items. This happens when for example we hit - // a batch of posts that all have settings preventing them - // from being indexed. - $this->log->log('Push Pointer Forwards'); - $this->push_pointer_forwards(); - - return false; - } - - /** - * Remove all post types, but only once, at the beginning of indexing process. - */ - private function maybe_remove_posts() - { - if ($this->indexing_data->get('status') === 'processing') { - return; - } - - $types_removed = $this->api->remove_types(); - - $this->indexing_data->set('status', 'processing'); - - if ($types_removed !== Api_Status::$success) { - $this->ajax_response_error(array( - 'status' => $types_removed, - 'message' => __('Deleting objects...', 'woocommerce-doofinder'), - )); - } - - $this->indexing_data->set('post_types_removed', Settings::get_post_types_to_index()); - } - - /** - * Set status to prcessing at the beginning of indexing process. - */ - private function set_processing_status() - { - if ($this->indexing_data->get('status') === 'processing') { - return; - } - - $this->indexing_data->set('status', 'processing'); - } - - /** - * Load post types from DB, and set current post type if is not defined. - * - * @since 1.0.0 - */ - private function load_post_types() - { - $post_types = Post_Types::instance(); - $this->post_types = $post_types->get_indexable(); - - // if we start indexing, then post type is not set, so we get first post type from list - if (!$this->indexing_data->get('post_type')) { - $this->indexing_data->set('post_type', $this->post_types[0]); - } - } - - /** - * Load languages from DB, and set current language if is not defined. - * - * @since 1.0.0 - */ - private function load_languages() - { - - if (!$this->process_all_languages) { - - if (!$this->indexing_data->get('lang')) { - $this->indexing_data->set('lang', $this->current_language); - } - - return; - } - - $languages = $this->language->get_languages(); - - $this->languages = ['']; - if (is_array($languages)) { - $this->languages = []; - foreach ($languages as $language) { - $this->languages[] = $language['locale']; - } - } - - // if we start indexing, then language is not set, so we get first language from list - if (!$this->indexing_data->get('lang')) { - $this->indexing_data->set('lang', $this->languages[0]); - } - } - - /** - * Load posts ids from DB. - * - * @since 1.0.0 - */ - private function load_posts_ids($language = null) - { - $last_id = $this->indexing_data->get('post_id'); - $post_type = $this->indexing_data->get('post_type'); - - $lang = $this->indexing_data->get('lang'); - - $this->log->log('Load Posts Ids - lang : ' . $lang); - $this->log->log('Load Posts Ids - post_type : ' . $post_type); - - $posts_per_page = self::$posts_per_page; - - if ($language) { - $lang_code = $language; - } else { - $lang_code = $lang; - } - - - $this->posts_ids = $this->language->get_posts_ids( - $lang_code, - $post_type, - $last_id, - $posts_per_page - ); - - $this->post_count = count($this->posts_ids); - - // Get API Class instance so we can check if search engine is valid - // If not then we skip to next type / language - //$api = Api_Factory::get(); - - if ($this->post_count === 0 /* || !$api->search_engine */) { - - // If search engine is invalid we don't want to call the request for replacing index - // $skip_replace_index = !$api->search_engine ? true : false; - - // if ( $this->check_next_post_type() ) { - // $this->log->log('Load Posts Ids - check next post type - true '); - // $this->load_posts_ids(); - // } else - if ($this->process_all_languages && $this->check_next_language(/* $skip_replace_index */)) { - $this->log->log('Load Posts Ids - check next language - true '); - $this->load_posts_ids(); - } - } - } - - /** - * Load posts from DB. - * - * @since 1.0.0 - */ - private function load_posts() - { - // Whilst the default WP_Query post_status is "publish", - // attachments have a default post_status of "inherit". - // This means no attachments will be returned unless we - // also explicitly set post_status to "inherit" or "any". - if ($this->indexing_data->get('post_type') === 'attachment') { - $post_status = 'inherit'; - } else { - $post_status = 'publish'; - } - - $args = array( - 'post_type' => $this->indexing_data->get('post_type'), - 'post__in' => $this->posts_ids, - 'post_status' => $post_status, - - 'posts_per_page' => self::$posts_per_page, - 'orderby' => 'ID', - 'order' => 'ASC', - - 'cache_results' => false, - 'update_post_meta_cache' => false, - 'update_post_term_cache' => false, - ); - - $query = new \WP_Query($args); - - $this->posts = $query->posts; - } - - /** - * Load posts meta from DB. - * - * @since 1.0.0 - */ - private function load_posts_meta() - { - global $wpdb; - $posts_ids_list = implode(', ', $this->posts_ids); - - $visibility_meta = Post::$options['visibility']['meta_name']; - $yoast_visibility = Post::$options['yoast_visibility']['meta_name']; - $query = " - SELECT post_id, meta_key, meta_value - FROM $wpdb->postmeta - WHERE $wpdb->postmeta.post_id IN ($posts_ids_list) - AND ( - $wpdb->postmeta.meta_key NOT LIKE '\_%' OR - $wpdb->postmeta.meta_key = '$visibility_meta' OR - $wpdb->postmeta.meta_key = '$yoast_visibility' - ) - ORDER BY $wpdb->postmeta.post_id - "; - - $this->posts_meta = $wpdb->get_results($query, OBJECT); - } - - /** - * Generate items to be indexed via API. - * - * @since 1.0.0 - */ - private function generate_items() - { - - // Use functionality from XML data feed to retrieve products - $this->log->log('Generate items - Start '); - $this->log->log('Current Memory Usage: ' . Helpers::get_memory_usage()); - //$this->log->log( 'Generate items - Start : ' . $this->indexing_data->get('lang')); - - $this->log->log('Generate items - Get Data Feed Instance '); - $data_feed = new Data_Feed(false, $this->posts_ids, $this->indexing_data->get('lang')); - - $this->log->log('Generate items - Get Items '); - $this->items = $data_feed->get_items(); - - $this->log->log('Generate items - Set Current Progress '); - $current_progress = $this->indexing_data->get('current_progress'); - $this->indexing_data->set('current_progress', $current_progress + count($this->items)); - - if (!empty($this->items)) { - $this->log->log('Generate items - Items generated : ' . count($this->items)); - $this->log->log('Generate items - Items : '); - $this->log->log($this->items); - } else { - $this->log->log('Generate items - No Items generated'); - } - } - - /** - * Advance the pointer (last indexed post) forward, to the last - * post we indexed in this batch. - * - * This should be called only if the posts are successfully sent - * to the API, because if API call fails, and we move forward - * despite that, then we will miss some posts. - */ - private function push_pointer_forwards() - { - if (!$this->posts_ids) { - return; - } - - $this->indexing_data->set( - 'post_id', - $this->posts_ids[count($this->posts_ids) - 1] - ); - } - - /** - * Wrapper function for check and set next item from the container list. - * If next item does not exist, then simple return false, otherwise true. - * - * @since 1.0.0 - * @return bool - */ - private function check_next_($item, $container, $get_new_api = false, $skip_replace_index = false) - { - $current_item_index = array_search($this->indexing_data->get($item), $container); - $next_item_index = $current_item_index + 1; - - if (isset($container[$next_item_index]) && $container[$next_item_index]) { - - if (!$skip_replace_index) { - // We are done with this batch, replace temp index - $this->log->log('Check Next ' . $item . ' - Call replace Index'); - if ($this->api || $get_new_api) { - $this->call_replace_index($get_new_api); - } - } - - $this->indexing_data->set($item, $container[$next_item_index]); - $this->indexing_data->set('post_id', 0); - - $current_progress = $this->indexing_data->get('current_progress'); - $this->log->log('Check Next ' . $item . ' - Current progress: ', $current_progress); - - $this->indexing_data->set('processed_posts_count', $current_progress); - - return true; - } - - return false; - } - - /** - * Check and set next post type from the post types list. - * If next post type does not exist, then simple return false, otherwise true. - * - * @since 1.0.0 - * @param bool $skip_replace_index - * @return bool - */ - private function check_next_post_type($skip_replace_index = false) - { - return $this->check_next_('post_type', $this->post_types, false, $skip_replace_index); - } - - /** - * Check and set next language from the languages list. - * If next language does not exist, then simple return false, otherwise true. - * - * @since 1.0.0 - * @param bool $skip_replace_index - * @return bool - */ - private function check_next_language($skip_replace_index = false) - { - return $this->check_next_('lang', $this->languages, true, $skip_replace_index); - } - - /** - * Prepare ajax response. - * - * @since 1.0.0 - * - * @param bool $completed Status of indexing posts. - * @param string $message Additional message to pass to front. - */ - private function ajax_response($completed, $message = '') - { - // We're about to call "die", so we need to make sure our data - // gets saved. Originally this was in the destructor but there - // was an error - when sometimes WP cache crashed destructor - // was not called, and the pointer information was not saved - // in the DB as a result. - - $content = array( - 'completed' => $completed, - 'progress' => $this->calculate_progress(), - ); - - $this->indexing_data->save(); - - if ($message) { - $content['message'] = $message; - } - - wp_send_json_success($content); - } - - /** - * Whenever we send response to the frontend the script terminates - * so if we don't save the indexing data it will be lost. - * - * @param array $args Arguments for "wp_send_json_error". - */ - private function ajax_response_error($args = array()) - { - // We're about to call "die", so we need to make sure our data - // gets saved. Originally this was in the destructor but there - // was an error - when sometimes WP cache crashed destructor - // was not called, and the pointer information was not saved - // in the DB as a result. - $this->indexing_data->save(); - - wp_send_json_error($args); - } - - /** - * Calculate the percentage of images already processed. - * - * We send posts to API post type after post type. Therefore we cannot - * find out how many posts we already sent just by looking at the ID, - * posts from post type B might come before posts from post type A. - * - * So the way to find out how many posts were processed already - * is to find out: - * - Total number of posts withing post types that were already - * completely processed. - * - How many posts from the post type currently being processed - * were already sent (all posts from the current post type up - * to and including the ID of the last processed post). - * - * This function builds one SQL query that contains three COUNTs - - * the two mention above plus the count of all posts from all - * post types that we are indexing, and calculates percentage - * based on that. - * - * @return float Percentage of already processed posts. - */ - private function calculate_progress($get_count_all = false) - { - global $wpdb; - global $sitepress; - - if ($get_count_all) { - $this->log->log('Calculate Progress - Get Count All'); - } - - if (!$get_count_all) { - $this->log->log('Current Memory Usage: ' . Helpers::get_memory_usage()); - //$this->log->log( 'Real Size OF Memory Allocated From System: ' . round(memory_get_usage(true)/1048576,2) . ' MB' ); - $this->log->log('Peak Memory Usage: ' . Helpers::get_memory_usage(false, true)); - //$this->log->log( 'Peak Memory Usage (real): ' . round(memory_get_peak_usage(true)/1048576,2) . ' MB' ); - - //$this->log->log( '---- Calculate Progress' ); - } - // Base query - count of all posts of all supported post types. - // Essentially - how many total posts are there to index. - $split_variable_lang = $sitepress ? 'all' : ''; - - $this->log->log('Calculate Progress - Split Variabable: ' . Settings::get('feed', 'split_variable', $split_variable_lang)); - - if ('yes' === Settings::get('feed', 'split_variable', $split_variable_lang)) { - $this->post_types[] = 'product_variation'; - } - - $post_types_list = $this->make_sql_list($this->post_types); - - //$this->log->log( 'Calculate Progress - Post types list : ' . $post_types_list ); - - // Get currently processed language - $lang = $this->indexing_data->get('lang'); - - if (!$get_count_all) { - $this->log->log('Calculate Progress - current lang: "' . $lang . '"'); - } - - $lang = Helpers::get_language_from_locale($lang); - - $query = ""; - - if (!$lang || !$sitepress) { - // WMPL is not active. Make sure to get product variations that are not child of a product - // with 'draft' status - $query .= " - SELECT - ( - SELECT COUNT(DISTINCT posts.ID) - FROM $wpdb->posts as posts - LEFT JOIN {$wpdb->prefix}posts as postparents - ON posts.post_parent = postparents.ID - WHERE posts.post_type IN ($post_types_list) - AND posts.post_status = 'publish' - AND (postparents.post_status IS NULL OR postparents.post_status = 'publish') - AND ( - posts.ID NOT IN ( - SELECT object_id - FROM {$wpdb->prefix}term_relationships - WHERE term_taxonomy_id IN ( - SELECT term_id - FROM `{$wpdb->prefix}terms` - WHERE slug = 'exclude-from-search' - ) - ) - ) - "; - } else if ($this->process_all_languages) { - // WMPL is active and we want to count posts for all languages. Make sure to get product - // variations that are not child of a product with 'draft' status - $query .= " - SELECT - ( - SELECT COUNT(DISTINCT posts.ID) - FROM {$wpdb->prefix}icl_translations as translations - LEFT JOIN {$wpdb->prefix}posts as posts - ON ( translations.element_id = posts.ID ) - LEFT JOIN {$wpdb->prefix}posts as postparents - ON posts.post_parent = postparents.ID - WHERE posts.post_type IN ($post_types_list) - AND posts.post_status = 'publish' - AND (postparents.post_status IS NULL OR postparents.post_status = 'publish') - AND ( - posts.ID NOT IN ( - SELECT object_id - FROM {$wpdb->prefix}term_relationships - WHERE term_taxonomy_id IN ( - SELECT term_id - FROM `{$wpdb->prefix}terms` - WHERE slug = 'exclude-from-search' - ) - ) - ) - "; - } else { - // When mulilang (WPML) is active we need to calculate posts only for - // that language so we need to join translations table to the query - // and make sure to get product variations that are not child of a product - // with 'draft' status - $query .= " - SELECT - ( - SELECT COUNT(DISTINCT posts.ID) - FROM {$wpdb->prefix}icl_translations as translations - LEFT JOIN {$wpdb->prefix}posts as posts - ON ( translations.element_id = posts.ID ) - LEFT JOIN {$wpdb->prefix}posts as postparents - ON posts.post_parent = postparents.ID - WHERE translations.language_code = '{$lang}' - AND posts.post_type IN ($post_types_list) - AND posts.post_status = 'publish' - AND (postparents.post_status IS NULL OR postparents.post_status = 'publish') - AND ( - posts.ID NOT IN ( - SELECT object_id - FROM {$wpdb->prefix}term_relationships - WHERE term_taxonomy_id IN ( - SELECT term_id - FROM `{$wpdb->prefix}terms` - WHERE slug = 'exclude-from-search' - ) - ) - ) - "; - } - - $query .= " - - ) - AS 'all_posts' - "; - - - // If there are any post types that we already fully indexed, - // count posts from them. - $indexed_post_types = array(); - - // Take all post types that are before the post type we're - // currently working on. - foreach ($this->post_types as $post_type) { - if ($post_type === $this->indexing_data->get('post_type')) { - break; - } - - $indexed_post_types[] = $post_type; - } - - - // Ok, if we have already indexed post types, add them to query. - if ($indexed_post_types) { - $indexed_post_types_list = $this->make_sql_list($indexed_post_types); - - - $query .= " - , -- Separates this select from previous - ( - SELECT - COUNT(*) - FROM $wpdb->posts - "; - - // When mulilang (WPML) is active we need to calculate posts only for - // that language so we need to join translations table to the query - - if ($lang && $sitepress) { - - $query .= "LEFT JOIN {$wpdb->prefix}icl_translations - ON $wpdb->posts.ID = {$wpdb->prefix}icl_translations.element_id - WHERE $wpdb->posts.post_type IN ($indexed_post_types_list) - AND {$wpdb->prefix}icl_translations.language_code='{$lang}' - "; - } else { - $query .= " - WHERE $wpdb->posts.post_type IN ($indexed_post_types_list) - "; - } - - $query .= " - ) - AS 'already_processed' - "; - } - - if (!$get_count_all) { - $this->log->log('Calculate Progress - Query:'); - $this->log->log($query); - } - // Add posts from the currently processed post type. - if ($this->indexing_data->get('post_type')) { - $post_type = $this->indexing_data->get('post_type'); - $last_id = $this->indexing_data->get('post_id'); - - $query .= " - , -- Separates this select from previous - ( - SELECT COUNT(*) - FROM $wpdb->posts - "; - - // When mulilang (WPML) is active we need to calculate posts only for - // that language so we need to join translations table to the query - - - - if ('yes' === Settings::get('feed', 'split_variable') && $post_type === 'product') { - $post_type_query = "($wpdb->posts.post_type = '$post_type' OR $wpdb->posts.post_type = '{$post_type}_variation')"; - } else { - $post_type_query = "$wpdb->posts.post_type = '$post_type'"; - } - - - if ($lang && $sitepress) { - $query .= " - LEFT JOIN {$wpdb->prefix}icl_translations - ON $wpdb->posts.ID = {$wpdb->prefix}icl_translations.element_id - WHERE " . $post_type_query . " - AND {$wpdb->prefix}icl_translations.language_code='{$lang}' - "; - } else { - $query .= " - WHERE " . $post_type_query . " - "; - } - - $query .= " - AND $wpdb->posts.ID <= $last_id - - ) - AS 'current_progress' - "; - } - - // Check if returned data is valid. It should be array containing one element - // (query returns one row of results) - $result = $wpdb->get_results($query); - - - - //$this->log->log( 'Calculate Progress - Result:' ); - //$this->log->log( $result ); - - if (!$result || !$result[0]) { - return 0; - } - - $result = $result[0]; - - - if ($get_count_all) { - $this->log->log('Calculate Progress - All posts to index: ' . $result->all_posts); - $this->indexing_data->set('all_posts_count', $result->all_posts); - return $result->all_posts; - } - - $already_processed = $this->indexing_data->get('processed_posts_count'); - $current_progress_get = $this->indexing_data->get('current_progress'); - - $this->log->log('Calculate Progress - Current Progress get: ' . $current_progress_get); - //$this->log->log( 'Calculate Progress - Already Processed get: ' . $already_processed); - //$this->log->log( 'Calculate Progress - Result:' ); - //$this->log->log( $result ); - - // Calculate percentage of posts processed. - // This will be - percentage of all posts from already processed post types - // plus all the posts from post type currently being processed - // that were already indexed. - // $processed_posts = 0; - // if ( isset( $already_processed ) && $already_processed > $result->current_progress ) { - // $processed_posts += $already_processed; - // } - - // if ( isset( $result->current_progress ) ) { - // $processed_posts += $result->current_progress; - // } - - $processed_posts = $current_progress_get; - - $this->log->log('Calculate Progress - Processed: ' . $processed_posts . ' out of: ' . $result->all_posts); - - $this->indexing_data->set('current_progress', $processed_posts); - - if ($processed_posts > 0) { - $current_progress = ($processed_posts / $result->all_posts) * 100; - } else { - $current_progress = 100; - $this->log->log('No items found.'); - } - - $this->log->log('Calculate Progress - Summary: ' . round($current_progress, 2) . '%'); - return $current_progress; - } - - /** - * Convert an array of string values into a list usable in an SQL query, - * so - items will be comma separated, and wrapped in "'", e.g. - * 'one','two','three' - * - * @param string[] $items - * - * @return string - */ - private function make_sql_list(array $items) - { - return implode(',', array_map(function ($item) { - return "'$item'"; - }, $items)); - } - - /** - * Get the real, public name (label) of the post type with a given slug. - * - * @param string $slug - * - * @return string - */ - private function get_post_type_name($slug) - { - $post_type = get_post_type_object($slug); - if (!$post_type) { - return $slug; - } - - return $post_type->labels->singular_name; - } - - /** - * Get the real, public name (label) of the language with a given code. - * - * @param string $slug - * - * @return string - */ - private function get_language_name($code) - { - $languages = $this->language->get_languages(); - - if (!$languages) { - return $code; - } - - return $languages[$code]['english_name'] ?? $code; - } - - - /** - * We are done so replace real index with temp one. Call replace temp index API method. - * - */ - private function call_replace_index($get_api = false) - { - - if ($get_api) { - $language = $this->indexing_data->get('lang'); - //$this->log->log( 'Call Replace Index - lang: ' . $language ); - $this->log->log('Call Replace Index - Get API Client Instance'); - $this->api = Api_Factory::get($language); - } - - $post_type = $this->indexing_data->get('post_type'); - - $api_response = $this->api->replace_index($post_type); - - $this->log->log($api_response); - - if ($api_response !== Api_Status::$success) { - - $message = __("Replacing Index \"$post_type\" with temporary one.", 'woocommerce-doofinder'); - - // if ( $sent_to_api === Api_Status::$indexing_in_progress ) { - // $message = __( "Deleting \"$post_type\" type...", 'woocommerce-doofinder' ); - // } - - $this->ajax_response_error(array( - 'status' => $api_response, - 'message' => $message, - )); - } - } - - - /** - * Check index status if it is up to date with db changes. Compare last modified dates - * for index and db changes. - * - */ - public static function is_index_data_up_to_date() - { - $last_modified_db = (int) Settings::get_last_modified_db(); - $last_modified_index = (int) Settings::get_last_modified_index(); - - if ($last_modified_db - $last_modified_index <= 5) { - return true; - } else { - return false; - } - } -} diff --git a/doofinder-for-woocommerce/includes/class-front.php b/doofinder-for-woocommerce/includes/class-front.php deleted file mode 100644 index fc7363e7..00000000 --- a/doofinder-for-woocommerce/includes/class-front.php +++ /dev/null @@ -1,422 +0,0 @@ -enqueue_script(); - $this->add_doofinder_layer_code(); - //$this->add_internal_search(); - $this->filter_search_query(); - $this->handle_banner_redirect(); - - add_action( 'woocommerce_before_main_content', array( $this, 'show_top_banner' ), 99 ); - add_action( 'doofinder_for_woocommerce_search_banner_widget', array( $this, 'show_banner' ) ); - - // Save logs at the end of the application run. - add_action( 'shutdown', function() { - $log = Transient_Log::instance(); - $log->save(); - } ); - } - - /** - * Enqueue plugin styles. - * - * @since 1.3.0 - */ - public function enqueue_script() { - add_action( 'wp_enqueue_scripts', function () { - if ( ! is_shop() ) { - return; - } - - wp_enqueue_style( - 'woocommerce-doofinder', - Doofinder_For_WooCommerce::plugin_url() . 'assets/css/styles.css' - ); - } ); - } - - /** - * Print the Doofinder Layer code in the page footer. - * - * @since 1.0.0 - */ - private function add_doofinder_layer_code() { - add_action( 'wp_footer', function () { - $script = Settings::get( 'layer', 'code' ); - - if ( 'yes' === Settings::get( 'layer', 'enabled' ) && ! empty( $script ) ) { - echo stripslashes( $script ); - } - } ); - } - - /** - * NOTICE: This is older filter replaced with filter_seach_query - * - * Hook into WooCommerce search, call Doofinder and modify WC search - * with Doofinder results. - * - * @since 1.0.0 - */ - private function add_internal_search() { - add_filter( 'posts_pre_query', function ( $posts, $query ) { - $log = Transient_Log::instance(); - $log->log( 'start Internal Search' ); - - global $wp_query, $skip_internal_search; - - // We only want to hook into and process the shop page searches, - // so we'll bail if we're on any other page. - if ( - ! is_shop() || - ! isset( $query->query['post_type'] ) || - $query->query['post_type'] !== 'product' || - - // This is set to true to make sure we don't recursively - // run this function for nested queries. - $skip_internal_search === true - ) { - if ( - ! is_shop() || - ! isset( $query->query['post_type'] ) || - $query->query['post_type'] !== 'product' - ) { - $log->log( 'Not a shop search. Aborting.' ); - } - - if ( $skip_internal_search ) { - $log->log( 'Nested search. Aborting.' ); - } - - return null; - } - - $this->search = new Internal_Search(); - - // Only use Internal Search if it's enabled and keys are present - if ( ! $this->search->is_enabled() ) { - $log->log( 'Internal Search is disabled. Aborting.' ); - - return null; - } - - $results = $this->search->search( $wp_query->query_vars ); - if ( ! $results ) { - $log->log( 'Internal search did not return results. Aborting.' ); - - return null; - } - - /* - * Returning custom array of post IDs prevents WP_Query from performing its own - * database query, therefore it is unable to figure out pagination parameters on its own, - * and we need to set them up manually. - */ - $wp_query->found_posts = $results['found_posts']; - $wp_query->max_num_pages = $results['max_num_pages']; - - $log->log( sprintf( - 'Internal Search retrieved %d items from Doofinder.', - $results['found_posts'] - ) ); - $log->log( join(', ', $results['ids'] ) ); - - return $results['ids']; - }, 10, 2 ); - } - - /** - * Hook into the query, and replace results with results from Doofinder Search. - */ - private function filter_search_query() { - - add_filter( 'posts_pre_query', function ( $posts, $query ) { - $log = Transient_Log::instance(); - $log->log( 'Filter search query' ); - - // Only run it for search. - if ( ! $query->is_search() ) { - $log->log( 'Not a search. Aborting.' ); - return $posts; - } - - // Only run it for WooCommerce product searches. - if ( function_exists( 'is_shop' ) && !is_shop() ) { - $log->log( 'Not a shop search. Aborting.' ); - return $posts; - } - - if ( isset( $query->query['post_type'] ) && $query->query['post_type'] !== 'product' ) { - $log->log( 'Not a shop search. Aborting.' ); - return $posts; - } - - // Don't fetch default WP results. - $search_query = $query->get( 's' ); - $log->log( 'Search query : ' . $search_query ); - // Below is disabled becasue it casued search term to not be displayed - // on search results page. Turning it off does not appear to interfere with - // doofinder search - //$query->set( 's', false ); - - // Search Doofinder, and override the query. - $search = new Internal_Search(); - - - // Only use Internal Search if it's enabled and keys are present - if ( !$search->is_enabled()) { - $log->log( 'Internal Search is disabled. Aborting.' ); - - return $posts; - } - - - // Determine how many posts per page. - if ( $query->get( 'posts_per_page' ) ) { - $per_page = (int) $query->get( 'posts_per_page' ); - } else { - $per_page = (int) get_option( 'posts_per_page' ); - } - - // Which page of results to show? - $page = 1; - if ( $query->get( 'paged' ) ) { - $page = (int) $query->get( 'paged' ); - } - - $log->log( 'Show page : ' . $page ); - - - $search->search_new( $search_query, $page, $per_page ); - - // If internal search is not working fall back to defaul search - if ( !$search->is_ok()) { - $log->log( 'Internal Search is not working. Aborting.' ); - - return $posts; - } - - - // Doofinder found some results. - if ( $search->get_ids() ) { - $query->found_posts = $search->get_total_posts(); - $query->max_num_pages = $search->get_total_pages(); - - $log->log( sprintf( - 'Internal Search retrieved %d items from Doofinder.', - $query->found_posts - ) ); - $log->log( join(', ', $search->get_ids() ) ); - - return $search->get_ids(); - } - - // Doofinder returned no results. - // We should make sure that the query returns no results. - // If we ignore this, or set empty array, ALL posts would be returned. - $query->found_posts = 0; - $query->max_num_pages = 0; - return []; - }, 10, 2 ); - } - - /** - * Print the search banner, but checking if it's enabled in settings. - * - * @since 1.3.0 - */ - public function show_top_banner() { - $banner_enabled = Settings::get( 'internal_search', 'banner' ); - if ( ! $banner_enabled || 'no' === $banner_enabled ) { - return; - } - - $this->show_banner(); - } - - /** - * Display the banner on top of search results. - * - * Banner comes from search API, and is only displayed on some predefined - * search result pages. - * - * @since 1.3.0 - */ - public function show_banner() { - if ( ! is_shop() || ! get_query_var( 's' ) ) { - return; - } - - if ( ! $this->search ) { - return; - } - - $banner = $this->search->getBanner(); - if ( ! $banner ) { - return; - } - - // Banner image is required. - // ID should always be present, but let's check for it just in case. - if ( ! $banner['id'] || ! $banner['image'] ) { - return; - } - - // Track banner impression - //$this->search->trackBannerImpression(); // Disabled in API v2 - - // We need to track down the banner click, so we can't redirect directly - // to the specified URL. We redirect to WP to handle tracking. - $url = add_query_arg( - 'doofinder-for-woocommerce-banner-click', - $this->obscureBannerInfo( $banner['id'], $banner['link'] ), - get_bloginfo( 'url' ) - ); - - // All data is in place, let's print the image - ?> - - - - recoverBannerInfo( $banner_data ); - if ( ! $banner_data || ! $banner_data['id'] || ! $banner_data['url'] ) { - wp_safe_redirect( get_bloginfo( 'url' ) ); - die(); - } - - $apiWrapper = new Internal_Search(); - - // It's either not enabled in options or they keys are not present. - if ( ! $apiWrapper->is_enabled() ) { - wp_safe_redirect( get_bloginfo( 'url' ) ); - die(); - } - - $apiWrapper->trackBannerClick( (int) $banner_data['id'] ); - - wp_redirect( $banner_data['url'] ); - die(); - } ); - } - - /* Helpers ********************************************************************/ - - /** - * Obscure banner information, so when it's inserted in URL id or redirect - * URL is not clearly visible, and cannot be manipulated just by - * manipulating the URL. - * - * @since 1.3.0 - * - * @see recoverBannerInfo - * - * @param int $id - * @param string $redirectUrl - * - * @return string - */ - private function obscureBannerInfo( $id, $redirectUrl ) { - return urlencode( base64_encode( "$id|$redirectUrl" ) ); - } - - /** - * Reverse the process of obscureBannerInfo to retrieve banner ID and redirect URL. - * - * @since 1.3.0 - * - * @see obscureBannerInfo - * - * @param string $banner_info - * - * @return array|bool - */ - private function recoverBannerInfo( $banner_info ) { - $decoded = base64_decode( urldecode( $banner_info ) ); - $split = preg_split( '/\|/', $decoded ); - - // The obscured string should contain exactly 2 pieces of information: - // banner id and the redirect URL. - // If there's something else that's an error. - if ( ! $split || count( $split ) !== 2 ) { - return false; - } - - return array( - 'id' => $split[0], - 'url' => $split[1], - ); - } -} diff --git a/doofinder-for-woocommerce/includes/class-helpers.php b/doofinder-for-woocommerce/includes/class-helpers.php new file mode 100755 index 00000000..097b95bc --- /dev/null +++ b/doofinder-for-woocommerce/includes/class-helpers.php @@ -0,0 +1,70 @@ +language = Multilanguage::instance(); - $this->indexing_data = Indexing_Data::instance(); - - - $this->process_cookies(); - - // Add a submenu page with indexing interface. - // $this->add_indexing_subpage(); - - // Register JS action that will handle sending one batch of data to API. - $this->register_ajax_action(); - $this->register_ajax_action_cancel(); - - // Add frontend scripts. - $this->add_admin_scripts(); - } - - /** - * After indexing is finished JS sets a cookie in order to make backend - * display the message. We need to display the message and clear - * the cookie, so that the message is not displayed again after refreshing - * the page. - * - * Because cookies are sent as headers this all needs to be done - * before rendering any HTML. - */ - private function process_cookies() { - add_action( 'admin_init', function () { - if ( ! isset( $_GET['page'] ) || $_GET['page'] !== 'wc-settings' ) { - return; - } - - // We need to remove the cookie before rendering HTML, so if the cookie - // to display success message is set - remember that information. - if ( isset( $_COOKIE['doofinder_wc_show_success_message'] ) ) { - $this->show_success_message = true; - } - - // Clear the cookie. - unset( $_COOKIE['doofinder_wc_show_success_message'] ); - setcookie( 'doofinder_wc_show_success_message', null, - 1 ); - } ); - } - - /** - * Add a subpage displaying the interface allowing to index - * all posts from the blog. - */ - // private function add_indexing_subpage() { - // add_action( 'admin_menu', function () { - // add_submenu_page( - // Settings::$top_level_menu, - // __( 'Index Posts', 'woocommerce-doofinder' ), - // __( 'Index Posts', 'woocommerce-doofinder' ), - // 'manage_options', - // 'index_posts', - // function () { - // $this->render_html_subpage(); - // } - // ); - // } ); - // } - - /** - * Register an ajax action that indexes (sends to the Doofinder API) a single batch - * of the posts. - * - * JS will call this endpoint multiple time, each time adding new batch of posts. - * - * @since 1.0.0 - */ - private function register_ajax_action() { - add_action( 'wp_ajax_doofinder_for_wc_index_content', function () { - $data = new Data_Index(); - $data->ajax_handler(); - } ); - } - - /** - * Register an ajax action that cancels the indexing. - */ - private function register_ajax_action_cancel() { - add_action( 'wp_ajax_doofider_for_wc_cancel_indexing', function () { - $data = Indexing_Data::instance(); - $data->set( 'status', 'completed' ); - $data->save(); - - wp_send_json_success(); - } ); - } - - /** - * Register scripts used by the indexing interface. - */ - private function add_admin_scripts() { - add_action( 'admin_enqueue_scripts', function () { - // Don't add these scripts on pages other than the indexing interface. - // Other pages don't use them. - $screen = get_current_screen(); - $page = $_GET['page'] ?? ''; - $tab = $_GET['tab'] ?? ''; - $section = $_GET['section'] ?? ''; - - if ( $screen->id !== 'woocommerce_page_wc-settings' && $page !== 'wc-settings' && $tab !== 'doofinder' && $section !== 'indexing' ) { - return; - } - - // JS - wp_enqueue_script( 'doofinder-for-wc-script', - Doofinder_For_WooCommerce::plugin_url() . 'assets/js/admin.js', - array( 'jquery' ) - ); - wp_localize_script( 'doofinder-for-wc-script', 'DoofinderForWC', array( - 'ajaxUrl' => admin_url( 'admin-ajax.php' ), - ) ); - - // CSS - wp_enqueue_style( - 'doofinder-for-wc-styles', - Doofinder_For_WooCommerce::plugin_url() . 'assets/css/admin.css' - ); - } ); - } - - /** - * Check if language is selected (provided a multilanguage plugin is active). - * - * If no multilanguage plugins are active this function will return true, - * because in that case it's not possible to deselect language. - * - * @return bool - */ - private function is_language_selected() { - return ( $this->language instanceof No_Language_Plugin ) || $this->language->get_active_language(); - } - - /** - * Check if API key, host and search engine hash are set in settings - * for the current language. Indexing will be impossible if - * they are missing. - * - * @param bool $process_all_languages - * @param object $language - * - * @return mixed - */ - public static function are_api_keys_present( bool $process_all_languages, $language ) { - - - $api_key = Settings::get_api_key(); - - if (!$api_key) { - return false; - } - - $api_host = Settings::get_api_host(); - - if (!$api_host) { - return false; - } - - if ($process_all_languages) { - - $api_keys_array = []; - - foreach($language->get_languages() as $lang) { - $code = $lang['locale']; - $code = $code === $language->get_base_language() ? '' : Helpers::get_language_from_locale($code); - $hash = Settings::get_search_engine_hash($code); - $hash = !$hash ? 'no-hash' : $hash; - - $api_keys_array[$code] = [ - 'lang' => $lang, - 'hash' => $hash - ]; - } - - return $api_keys_array; - - } else { - $hash = Settings::get_search_engine_hash(); - - if ($hash) { - return true; - } else { - return false; - } - } - } - - /** - * Generate the HTML of the indexing page. - */ - public function render_html_subpage() { - - $status = $this->indexing_data->get( 'status' ); - - $this->process_all_languages = $this->language->get_languages() && !$this->language->get_active_language(); - - // API keys are not present. - $has_api_keys = self::are_api_keys_present($this->process_all_languages, $this->language); - - // Set the flag that indexing is impossible because of missing api keys - $is_indexing_impossible = !$has_api_keys || (is_array($has_api_keys) && Helpers::in_array_r('no-hash',$has_api_keys,true) ) ; - - ?> - -
- language->get_languages() ) { - if ($this->language->get_active_language()) { - // We have multilanguage plugin, and language is selected. - $this->render_html_current_language_info(); - } else { - // We have multilanguage plugin, but no language is selected. - $this->render_html_all_language_info(); - } - } - - if ( Doofinder_For_WooCommerce::$disable_api_calls ) { - self::render_html_api_disabled_notice(); - } - if ( Data_Index::$should_fail || Setup_Wizard::$should_fail ) { - Setup_Wizard::render_html_should_fail_notice(); - } - - ?> - -

- - - render_html_missing_api_keys($has_api_keys); - - // Generally it should not be possible that we are in - // the middle of processing if keys are invalid, but some - // people have experienced that. Probably because of some - // DB shenanigans? In any case, if the index is being - // processed and we have no API keys that's probably and error - // so we should reset the processing. - if ( $status === 'processing' ) { - $this->indexing_data->set( 'status', 'new' ); - $this->indexing_data->save(); - - $this->render_html_indexing_reset(); - } - - // Settings are ok, we have API keys, etc. - // We can render the indexing interface. - } else { - $this->render_html_wp_debug_warning(); - $this->render_html_processing_status(); - $this->render_html_progress_bar(); - $this->render_html_progress_bar_status(); - $this->render_html_indexing_messages(); - $this->render_html_indexing_error(); - $this->render_html_index_button(); - } - - ?> -
- - - -
-

-
- - - -
-

-

language->get_current_language()['english_name'].'" language is selected. ', 'woocommerce-doofinder' ); ?>

-

-

-
- - - -
-

-

-

-

-
- - -

'. __( "API Key, API Host and/or Search Engine Hash ID are not set in Doofinder Settings%s", "woocommerce-doofinder" ) .'

- '; - - if (Multilanguage::$is_multilang) { - - if (is_array($api_keys_info)) : - - foreach ($api_keys_info as $item) { - if($item['hash'] === 'no-hash') { - echo sprintf($message," for {$item['lang']['english_name']} language."); - } - } - elseif ($this->language->get_active_language()) : - echo sprintf($message,' for selected language.'); - else : - echo sprintf($message,'.'); - endif; - - } else { - echo sprintf($message,'.'); - } - } - - /** - * Render a warning that we have just reset the indexing. - */ - public function render_html_indexing_reset() { - ?> - -
-

-
- - - -
-

-
- - - -

- - indexing_data->get( 'status' ); - - if ( ! Settings::is_configuration_complete() ) { - $url = Settings::get_url(); - - ?> - -
-

configuration and try again.', 'woocommerce-doofinder' ), $url ); ?>

-
- - - -
-

-
- - - -
-

-
- - show_success_message ) { - ?> - -
-

-
- - - -
-
-
- - - -
-

-

-

-
- - - -
-
- - -

- -

- -
-

- - -

-
- indexing_data->get( 'status' ); - $disabled = Settings::is_configuration_complete() ? '' : 'disabled'; - - $buttonText = __( 'Index all content', 'woocommerce-doofinder' ); - switch ( $status ) { - case 'processing': - $buttonText = __( 'Resume', 'woocommerce-doofinder' ); - break; - - case 'completed': - $buttonText = __( 'Reindex All', 'woocommerce-doofinder' ); - } - - ?> - -

-
    -
  • -
  • -
  • -
  • -
- - - - - - - - - -
- - 'new', - - // ID of the last post we sent to the API. - 'post_id' => 0, - - // Post type currently being indexed. - 'post_type' => 'product', - - // Should we index all languages at once or not - 'process_all_languages' => false, - - // How many posts were processed/indexed in current batch - 'current_progress' => 0, - - // How many posts were processed/indexed overall - 'processed_posts_count' => 0, - - // How many posts in total to process - 'all_posts_count' => 0, - - // Array of site languages if multisite - 'languages' => array(), - - // Language code of currently processed language. Empty string for no language. - 'lang' => '', - - // We remove the type from the index before sending posts - // of a given type. This tracks what types we've already removed. - 'post_types_removed' => array(), - - // We want to keep track of what post types we are adding - // after we remove them in order to avoid making additional requests - // to the Doofinder API. - 'post_types_readded' => array(), - - // Array of temporal indexes currently being processed - 'temp_index' => array() - ); - - /** - * All information regarding indexing the posts, from options. - * - * @var array - */ - private $data = array(); - - /** - * Retrieve (or create, if one does not exist yet) a singleton instance - * of this class. - * - * @return self - */ - public static function instance() { - if ( ! self::$instance ) { - self::$instance = new self(); - } - - return self::$instance; - } - - private function __construct() { - $data = get_option( self::$option_name ); - if ( $data ) { - $this->data = array_merge( self::$default_data, $data ); - } else { - $this->data = self::$default_data; - } - } - - /** - * Retrieve the specific piece of information pertaining to indexing the posts. - * - * @see Data_Index_Status::$data - * - * @param string $option_name - * - * @return mixed - */ - public function get( $option_name ) { - if ( isset( $this->data[ $option_name ] ) ) { - return $this->data[ $option_name ]; - } - - return null; - } - - /** - * Check if the option contains a value. - * - * Contains as in - if the option is array this function checks - * if the array contains a given value. - * - * @param string $option_name - * @param mixed $value - * - * @return bool - */ - public function has( $option_name, $value ) { - if ( ! isset( $this->data[ $option_name ] ) ) { - return false; - } - - if ( is_array( $this->data[ $option_name ] ) ) { - return in_array( $value, $this->data[ $option_name ] ); - } - - return $this->data[ $option_name ] === $value; - } - - /** - * Set the value of the piece of information about indexing the posts. - * - * @param string $option_name - * @param mixed $value - * @param bool $overwrite Set to true to overwrite data instead of merging - */ - public function set( $option_name, $value, $overwrite = false ) { - // Only save value for the options that already exist. - // That makes sure we don't write anything unexpected there. - if ( ! isset( $this->data[ $option_name ] ) ) { - return; - } - - // If both the option and value are arrays - merge. - if ( is_array( $this->data[ $option_name ] ) && is_array( $value ) && !$overwrite ) { - $this->data[ $option_name ] = array_merge( $this->data[ $option_name ], $value ); - - return; - } - - // If the option is an array - add the value. - if ( is_array( $this->data[ $option_name ] ) && !$overwrite ) { - $this->data[ $option_name ][] = $value; - - return; - } - - // Otherwise, just set the value. - $this->data[ $option_name ] = $value; - } - - - /** - * Rested the indexing data to default. - */ - public function reset() { - $this->data = self::$default_data; - } - - /** - * Save the information about posts indexing the the DB. - */ - public function save() { - update_option( self::$option_name, $this->data ); - } -} diff --git a/doofinder-for-woocommerce/includes/class-internal-search.php b/doofinder-for-woocommerce/includes/class-internal-search.php deleted file mode 100644 index d688c8fd..00000000 --- a/doofinder-for-woocommerce/includes/class-internal-search.php +++ /dev/null @@ -1,575 +0,0 @@ -log( 'Internal Search - Start' ); - - // Get global disable_api_calls flag - $this->disable_api = Doofinder_For_WooCommerce::$disable_api_calls ?? $this->disable_api; - - if ($this->disable_api) { - $log->log( '==== API IS DISABLED ====' ); - } - - $multilanguage = Multilanguage::instance(); - - // Load Internal Search settings - $enabled = Settings::get( 'internal_search', 'enable' ); // Per language setting+ - - $language_code = ''; - $lang = ''; - if ( $multilanguage->is_active() ) { - $default_language = $multilanguage->get_default_language(); - $language_code = $default_language['prefix'] ?? ''; - $lang = 'all'; - } - - $this->api_key = Settings::get( 'internal_search', 'api_key', $lang ); // Global setting - $this->hashid = Settings::get( 'internal_search', 'hashid' ); // Per language setting - $this->server = Settings::get( 'internal_search', 'search_server', $lang ); // Global setting - - $log->log('Hash ID: '.$this->hashid.', API-KEY: '.$this->api_key.', SERVER: ' . $this->server); - - - - // Check if the search is enabled and API Key and Hash ID and Server are present - $this->enabled = false; - if ( 'yes' === $enabled && ! empty( $this->api_key ) && ! empty( $this->hashid ) && ! empty( $this->server ) ) { - $this->enabled = true; - } - } - - /** - * Check if the Internal Search is enabled for the current language - * and that API Key and Hash ID are present. - * - * @return bool Is the Internal Search enabled? - */ - public function is_enabled() { - return $this->enabled; - } - - /** - * Initialize Doofinder Search Client. - */ - private function init() { - $log = Transient_Log::instance(); - $log->log( sprintf( - 'Creating Doofinder Search client: Hash ID: %s, API-KEY: %s, SERVER: %s', - $this->hashid, - $this->api_key, - $this->server - ) ); - - try { - $this->client = new Client( $this->server, $this->api_key ); - } catch ( \Exception $exception ) { - $this->working = false; - $log->log( $exception ); - } - - $log->log( 'Internal Search - Crate Api Client' ); - } - - /** - * Check the status of the search. - * - * If this returns true that means everything is ok and - * it's safe to perform search. - * - * @return bool - */ - public function is_ok() { - return $this->working; - } - - /** - * - * Starts a session in doofinder search server - * - */ - public function initSession(){ - if ( ! $this->client ) { - $this->init(); - } - - $this->client->registerSession($this->getSessionId(), $this->hash); - } - - /** - * Retrieve session id - * - * @return mixed Session string or null - */ - public function getSessionId($refresh = false) { - if ( ! $this->client ) { - $this->init(); - } - - if(!$this->sessionId || $refresh){ - $this->sessionId = $this->client->createSessionId(); - } - - return $this->sessionid; - } - - /** - * Clean session id - * - */ - public function cleanSession(){ - $this->sessionId = null; - } - - /** - * NOTICE: This is older search replaced with search_new - * Perform a Doofinder search and modify WooCommerce query. - */ - public function search( $args ) { - global $skip_internal_search; - - $log = Transient_Log::instance(); - - $log->log( 'start Doofinder Search' ); - $this->init(); - - // If we are not searching for anything, then just let WordPress do its thing - $this->parse_search_term(); - if ( null === $this->search ) { - $log->log( 'Search term not found.' ); - - } - - // Perform a Doofinder search - - $searchParams = [ - "hashid" => $this->hashid, - "query" => $this->search, - "page" => 1, - 'rpp' => 100 - ]; - - $results = null; - - try { - $log->log( 'Internal Search - Search: ' ); - $log->log( $searchParams ); - - if(!$this->disable_api) { - $log->log('=== API CALL === '); - $results = $this->client->search( $searchParams ); - $log->log(' Search successfull '); - - } else { - $results = []; - } - - } catch (\Exception $exception) { - $log->log( 'Internal Search - Exception' ); - $log->log( 'There is a problem with Doofinder Search. Error:' ); - $log->log( $exception->getMessage() ); - - wp_die("There is a problem with Doofinder Search. Error: " . $exception->getMessage()); - } - - $log->log( 'Calling Doofinder API. Results:' ); - $log->log( $results ); - - $ids = []; - - if ( $results instanceof Results ) { - - // Store a banner for later use - $this->banner = $results->getProperty( 'banner' ); - - // Process the search results we got from Doofinder - $ids = $this->ids_from_results( $results ); - $log->log( sprintf( - 'Extracted ids: %s', - join( ', ', $ids ) - ) ); - - // If no ids where found via Doofinder return early with no results - if(empty($ids)) { - return array( - 'ids' => [], - 'found_posts' => 0, - 'max_num_pages' => 0, - ); - } - } - - // Remove WP search - we don't want WP and Doofinder search to overlap. - unset( $args['s'] ); - - // Only take posts with IDs returned from Doofinder. - $args['post__in'] = $ids; - - // If we're splitting variable products they are being exported as separate entries - // in the feed, and the JS Layer will display them as separate products. - // In order to keep Internal Search consistent and display them as separate products - // there too we need make sure to query for them too. - $args['post_type'] = ['product', 'product_variation']; - - $args['fields'] = 'ids'; - $args['orderby'] = 'post__in'; - - // $skip_internal_search is a flag preventing firing the filter in nested queries. - $log->log( 'start nested search' ); - $skip_internal_search = true; - $posts = new \WP_Query( $args ); - $skip_internal_search = false; - $log->log( 'end nested search' ); - - $log->log( 'Doofinder Search completed.' ); - - - return array( - 'ids' => $posts->posts, - 'found_posts' => $posts->found_posts, - 'max_num_pages' => $posts->max_num_pages, - ); - } - - /* New search ******************************************************************/ - - /** - * Perform a Doofinder search, grab results and extract - * from the results all data that will be interesting - * to other classes (list of post ids, number of pages - * of results, etc). - * - * @param string $query - * @param int $page - * @param int $per_page - */ - public function search_new( $query, $page = 1, $per_page = 100 ) { - - $log = Transient_Log::instance(); - - $log->log( 'Start Doofinder search new' ); - $this->init(); - - if ( null === $query ) { - $log->log( 'Search term not found.' ); - } - - $this->per_page = $per_page; - - $log->log( 'Per page: ' .$per_page ); - // Doofinder API throws exceptions when anything goes wrong./ - // We don't actually need to handle this in any way. If search - // throws an exception, the list of IDs will be empty - // and Internal Search will display empty list of results. - try { - - $queryParams = apply_filters( - 'woocommerce_doofinder_internal_search_params', - [ - "hashid" => $this->hashid, - "query" => $query, - "page" => $page, - 'rpp' => $per_page - ], - $this - ); - - $log->log( 'Internal Search - Search: ' ); - $log->log( $queryParams ); - - - if(!$this->disable_api) { - $log->log('=== API CALL === '); - $this->results = $this->client->search( $queryParams ); - $log->log(' Search successfull '); - - } else { - $this->results = []; - } - - $this->extract_ids(); - $this->calculate_totals(); - - $log->log( 'Calling Doofinder API. Results:' ); - $log->log( $this->results ); - - $log->log( sprintf( - 'Extracted ids: %s', - join( ', ', $this->ids ) - ) ); - - - } catch ( \Exception $exception ) { - $log->log( 'Internal Search - Exception' ); - $log->log( 'There is a problem with Doofinder Search. Error:' ); - $log->log( $exception->getMessage() ); - $log->log( 'Falling back to default wordpress search.' ); - - $this->working = false; - - } - } - - /** - * Retrieve the list of ids of posts returned by the search. - * - * @return int[] - */ - public function get_ids() { - return $this->ids; - } - - /** - * Retrieve the number of posts found by Doofinder. - * - * @return int - */ - public function get_total_posts() { - return $this->found_posts; - } - - /** - * How many pages of posts did Doofinder find? - * - * @return int - */ - public function get_total_pages() { - return $this->pages; - } - - /** - * Go through the results from Doofinder and generate - * a list of post IDs based on the returned results. - */ - private function extract_ids() { - $results = $this->results->getResults(); - $this->ids = array(); - foreach ( $results as $result ) { - $this->ids[] = $result['id']; - } - } - - /** - * Determine how many posts the search returned and how many - * pages of results there are. - */ - private function calculate_totals() { - $this->found_posts = $this->results->getProperty( 'total' ); - $this->pages = ceil( $this->found_posts / $this->per_page ); - } - - - /* Tracking *******************************************************************/ - - /** - * Retrieve the banner we obtained when making a Doofinder search. - * - * This will be null if the search did not contain a banner. - * - * @since 1.3.0 - * @return array - */ - public function getBanner() { - return $this->banner; - } - - - - /** - * Track banner impression. - * - * @since 1.3.0 - */ - public function trackBannerImpression() { - // NOTE: This is not used anymore in API v2 - // if ( ! $this->banner || ! $this->banner['id'] ) { - // return; - // } - // $this->client->registerBannerDisplay( (int) $this->banner['id'] ); - return; - } - - /** - * Track banner click. - * - * @since 1.3.0 - * - * @param int $bannerId - */ - public function trackBannerClick( $bannerId ) { - if ( ! $this->client ) { - $this->init(); - } - // TODO Migrate this to API v2 - //$this->client->registerBannerClick( $bannerId ); - } - - /* Search parameters **********************************************************/ - - /** - * Grab the term searched for and transform into value accepted by Doofinder API. - */ - private function parse_search_term() { - $log = Transient_Log::instance(); - $log->log( 'looking for search term' ); - - if ( ! is_search() ) { - $log->log( 'not a search page, aborting' ); - - return; - } - - $term = get_query_var( 's' ); - - // Doofinder API does not accept empty string. Null displays all products. - if ( empty( $term ) ) { - $log->log( 'found empty search' ); - - $term = null; - } - - $log->log( sprintf( 'search term found: %s', $term ) ); - $this->search = $term; - } - - /* Helpers ********************************************************************/ - - /** - * Extract IDs from Doofinder Search Results. - * - * @param Results $results Results returned by Doofinder Search Client. - * - * @return array IDs of products. - */ - private function ids_from_results( Results $results ) { - return array_map( function ( $item ) { - return $item['id']; - }, $results->getResults() ); - } -} diff --git a/doofinder-for-woocommerce/includes/class-js-layer.php b/doofinder-for-woocommerce/includes/class-js-layer.php new file mode 100644 index 00000000..784e6d7f --- /dev/null +++ b/doofinder-for-woocommerce/includes/class-js-layer.php @@ -0,0 +1,84 @@ +log = new Log(); + + $this->insert_js_layer(); + } + + /** + * Insert the code of the JS Layer to HTML. + */ + private function insert_js_layer() + { + add_action('wp_footer', function () { + $this->insert_js_layer_from_options(); + }); + } + + /** + * Output JS Layer script pasted by the user in the options. + */ + private function insert_js_layer_from_options() + { + + $multilanguage = Multilanguage::instance(); + $lang = $multilanguage->get_current_language(); + $layer = Settings::get_js_layer($lang); + + if (defined('WP_ENVIRONMENT_TYPE') && WP_ENVIRONMENT_TYPE === 'local' && defined('DF_SEARCH_HOST') && defined('DF_LAYER_HOST')) { + $local_constants = " -log->log('Clear All Settings'); - - // Clear global settings - - Settings::set_api_key(''); - Settings::set_api_host(''); - Settings::set_admin_endpoint(''); - Settings::set_search_engine_server(''); - - - - // If there's no plugin active we still need to process 1 language. - $languages = $this->language->get_formatted_languages(); - - if (!$languages) { - $languages[''] = ''; - } - - // Clear per language settings - - foreach ($languages as $language_code => $language_name) { - // Suffix for options. - // This should be empty for default language, and language code - // for any other. - $options_suffix = ''; - $name_suffix = ''; - - if ($language_code !== $this->language->get_base_language()) { - $options_suffix = Helpers::get_language_from_locale($language_code); - $name_suffix = "-$language_code"; - } - - // Search engine data - Settings::set_search_engine_hash('', $options_suffix); - - // Internal Search - Settings::disable_internal_search($options_suffix); - - // JS Layer - Settings::disable_js_layer($options_suffix); - // JS Layer Code - Settings::set_js_layer('', $options_suffix); - } - } - - /** - * Get or create JS Layer for given search engine - * - * @param string $hash Search engine hash id - * @param string $admin_endpoint - * @param bool $get Request method switch. True for GET false for POST. - * - * @return mixed Code of the JS layer or false on error - */ - - public function manage_js_layer($hash, $get) - { - /* - This should be removed - */ - - if ($get) { - $label = 'Get'; - $method = 'GET'; - } else { - $label = 'Create'; - $method = 'POST'; - } - - $this->log->log($label . ' JS layer'); - - $api_key = Settings::get_api_key(); - - if (!$api_key) { - $this->errors['wizard-step-4']['api-key'] = __('API key is missing.', 'woocommerce-doofinder'); - $this->log->log($label . ' JS layer - Error - API key is missing.'); - return false; - } - - $admin_endpoint = Helpers::prepare_host(Settings::get_admin_endpoint()); - - if (!$admin_endpoint) { - $this->errors['wizard-step-4']['admin-endpoint'] = __('Admin Endpoint is missing.', 'woocommerce-doofinder'); - $this->log->log($label . ' JS layer - Error - Admin Endpoint is missing.'); - return false; - } - - $client = new GuzzleClient(); - - $body = ''; - $script = ''; - - try { - - if (!$this->disable_api) { - - $this->log->log('=== API CALL === '); - //$this->log->log("{$admin_endpoint}/plugins/{$hash}/script/woocommerce"); - - $res = $client->request($method, "{$admin_endpoint}/plugins/{$hash}/script/woocommerce", [ - 'headers' => [ - 'Authorization' => "Token {$api_key}" - ] - ]); - - if ($res) { - $body = json_decode($res->getBody()->getContents()); - $script = $body->script ?? ''; - } - } - - //$this->log->log( $label . ' JS layer Response - Script' ); - //$this->log->log( $script ); - - return $script; - } catch (\Exception $exception) { - $this->log->log($label . ' JS layer - Exception'); - - $this->log->log($exception->getMessage()); - - return false; - } catch (\Error $error) { - $this->log->log($label . ' JS layer - Error'); - - $this->log->log($error->getMessage()); - - return false; - } - } - - - private function check_api_settings($step) - { - $api_key = $_REQUEST['api_token'] ?? null; - $api_host = $_REQUEST['api_endpoint'] ?? null; // i.e: eu1-api.doofinder.com for API v2.0 - $admin_endpoint = $_REQUEST['admin_endpoint'] ?? null; // i.e: eu1-admin.doofinder.com for API v2.0 - $search_endpoint = $_REQUEST['search_endpoint'] ?? null; // i.e: eu1-search.doofinder.com for API v2.0 - - if (empty($api_key)) { - $this->add_wizard_step_error($step, 'api-key', __('API key is missing.', 'woocommerce-doofinder')); - } else { - $this->remove_wizard_step_error($step, 'api-key'); - } - - if (empty($api_host)) { - $this->add_wizard_step_error($step, 'api-host', __('API host is missing.', 'woocommerce-doofinder')); - } else { - $this->remove_wizard_step_error($step, 'api-host'); - } - - if (empty($admin_endpoint)) { - $this->add_wizard_step_error($step, 'admin-endpoint', __('Admin endpoint is missing.', 'woocommerce-doofinder')); - } else { - $this->remove_wizard_step_error($step, 'admin-endpoint'); - } - - if (empty($search_endpoint)) { - $this->add_wizard_step_error($step, 'search-endpoint', __('Search endpoint is missing.', 'woocommerce-doofinder')); - } else { - $this->remove_wizard_step_error($step, 'search-endpoint'); - } - - if (!empty($this->errors['wizard-step-' . $step])) { - return FALSE; - } - - // Api Host should contain 'https://' protocol, i.e. https://eu1-api.doofinder.com - if (!preg_match("#^((https?://)|www\.?)#i", $api_host)) { - $api_host = 'https://' . $api_host; - } - - // Admin Endpoint should contain 'https://' protocol, i.e. https://eu1-api.doofinder.com - if (!preg_match("#^((https?://)|www\.?)#i", $admin_endpoint)) { - $admin_endpoint = 'https://' . $admin_endpoint; - } - - // Search Endpoint should contain 'https://' protocol, i.e. https://eu1-api.doofinder.com - if (!preg_match("#^((https?://)|www\.?)#i", $search_endpoint)) { - $search_endpoint = 'https://' . $search_endpoint; - } - - return [ - 'api_key' => $api_key, - 'api_host' => $api_host, - 'admin_endpoint' => $admin_endpoint, - 'search_endpoint' => $search_endpoint - ]; - } - - private function is_valid_token($step) - { - $token = $_POST['token'] ?? ''; - $saved_token = $this->getToken(); - - // Exit early if tokens do not match - if ($token !== $saved_token) { - $this->log->log('Processing Wizard Step 2 - Recieved Token - ' . $token); - $this->log->log('Processing Wizard Step 2 - Saved Token - ' . $saved_token); - $this->add_wizard_step_error($step, 'token', __('Invalid token', 'woocommerce-doofinder')); - return false; - } else { - $this->remove_wizard_step_error($step, 'token'); - } - return true; - } - - private function test_api_settings($api_settings, $step) - { - extract($api_settings); - - if (!$this->disable_api) { - try { - $client = new ManagementClient($api_host, $api_key); - $this->log->log('Wizard Step ' . $step . ' - Call Api - List search engines '); - $this->log->log('Wizard Step ' . $step . ' - API key: ' . $api_key); - $this->log->log('Wizard Step ' . $step . ' - API host: ' . $api_host); - - $response = $client->listSearchEngines(); - $this->log->log('Wizard Step ' . $step . ' - List Search engines Response: '); - $this->log->log($response); - - $this->log->log('Wizard Step ' . $step . ' - List search engines - success '); - return true; - } catch (\DoofinderManagement\ApiException $exception) { - $this->log->log('Wizard Step ' . $step . ': ' . $exception->getMessage()); - $this->add_wizard_step_error($step, 'api-endpoint-connection-failed', __('Could not connect to the API. API Key or Host is not valid.', 'woocommerce-doofinder')); - } catch (\Exception $exception) { - $this->log->log('Wizard Step ' . $step . ' - Exception '); - $this->log->log($exception); - - if ($exception instanceof DoofinderError) { - $this->log->log($exception->getBody()); - } - } - } else { - return true; - } - return false; - } - - private function save_api_settings($api_settings) - { - extract($api_settings); - // Check if api key already exists and is the same - // If api key is different clear all settings - $saved_api_key = Settings::get_api_key(); - - if ($saved_api_key !== $api_key) { - $this->clear_all_settings(); - } - - Settings::set_api_key($api_key); - Settings::set_api_host($api_host); - Settings::set_admin_endpoint($admin_endpoint); - Settings::set_search_engine_server($search_endpoint); - } - - - private function get_wizard_errors() - { - return get_option('woocommerce_doofinder_wizard_errors', []); - } - - private function set_wizard_errors($errors) - { - return update_option('woocommerce_doofinder_wizard_errors', $errors); - } - - private function add_wizard_step_error($step, $field_name, $error) - { - $this->log->log('Processing Wizard Step ' . $step . ' - Error - ' . $error); - - $errors = $this->get_wizard_errors(); - $this->errors['wizard-step-' . $step][$field_name] = $error; - - if (!isset($errors['wizard-step-' . $step])) { - $errors['wizard-step-' . $step] = []; - } - - $errors['wizard-step-' . $step][$field_name] = $error; - $this->set_wizard_errors($errors); - } - - private function remove_wizard_step_error($step, $field_name) - { - $errors = $this->get_wizard_errors(); - if (isset($errors['wizard-step-' . $step]) && isset($errors['wizard-step-' . $step][$field_name])) { - unset($errors['wizard-step-' . $step][$field_name]); - $this->set_wizard_errors($errors); - } - } - - - - /** - * Alias for creating JS Layer for given search engine - * - * @param string $hash Search engine hash id - * - * @return mixed Code of the JS layer or false on error - * - */ - - public function create_js_layer($hash) - { - return $this->manage_js_layer($hash, false); - } - - - /** - * Check if we should migrate settings - * - * @return bool - */ - public static function should_migrate() - { - - $log = new Log(); - $migration_option = get_option(self::$wizard_migration_option); - - // Migration was already done, we should abort - if ($migration_option === 'completed' || $migration_option === 'failed') { - //$log->log( 'Should migrate - Migration already done or not possible' ); - return false; - } - - $api_key = Settings::get_api_key(); - - - if ($api_key) { - //$log->log( 'Should migrate - Migration possible - Api Key' ); - return true; - } - - if (!Settings::get_api_host()) { - //$log->log( 'Should migrate - Migration possible - Api Host' ); - return true; - } - - if (!Settings::get_admin_endpoint()) { - //$log->log( 'Should migrate - Migration possible - Admin Endpoint' ); - return true; - } - - if (!Settings::get_search_engine_server()) { - //$log->log( 'Should migrate - Migration possible - Search Server' ); - return true; - } - - // Migration not necessary - $log->log('Should migrate - Migration not necessary'); - update_option('woocommerce_doofinder_migration_status', 'completed'); - - return false; - } - - /** - * Try migrating old settings - */ - - public static function migrate() - { - $log = new Log(); - //$log->log( 'Migrate - Start' ); - - $api_key = Settings::get_api_key(); - - if (preg_match('@-@', $api_key)) { - $arr = explode('-', $api_key); - } - - $api_key_prefix = $arr[0] ?? null; - $api_key_value = $arr[1] ?? null; - - if (!$api_key) { - - // Migration not possible - $log->log('Migrate - Migration Not Possible'); - update_option(self::$wizard_migration_option, 'failed'); - - // Disable doofinder search - Settings::disable_internal_search(); - Settings::disable_js_layer(); - - return false; - } - - // All good, save api key value - $log->log('Migrate - Set Api key'); - - // Old API key prefix should be removed since new API version is not containing prefixes - if ($api_key_value) { - Settings::set_api_key($api_key_value); - } else { - Settings::set_api_key($api_key); - } - - /* - * Since there may be two different scenarios during plugin migration, - * first if user migrating from older version where api host is not containing 'https://' protocol and - * second scenario if user is migirating form newer version where 'https://' protocol exisist in settings, - * we need to check both cases to isolate prefix. - */ - $api_host = Settings::get_api_host(); - - // Check if api host contains prefix, then isolate prefix - if (preg_match('@-@', $api_host)) { - $arr = explode('-', $api_host); - } - - $api_host_prefix = $arr[0] ?? null; - - // Check if prefix contains protocol, then isolate prefix - if (preg_match("#^((https?://)|www\.?)#i", $api_host_prefix)) { - $arr = preg_split("#^((https?://)|www\.?)#i", $api_host_prefix); - $api_host_prefix = $arr[1] ?? null; - } - - $log->log('Host: ' . $api_host); - $log->log('Host prefix: ' . $api_host_prefix); - - // Check and update api host - $api_host_base = '-api.doofinder.com'; - if (!$api_host || !preg_match("@$api_host_prefix-api@", $api_host) || !preg_match("#^((https?://)|www\.?)#i", $api_host)) { - $log->log('Migrate - Set Api Host'); - Settings::set_api_host('https://' . $api_host_prefix . $api_host_base); - } - - // Check and update admin endpoint - $admin_endpoint_base = '-admin.doofinder.com'; - $admin_endpoint = Settings::get_admin_endpoint(); - - if (!$admin_endpoint || !preg_match("@$api_host_prefix-app@", $admin_endpoint || !preg_match("#^((https?://)|www\.?)#i", $admin_endpoint))) { - $log->log('Migrate - Set Admin Endpoint'); - Settings::set_admin_endpoint('https://' . $api_host_prefix . $admin_endpoint_base); - } - - // Check and update search server - $search_server_base = '-search.doofinder.com'; - $search_server = Settings::get_search_engine_server(); - - if (!$search_server || !preg_match("@$api_host_prefix-search@", $search_server || !preg_match("#^((https?://)|www\.?)#i", $search_server))) { - $log->log('Migrate - Set Search Server'); - Settings::set_search_engine_server('https://' . $api_host_prefix . $search_server_base); - } - - // Add notice about successfull migration - $log->log('Migrate - Add custom notice'); - \WC_Admin_Notices::add_custom_notice(self::$wizard_migration_notice_name, Setup_Wizard::get_setup_wizard_migration_notice_html()); - //$log->log( 'Migrate - Set Transient' ); - //set_transient( self::$wizard_migration_notice_transient, 1 ); - - // Migration completed - $log->log('Migrate - Migration Completed'); - update_option(self::$wizard_migration_option, 'completed'); - } - - private function set_search_engines($search_engines) - { - $log = new Log(); - $currency = get_woocommerce_currency(); - foreach ($search_engines as $language => $search_engine) { - $currency_key = strtoupper($currency); - //format language to en_US instead of en-US format - $language = Helpers::format_locale_to_underscore($language); - $language_key = Helpers::get_language_from_locale($language); - $is_primary_language = strtolower($this->language->get_base_language()) === strtolower($language); - if (!property_exists($search_engine, $currency)) { - $currency_key = strtolower($currency); - } - - if (property_exists($search_engine, $currency_key)) { - $search_engine_hash = $search_engine->$currency; - if (!$this->process_all_languages || $is_primary_language) { - $language_key = ''; - } - $log->log("Setting SE hash for language '$language_key'"); - Settings::set_search_engine_hash($search_engine_hash, $language_key); - } else { - $log->log("Couldnt find currency $currency"); - } - } - } - - private function enable_layer($script) - { - $log = new Log(); - // If there's no plugin active we still need to process 1 language. - $languages = $this->language->get_formatted_languages(); - $currency = strtolower(get_woocommerce_currency()); - if (!$languages) { - $languages[''] = ''; - } - - foreach ($languages as $language_code => $language_name) { - // Suffix for options. - // This should be empty for default language, and language code - // for any other. - $options_suffix = ''; - - if ($language_code !== $this->language->get_base_language()) { - $options_suffix = Helpers::get_language_from_locale($language_code); - } - - //Enable internal search - Settings::enable_internal_search($options_suffix); - - // Enable JS Layer - Settings::enable_js_layer($options_suffix); - - //Convert language to hyphen format used by live layer (en-US) - $language_code = Helpers::format_locale_to_hyphen($language_code); - $lang_config = "language: '$language_code',\n currency: '$currency',\n installationId:"; - $aux_script = !empty($language_code) ? str_replace("installationId:", $lang_config, $script) : $script; - - $log->log('Installing script for language: ' . $language_code); - $log->log($aux_script); - - // JS Layer Code - Settings::set_js_layer($aux_script, $options_suffix); - } - } -} + string] + */ + private $errors = array(); + + /** + * Instance of a class used to log to a file. + * + * @var Log + */ + private $log; + + /** + * Admin path used to get the connection details + * + * @var string + */ + const ADMIN_PATH = "http://admin.doofinder.com"; + + public function __construct() + { + + $this->log = new Log(); + $this->language = Multilanguage::instance(); + $this->process_all_languages = empty($this->language->get_languages()) ? false : true; + + //$this->log->log("Setup Wizard Construct"); + + // Load erros stored in cookies and delete after + if (isset($_COOKIE['doofinderError'])) { + foreach ($_COOKIE['doofinderError'] as $key => $value) { + $this->errors[$key] = $value; + + // Delete error cookie when reloading wizard page + if (self::is_wizard_page() && !\wp_doing_ajax()) { + $this->log->log("Deleting Error Cookies"); + unset($_COOKIE['doofinderError'][$key]); + setcookie("doofinderError[{$key}]", null, -1, '/'); + } + } + } + + if (self::is_wizard_page() && !\wp_doing_ajax()) { + $this->set_wizard_errors([]); + } + + if (current_user_can('manage_options')) { + add_action('admin_menu', array($this, 'admin_menus')); + + $this->register_ajax_action(); + } + + self::add_notices(); + } + + /** + * Check if on setup wizard page + * + * @return bool + */ + + public static function is_wizard_page() + { + return (is_admin() && isset($_GET['page']) && $_GET['page'] === 'df-setup'); + } + + /** + * Callback for WP rest api endpoint for connecting doofinder account + */ + public static function connect() + { + + $setup_wizard = self::instance(); + $setup_wizard->log->log('Setup Wizard - Connect'); + return $setup_wizard->process_step_2(true); + } + + /** + * Create (or retrieve, if already exists), the singleton + * instance of this class. + * + * @return self + */ + public static function instance() + { + if (!self::$instance) { + self::$instance = new self(); + } + + return self::$instance; + } + + /** + * Register an ajax action that processes wizard step 2 and creates search engines. + * + * + * @since 1.0.0 + */ + private function register_ajax_action() + { + + add_action('wp_ajax_doofinder_check_data', function () { + self::check_data(); + }); + + add_action('wp_ajax_doofinder_set_connection_data', function () { + $this->log->log('Setup Wizard - Connect'); + $this->process_step_2(true); + $resp = ["success" => Settings::is_api_configuration_complete()]; + + if (!empty($this->errors['wizard-step-2'])) { + $resp = [ + "success" => false, + "errors" => $this->errors['wizard-step-2'] + ]; + } + + die(json_encode($resp)); + }); + } + + + /** + * Check if we should enable the setup wizard, or if it's + * not necessary (because for example, it's been already performed). + * + * @return bool + */ + public static function should_activate() + { + $after_wizard = get_option(self::$wizard_done_option); + + return !(bool) $after_wizard; + } + + /** + * Check if we should show admin notice about wizard setup, or if it's + * not necessary (because for example, user dissmised it or completed setup). + * + * @return bool + */ + public static function should_show_notice() + { + $show_notice = get_option(self::$wizard_show_notice_option); + + $config_complete = Settings::is_configuration_complete(); + return ((bool) $show_notice) && !$config_complete; + } + + /** + * Check if we should show admin notice about indexing status, or if it's + * not necessary. + * + * @return bool + */ + public static function should_show_indexing_notice() + { + $multilanguage = Multilanguage::instance(); + $show_notice = (bool) get_option(self::$wizard_show_indexing_notice_option, 0); + $lang = $multilanguage->get_current_language(); + $indexing_status = Settings::get_indexing_status($lang); + $res = $show_notice && $indexing_status === "processing"; + return $res; + } + + /** + * Activate the setup wizard. + * + * When it is active (the option is set to truthy value) users that can + * manage options will see custom screen (the setup wizard) instead + * of admin panel. + */ + public static function activate($notice = false) + { + update_option(self::$wizard_active_option, true); + + if ($notice) { + update_option(self::$wizard_show_notice_option, true); + } + } + + /** + * Deactivate the setup wizard and set the flag making sure + * to not display it anymore. + */ + public static function deactivate() + { + update_option(self::$wizard_active_option, false); + update_option(self::$wizard_done_option, true); + update_option(self::$wizard_show_notice_option, false); + update_option(self::$wizard_show_indexing_notice_option, false); + } + + /** + * Dissmiss the admin setup wizard notice and set the flag making sure + * to not display it anymore. + */ + public static function dissmiss_notice() + { + update_option(self::$wizard_show_notice_option, false); + } + + /** + * Is the setup wizard active (should we display it)? + * + * @return bool + */ + public static function is_active() + { + return (bool) get_option(self::$wizard_active_option); + } + + /** + * Generate token used for login/signup via popup + * + * @return string token + */ + public function generateToken() + { + $time = time(); + $rand = rand(); + return md5("$time$rand"); + } + + /** + * Save token used for login/signup in db + * + * @param string $token + */ + public function saveToken($token) + { + update_option(self::$wizard_request_token, $token); + } + + /** + * Get token used for login/signup saved in db + * + * @return string $token + */ + public function getToken() + { + return get_option(self::$wizard_request_token); + } + + /** + * Get the absolute path of the URL to setup wizard that Doofinder will + * use for the POST request. The path will be appended to the origin domain. + * + * @return string path + */ + public function getReturnPath() + { + $setup_wizard_url = get_site_url(null, 'wp-json/doofinder-for-wp/v1/connect/'); + return $setup_wizard_url; + } + + /** + * What the current step of the wizard is? This is the last step + * that the user have seen and not submitted yet. + * + * @return int + */ + public static function get_step() + { + $step = get_option(self::$wizard_step_option); + if (!$step) { + $step = 1; + } + + return (int) $step; + } + + /** + * Move to the next step. If this was the last step + * deactivate the Setup Wizard. + */ + public static function next_step($step = null, $redirect = true) + { + + if ($step === null) { + $current_step = self::get_step(); + $current_step++; + $redirect_url = self::get_url(); + } else { + $current_step = $step; + $redirect_url = self::get_url(['step' => $step]); + } + + // If on last step deactivate wizard and redirect to settings page + + if ($current_step > self::$no_steps) { + self::remove_notice(); + + // Reset wizard to step 1 + update_option(self::$wizard_step_option, 1); + + //Set the indexing status to processing + self::set_indexing_status('processing'); + + //Show the indexing notice + $notice_id = 'df-indexing-status'; + Admin_Notices::add_custom_notice($notice_id, self::get_indexing_status_notice_html($notice_id)); + update_option(self::$wizard_show_indexing_notice_option, 1); + + // Update wizard status to finished if configuration is complete + if (Settings::is_configuration_complete()) { + update_option(self::$wizard_status, self::$wizard_status_finished); + } + +?> + + get_languages(); + + if (is_null($languages)) { + Settings::set_indexing_status($status); + } else { + foreach ($languages as $lang => $value) { + if ($lang === $multilanguage->get_base_language()) { + $lang = ''; + } + Settings::set_indexing_status($status, $lang); + } + } + } + + /** + * Show wizard + * + * @return void + */ + private function admin_page_init() + { + + if (empty($_GET['page']) || 'df-setup' !== $_GET['page']) { + return; + } + + global $sitepress; + + if ($sitepress) { + $sitepress->switch_lang('all'); + $this->active_lang = $sitepress->get_current_language(); + } else { + $this->active_lang = ''; + } + + // Show wizard, if active. + if (self::is_active()) { + $this->show_wizard(); + } else { + wp_safe_redirect(Settings::get_url()); + die(); + } + } + + /** + * Add admin page for setup wizard. + * + * @return void + */ + public function admin_menus() + { + add_dashboard_page('', '', 'manage_options', 'df-setup', $this->admin_page_init()); + } + + /** + * Get url of the setup wizard admin page, + * you can add url parameters via $args + * + * @param array $args Associative array with query parameters key -> value + * + * @return string + */ + public static function get_url($args = []) + { + + $url = admin_url('admin.php?page=df-setup'); + + if (!empty($args)) { + $url = add_query_arg($args, $url); + } + + return $url; + } + + /** + * Check if setting exist in db and return response + */ + public static function check_data() + { + + $has_error = FALSE; + $error = ''; + $errors = self::get_wizard_errors(); + if (isset($errors['wizard-step-2']) && !empty($errors['wizard-step-2'])) { + $has_error = true; + $error = $errors['wizard-step-2']; + } + + if ($has_error) { + $status = 'error'; + } elseif (Settings::is_api_configuration_complete()) { + $status = 'saved'; + // Check if step was already set to 3, if not do it + if (self::get_step() !== 3) { + self::next_step(3, false); + } + } else { + $status = 'not-saved'; + } + + wp_send_json_success([ + 'status' => $status, + 'error' => $error + ]); + } + + /** + * Wizard setup notice html + * + * @param bool $settings + * + * @return string + */ + public static function get_setup_wizard_notice_html($settings = true) + { + + $message = __('Please, run setup wizard to finish installation.', 'wordpress-doofinder'); + if (Settings::is_configuration_complete()) { + $message = __('Looks like Doofinder is already set up. You can review the configuration in the settings or run the setup wizard.', 'wordpress-doofinder'); + } + + //Hide the settings button in settings page + if (@$_GET['page'] === "doofinder_for_wp") { + $settings = false; + } + + ob_start(); + ?> +
+
+
+ +
+

+

+ +

+
+ +
+
+
+ +
+
+
+
+ +
+

+

+

+ +
+
+ +
+
+
+
+
+ +
+

+

+
+
+ +
+
+
+
+
+ +
+
+
+ +
+

+

+ +

+
+
+
+
+ +

+ 1]) ?>" class="button-secondary"> +

+ errors[$name])) { + return $this->errors[$name]; + } elseif (isset($_COOKIE['doofinderError'])) { + $cookie = $_COOKIE['doofinderError']; + unset($_COOKIE['doofinderError'][$name]); + return $cookie; + } + + return null; + } + + /** + * Render error html for a given field. + * + * @param string $name + * + * @return string + */ + public function get_errors_html($name) + { + $error = $this->get_error($name); + $error_template = '
%s
'; + + + $html = ''; + + if ($error) { + + if (is_array($error)) { + foreach ($error as $err) { + $html .= sprintf($error_template, $err); + } + } else { + $html .= sprintf($error_template, $error); + } + } + + return $html; + } + + /** + * A callback for processing installation wizard steps. + * + * Each step of the wizard is being handled by its own method. + */ + private function process_wizard_step($step = null) + { + + $step = $step ?: self::get_step(); + switch ($step) { + case 1: + $this->process_step_1(); + break; + + case 2: + $this->process_step_2(); + break; + + case 3: + $this->process_step_3(); + break; + } + } + + /** + * Handle the submission of step 1 - Sector collection + */ + private function process_step_1($processing = false) + { + $is_processing = (isset($_REQUEST['process-step']) && $_REQUEST['process-step'] === '1') || $processing === true; + $step = 1; + if (!$is_processing) { + return; + } + + $this->log->log('Processing Wizard Step 1 - Processing...'); + + $sector = isset($_REQUEST['sector']) ? $_REQUEST['sector'] : null; + if (!empty($sector)) { + Settings::set_sector($sector); + $this->js_go_to_step(2); + } else { + $this->add_wizard_step_error($step, 'sector', __('Please select a sector.', 'wordpress-doofinder')); + } + } + + + /** + * Handle the submission of step 2 - Login or setup. Save data. + */ + private function process_step_2($processing = false) + { + + $is_processing = (isset($_REQUEST['process-step']) && $_REQUEST['process-step'] === '2') || $processing === true; + $step = 2; + + if (!$is_processing) { + return; + } + + $this->log->log('Processing Wizard Step 2 - Processing...'); + + if (!$this->is_valid_token($step)) { + return; + } + + $api_settings = $this->check_api_settings($step); + if (!is_array($api_settings)) { + return; + } + + extract($api_settings); + $this->save_api_settings($api_settings); + $this->log->log('Processing Wizard Step 2 - All data saved'); + + $this->log->log('Make call to doomanager to create store'); + + self::creating_all_structure(); + + // ...and move to the next step. + self::next_step(3, false); + } + + /** + * Create Store and save search_engine in DB. + */ + private function creating_all_structure() + { + + $has_search_engines = self::are_api_keys_present($this->process_all_languages, $this->language); + $store_data = []; + + // If there's no plugin active we still need to process 1 language. + if (!Multilanguage::$is_multilang) { + $has_search_engines = [ + "" => [ + 'hash' => 'no-hash' + ] + ]; + } + + if (is_array($has_search_engines)) { + // Create search engine + $this->log->log('Wizard Step 2 - Try Create the Store'); + $this->log->log('=== Store API CALL === '); + try { + $store_api = new Store_Api(); + $store_data = $store_api->create_store($has_search_engines); + + if (array_key_exists('errors', $store_data)) { + $message = ""; + foreach ($store_data['errors'] as $error) { + $message .= $error . ". "; + } + throw new Exception($message); + } + + $this->log->log('Store create result:'); + $this->log->log(print_r($store_data, true)); + + $this->set_search_engines($store_data['search_engines']); + $this->set_layer_script($store_data['script']); + } catch (Exception $exception) { + $this->log->log('Wizard Step 2 - Exception'); + $this->log->log($exception->getMessage()); + $this->errors['wizard-step-2'] = + __( + sprintf("Couldn't create Store. Error: %s", $exception->getMessage()), + 'wordpress-doofinder' + ); + + // Send failed ajax response + wp_send_json_error(array( + 'status' => false, + 'errors' => [ + $this->errors['wizard-step-2'] + ], + )); + + return; + } + } + $this->log->log('Wizard Step 2 - Created Search Engine in db '); + } + + /** + * Handle the submit of step 3 + */ + private function process_step_3() + { + // Move to the next step. Step that exceeds number of steps to deactivate the wizard. + self::next_step(self::$no_steps + 1); + } + + /** + * Redirect using JS to avoid alredy sent headers issue + */ + + private function js_go_to_step($step) + { + ?> + +log->log('Clear All Settings'); + + // Clear global settings + + Settings::set_api_key(''); + Settings::set_api_host(''); + + // If there's no plugin active we still need to process 1 language. + $languages = $this->language->get_formatted_languages(); + + if (!$languages) { + $languages[''] = ''; + } + + // Clear per language settings + + foreach ($languages as $language_code => $language_name) { + // Suffix for options. + // This should be empty for default language, and language code + // for any other. + $options_suffix = ($language_code === $this->language->get_base_locale()) ? '' : Helpers::get_language_from_locale($language_code); + + // Search engine data + Settings::set_search_engine_hash('', $options_suffix); + + // JS Layer + Settings::disable_js_layer($options_suffix); + // JS Layer Code + Settings::set_js_layer('', $options_suffix); + + //Set the indexing status to processing + Settings::set_indexing_status('processing', $options_suffix); + } + } + + + private function check_api_settings($step) + { + $api_key = $_REQUEST['api_token'] ?? null; + $api_host = $_REQUEST['admin_endpoint'] ?? null; // i.e: https://eu1-admin.doofinder.com + + if (empty($api_key)) { + $this->add_wizard_step_error($step, 'api-key', __('API key is missing.', 'wordpress-doofinder')); + } else { + $this->remove_wizard_step_error($step, 'api-key'); + } + + if (empty($api_host)) { + $this->add_wizard_step_error($step, 'api-host', __('API host is missing.', 'wordpress-doofinder')); + } else { + $this->remove_wizard_step_error($step, 'api-host'); + } + + if (!empty($this->errors['wizard-step-' . $step])) { + return FALSE; + } + + // Api Host should contain 'https://' protocol, i.e. https://eu1-admin.doofinder.com + if (!preg_match("#^((https?://)|www\.?)#i", $api_host)) { + $api_host = 'https://' . $api_host; + } + + return [ + 'api_key' => $api_key, + 'api_host' => $api_host, + ]; + } + + private function is_valid_token($step) + { + $token = $_POST['token'] ?? ''; + $saved_token = $this->getToken(); + + // Exit early if tokens do not match + if ($token !== $saved_token) { + $this->log->log('Processing Wizard Step 2 - Recieved Token - ' . $token); + $this->log->log('Processing Wizard Step 2 - Saved Token - ' . $saved_token); + $this->add_wizard_step_error($step, 'token', __('Invalid token', 'wordpress-doofinder')); + return false; + } else { + $this->remove_wizard_step_error($step, 'token'); + } + return true; + } + + private function save_api_settings($api_settings) + { + extract($api_settings); + // Check if api key already exists and is the same + // If api key is different clear all settings + $saved_api_key = Settings::get_api_key(); + + if ($saved_api_key !== $api_key) { + $this->clear_all_settings(); + } + + Settings::set_api_key($api_key); + Settings::set_api_host($api_host); + } + + + private function get_wizard_errors() + { + return get_option('doofinder_wizard_errors', []); + } + + private function set_wizard_errors($errors) + { + return update_option('doofinder_wizard_errors', $errors); + } + + private function add_wizard_step_error($step, $field_name, $error) + { + $this->log->log('Processing Wizard Step ' . $step . ' - Error - ' . $error); + + $errors = $this->get_wizard_errors(); + $this->errors['wizard-step-' . $step][$field_name] = $error; + + if (!isset($errors['wizard-step-' . $step])) { + $errors['wizard-step-' . $step] = []; + } + + $errors['wizard-step-' . $step][$field_name] = $error; + $this->set_wizard_errors($errors); + } + + private function remove_wizard_step_error($step, $field_name) + { + $errors = $this->get_wizard_errors(); + if (isset($errors['wizard-step-' . $step]) && isset($errors['wizard-step-' . $step][$field_name])) { + unset($errors['wizard-step-' . $step][$field_name]); + $this->set_wizard_errors($errors); + } + } + + private function set_search_engines($search_engines) + { + $log = new Log(); + + $currency = self::get_currency(); + + foreach ($search_engines as $language => $search_engine) { + $currency_key = strtoupper($currency); + //format language to en_US instead of en-US format + $language = Helpers::format_locale_to_underscore($language); + $language_key = Helpers::get_language_from_locale($language); + $is_primary_language = strtolower($this->language->get_base_locale()) === strtolower($language); + if (!array_key_exists($currency_key, $search_engine)) { + $currency_key = strtolower($currency); + } + + if (array_key_exists($currency_key, $search_engine)) { + $search_engine_hash = $search_engine[$currency_key]; + if (!$this->process_all_languages || $is_primary_language) { + $language_key = ''; + } + $log->log("Setting SE hash for language '$language_key'"); + Settings::set_search_engine_hash($search_engine_hash, $language_key); + } else { + $log->log("Couldnt find currency $currency"); + } + } + } + + private function set_layer_script($script) + { + $log = new Log(); + // If there's no plugin active we still need to process 1 language. + $languages = $this->language->get_formatted_languages(); + $currency = self::get_currency(); + if (!$languages) { + $languages[''] = ''; + } + + foreach ($languages as $language_code => $language_name) { + // Suffix for options. + // This should be empty for default language, and language code + // for any other. + $options_suffix = ''; + + if ($language_code !== $this->language->get_base_locale()) { + $options_suffix = Helpers::get_language_from_locale($language_code); + } + + //Convert language to hyphen format used by live layer (en-US) + $language_code = Helpers::format_locale_to_hyphen($language_code); + $lang_config = "language: '$language_code',\n currency: '$currency',\n installationId:"; + $aux_script = !empty($language_code) ? str_replace("installationId:", $lang_config, $script) : $script; + + $log->log('Installing script for language: ' . $language_code); + $log->log($aux_script); + + // JS Layer Code + Settings::set_js_layer($aux_script, $options_suffix); + } + } + + private function get_currency() + { + if (is_plugin_active('woocommerce/woocommerce.php')) { + return strtolower(get_woocommerce_currency()); + } else { + return "eur"; + } + } + + /** + * Check if API key, host and search engine hash are set in settings + * for the current language. Indexing will be impossible if + * they are missing. + * + * @param bool $process_all_languages + * @param object $language + * + * @return mixed + */ + public static function are_api_keys_present(bool $process_all_languages, $language) + { + + + $api_key = Settings::get_api_key(); + + if (!$api_key) { + return false; + } + + $api_host = Settings::get_api_host(); + + if (!$api_host) { + return false; + } + + if ($process_all_languages) { + + $api_keys_array = []; + + foreach ($language->get_languages() as $lang) { + $code = $lang['locale']; + $code = $code === $language->get_base_locale() ? '' : Helpers::get_language_from_locale($code); + $hash = Settings::get_search_engine_hash($code); + $hash = !$hash ? 'no-hash' : $hash; + + $api_keys_array[$code] = [ + 'lang' => $lang, + 'hash' => $hash + ]; + } + + return $api_keys_array; + } else { + $hash = Settings::get_search_engine_hash(); + + if ($hash) { + return true; + } else { + return false; + } + } + } + + + /** + * Check if we should migrate settings + * + * @return bool + */ + public static function should_migrate() + { + + $log = new Log(); + $migration_option = get_option(self::$wizard_migration_option); + + // Migration was already done, we should abort + if ($migration_option === 'completed' || $migration_option === 'failed') { + //$log->log('Should migrate - Migration already done or not possible'); + return false; + } + + if (!Settings::get_api_key()) { + $log->log('Should migrate - Migration possible - Api Key'); + return true; + } + + if (!Settings::get_api_host()) { + $log->log('Should migrate - Migration possible - Api Host'); + return true; + } + + // Migration not necessary + $log->log('Should migrate - Migration not necessary'); + update_option(self::$wizard_migration_option, 'completed'); + + return false; + } +} diff --git a/doofinder-for-woocommerce/includes/class-thumbnail.php b/doofinder-for-woocommerce/includes/class-thumbnail.php old mode 100644 new mode 100755 index dffdadb4..a16a3fe8 --- a/doofinder-for-woocommerce/includes/class-thumbnail.php +++ b/doofinder-for-woocommerce/includes/class-thumbnail.php @@ -1,6 +1,6 @@ can_we_log() ) { - return; - } - - $this->messages[] = $value; - } - - public function save() { - if ( ! $this->can_we_log() ) { - return; - } - - set_transient( 'doofinder_log', $this->messages, self::$duration ); - } - - private function can_we_log() { - return is_user_logged_in() && is_search(); - } -} diff --git a/doofinder-for-woocommerce/includes/class-update-manager.php b/doofinder-for-woocommerce/includes/class-update-manager.php index b1952e12..302177c0 100644 --- a/doofinder-for-woocommerce/includes/class-update-manager.php +++ b/doofinder-for-woocommerce/includes/class-update-manager.php @@ -1,183 +1,200 @@ getMessage()); - break; - } - - if ($result) { - //Remove the current update notice in case it exists - self::remove_admin_notice($version_number); - } else { - self::update_failed($version_number); - break; - } - - self::log("The update $update_function Succeeded"); - $formatted_version = self::format_normalized_plugin_version($version_number); - - //Update the database version to the newer one - Settings::set_plugin_version($formatted_version); - } - } - self::log("Updates ended, plugin db version is: " . Settings::get_plugin_version()); - } - - /** - * Formats the plugin version to a normalized version. - * Example: 1.5.13 => 010513 - */ - private static function normalize_plugin_version($version) - { - $normalized = ""; - $version = explode(".", $version); - foreach ($version as $key => $version_part) { - $normalized .= str_pad($version_part, 2, '0', STR_PAD_LEFT); - } - return $normalized; - } - - /** - * Formats a normalized version back to the x.y.z format version. - * Example: 010513 => 1.5.13 - */ - private static function format_normalized_plugin_version($normalized) - { - $version = str_split($normalized, 2); - $version = array_map(function ($vnum) { - return (int)$vnum; - }, $version); - - return implode(".", $version); - } - - /** - * Logs the error and adds an admin notice - */ - private static function update_failed($version, $message = "") - { - self::log("ERROR: The update $version failed with message: " . $message); - self::add_admin_notice($version, $message); - } - - /** - * Adds an admin notice using WooCommerce. - */ - private static function add_admin_notice($version, $message = "") - { - if (class_exists('WC_Admin_Notices')) { - \WC_Admin_Notices::add_custom_notice($version, self::get_update_error_notice($version, $message)); - } else { - wp_die("Error While updating the Doofinder For Woocommerce Database to version: $version"); - } - } - - /** - * Removes an admin notice using WooCommerce. - */ - private static function remove_admin_notice($version) - { - if (class_exists('WC_Admin_Notices')) { - \WC_Admin_Notices::remove_notice($version); - } - } - - /** - * Notice html content to show on error - */ - private static function get_update_error_notice($version, $message = "") - { - - $message_intro = sprintf(__('An error occurred while updating the Doofinder Database to the %s version.', 'woocommerce-doofinder'), $version); - $message_help = sprintf(__('For more details please contact us at our %s support center%s.', 'woocommerce-doofinder'), '', ''); - ob_start(); + private static $logger = NULL; + + /** + * Checks and performs any pending DB updates. + * + * @since 1.0 + */ + public static function check_updates($plugin_version) + { + $db_version = Settings::get_plugin_version(); + self::log("Check updates from $db_version to $plugin_version"); + + if (empty($plugin_version)) { + + self::log("invalid plugin version: $plugin_version"); + + return false; + } + $current_normalized_version = self::normalize_plugin_version(Settings::get_plugin_version()); + $plugin_normalized_version = self::normalize_plugin_version($plugin_version); + + for ($version = $current_normalized_version + 1; $version <= $plugin_normalized_version; $version++) { + $version_number = str_pad($version, 6, '0', STR_PAD_LEFT); + $update_function = 'update_' . $version_number; + + self::log("check if the update $update_function exists."); + if (method_exists(Update_Manager::class, $update_function)) { + self::log("Executing $update_function update..."); + $result = NULL; + try { + $result = call_user_func(array(Update_Manager::class, $update_function)); + } catch (\Exception $ex) { + self::update_failed($version_number, $ex->getMessage()); + break; + } + + if ($result) { + //Remove the current update notice in case it exists + self::remove_admin_notice($version_number); + } else { + self::update_failed($version_number); + break; + } + + self::log("The update $update_function Succeeded"); + $formatted_version = self::format_normalized_plugin_version($version_number); + + //Update the database version to the newer one + Settings::set_plugin_version($formatted_version); + } + } + self::log("Updates ended, plugin db version is: " . Settings::get_plugin_version()); + } + + /** + * Formats the plugin version to a normalized version. + * Example: 1.5.13 => 010513 + */ + private static function normalize_plugin_version($version) + { + $normalized = ""; + $version = explode(".", $version); + foreach ($version as $key => $version_part) { + $normalized .= str_pad($version_part, 2, '0', STR_PAD_LEFT); + } + return $normalized; + } + + /** + * Formats a normalized version back to the x.y.z format version. + * Example: 010513 => 1.5.13 + */ + private static function format_normalized_plugin_version($normalized) + { + $version = str_split($normalized, 2); + $version = array_map(function ($vnum) { + return (int)$vnum; + }, $version); + + return implode(".", $version); + } + + /** + * Logs the error and adds an admin notice + */ + private static function update_failed($version, $message = "") + { + $formatted_version = self::format_normalized_plugin_version($version); + self::log("ERROR: The update $formatted_version failed with message: " . $message); + self::add_admin_notice($version, $message); + } + + /** + * Adds an admin notice using WooCommerce. + */ + private static function add_admin_notice($version, $message = "") + { + $title = sprintf(__('An error occurred while updating the Doofinder Database to the %s version.', 'doofinder_for_wp'), $version); + $message .= "

" . sprintf(__('For more details please contact us at our %s support center%s.', 'doofinder_for_wp'), '', '') . '

'; + Admin_Notices::add_notice('update-' . $version, $title, $message, 'error', null, '', true); + } + + /** + * Removes an admin notice using WooCommerce. + */ + private static function remove_admin_notice($version) + { + Admin_Notices::remove_notice('update-' . $version); + } + + /** + * Notice html content to show on error + */ + private static function get_update_error_notice($version, $message = "") + { + + $message_intro = sprintf(__('An error occurred while updating the Doofinder Database to the %s version.', 'woocommerce-doofinder'), $version); + $message_help = sprintf(__('For more details please contact us at our %s support center%s.', 'woocommerce-doofinder'), '', ''); + ob_start(); ?> -
- -

- - - - - -

- -

- -

- - -
+
+ +

+ + + + + +

+ +

+ +

+ + +
log($message); - } - } - - /* + return ob_get_clean(); + } + + private static function log($message) + { + if (empty(static::$logger)) { + static::$logger = new Log('updates.log'); + } + } + + /* Place all updates here */ - /** - * Update: 1.5.30 - * Update the admin_endpoint to the new admin.doofinder.com - */ - public static function update_010530() - { - $regex = '/(\w*?:\/\/)?(.*-)(\w+)(..*)/'; - $admin_endpoint = preg_replace($regex, "$1$2admin$4", Settings::get_admin_endpoint()); - Settings::set_admin_endpoint($admin_endpoint); - - return true; - } + /** + * Update: 2.0.0 + * Normalize store and indices and create application credentials for + * accessing the rest API. + */ + public static function update_020000() + { + //Update api host to point to admin.doofinder.com instead of api.doofinder.com + $multilanguage = Multilanguage::instance(); + $languages = $multilanguage->get_languages(); + if(empty($languages)){ + $languages = ['' => []]; + } + + foreach ($languages as $lang_key => $value) { + $lang_key = ($lang_key != $multilanguage->get_base_language()) ? $lang_key : ''; + $api_host = Settings::get_api_host($lang_key); + if (!strpos($api_host, "admin.doofinder.com")) { + $api_host_parts = explode("-", $api_host); + $new_api_host = $api_host_parts[0] . '-' . 'admin.doofinder.com'; + Settings::set_api_host($new_api_host); + } + } + + /* + Detect if we are updating from a former version of Doofinder to + normalize store and indices + */ + if (Settings::is_configuration_complete() && !Store_Api::has_application_credentials()) { + $store_api = new Store_Api(); + $store_api->normalize_store_and_indices(); + } + return true; + } } diff --git a/doofinder-for-woocommerce/includes/class-update-on-save-index.php b/doofinder-for-woocommerce/includes/class-update-on-save-index.php new file mode 100755 index 00000000..7e3e3efc --- /dev/null +++ b/doofinder-for-woocommerce/includes/class-update-on-save-index.php @@ -0,0 +1,153 @@ +language = Multilanguage::instance(); + $this->current_language = $this->language->get_current_language(); + $this->api = new Update_On_Save_Api($this->current_language); + $this->log = new Log('update_on_save_api.txt'); + } + + /** + * Launches the Doofinder update on save process. + * + * This method triggers the update on save process by calling the `update_on_save()` method + * for both the "update" and "delete" actions. + * + * @return void + * @since 1.0.0 + */ + public function launch_doofinder_update_on_save() + { + $this->log->log('Launch Doofinder update on save'); + $this->update_on_save('update'); + $this->update_on_save('delete'); + //Update last exec + update_option('doofinder_update_on_save_last_exec', date('Y-m-d H:i:s')); + } + + /** + * Perform the update on save operation for the specified action. + * + * @param string $action The action to perform (either "update" or "delete"). + * @since 1.0.0 + */ + public function update_on_save($action) + { + // Load the data that we'll use to fetch posts. + $this->log->log('Update on save is enabled for these types of posts: '); + $this->log->log($this->post_types); + + foreach ($this->post_types as $post_type) { + $this->log->log('Posts ids to update for ' . $post_type . ': '); + $posts_ids_to_update = $this->get_posts_ids_by_type_indexation($post_type, $action); + $this->log->log($posts_ids_to_update); + + if (!empty($posts_ids_to_update)) { + $this->log->log('Ids ready to send ' . print_r($posts_ids_to_update, true)); + + // Call the function passing the post type name as a parameter + switch ($action) { + case 'update': + $this->log->log('We send the request to UPDATE items with this data:'); + $this->api->updateBulk($post_type, $posts_ids_to_update); + break; + case 'delete': + $this->log->log('We send the request to DELETE items with this data:'); + $this->api->deleteBulk($post_type, $posts_ids_to_update); + break; + } + } else { + $this->log->log('No objects to index.'); + } + } + } + + /** + * Get post IDs by type for indexation. + * + * @param string $post_type The type of posts to retrieve IDs for. + * @param string $action The action type ('update' or 'delete'). + * @return array An array of post IDs. + * @since 1.0.0 + */ + public function get_posts_ids_by_type_indexation($post_type, $action) + { + global $wpdb; + $table_name = $wpdb->prefix . 'doofinder_update_on_save'; + + $query = "SELECT * FROM $table_name WHERE type_post = '$post_type' AND type_action = '$action'"; + + $ids = $wpdb->get_results($query, ARRAY_N); + + if (!$ids) { + return array(); + } + + return array_map(function ($item) { + return $item[0]; + }, $ids); + } +} diff --git a/doofinder-for-woocommerce/includes/class-update-on-save.php b/doofinder-for-woocommerce/includes/class-update-on-save.php new file mode 100755 index 00000000..48821a4a --- /dev/null +++ b/doofinder-for-woocommerce/includes/class-update-on-save.php @@ -0,0 +1,257 @@ +launch_doofinder_update_on_save(); + } + + + public static function activate_update_on_save_task() + { + if (Settings::is_update_on_save_enabled()) { + $language = Multilanguage::instance(); + $current_language = $language->get_current_language(); + $update_on_save_schedule = Settings::get_update_on_save($current_language); + wp_schedule_event(time(), $update_on_save_schedule, 'doofinder_update_on_save'); + } + } + + public static function deactivate_update_on_save_task() + { + wp_clear_scheduled_hook('doofinder_update_on_save'); + } + + public static function update_on_save_schedule_updated($old_value, $value, $option) + { + self::deactivate_update_on_save_task(); + if (Settings::is_update_on_save_enabled()) { + self::activate_update_on_save_task(); + } + } + + public static function is_cron_enabled() + { + return !(defined('DISABLE_WP_CRON') && DISABLE_WP_CRON); + } + + /** + * Creates the database table for storing update on save information if it doesn't exist. + */ + public static function create_update_on_save_db() + { + global $wpdb; + $table_name = $wpdb->prefix . 'doofinder_update_on_save'; + + $table_exists = $wpdb->get_var("SHOW TABLES LIKE '" . $table_name . "'"); + + if ($table_exists === NULL) { + // The table does not exist, we create it + $charset_collate = $wpdb->get_charset_collate(); + $sql = "CREATE TABLE $table_name ( + post_id INT NOT NULL, + type_post VARCHAR(255), + type_action VARCHAR(255), + PRIMARY KEY (post_id) + ) $charset_collate;"; + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + dbDelta($sql); + } + + update_option('doofinder_update_on_save_last_exec', date('Y-m-d H:i:s')); + } + + /** + * Register hooks and actions. + */ + public static function register_hooks() + { + add_action('wp_insert_post', function ($post_id, \WP_Post $post, $updated) { + if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) + return; + self::add_item_to_update($post_id, $post, $updated); + }, 99, 3); + + + // add_action('doofinder_update_on_save', [self::class, 'launch_update_on_save'], 10, 0); + add_action("update_option_doofinder_for_wp_update_on_save", [self::class, 'update_on_save_schedule_updated'], 10, 3); + } + + /** + * Determines if the current post should be indexed and adds it to the update queue. + * + * @param int $post_id The ID of the post. + * @param WP_Post $post The post object. + */ + public static function add_item_to_update($post_id, $post, $updated) + { + + $log = new Log('update_on_save.txt'); + $update_on_save_index = new Update_On_Save_Index(); + + if (Settings::is_update_on_save_enabled()) { + $doofinder_post = new Post($post); + $log->log('Add this item to update on save: ' . print_r($doofinder_post, true)); + + self::add_item_to_db($doofinder_post, $post_id, $post->post_status, $post->post_type); + + //If the cron is disabled, we execute the update on save workaround + if (!self::is_cron_enabled() && self::allow_process_items()) { + $log->log('We can send the data. '); + $update_on_save_index->launch_doofinder_update_on_save(); + self::clean_update_on_save_db(); + } + } + } + + /** + * Adds the item to the update queue in the database. + * + * @param Post $doofinder_post The Doofinder post object. + * @param int $post_id The ID of the post. + * @param string $status The status of the post. + * @param string $type The type of the post. + */ + public static function add_item_to_db($doofinder_post, $post_id, $status, $type) + { + $log = new Log('update_on_save.txt'); + if ($status === 'auto-draft' || $type === "revision") { + # If it is draft or revision we don't need to do anything with it because we don't have to index it. + $log->log('It is not necessary to save it as it is a draft. '); + } elseif ($doofinder_post->is_indexable()) { + # If the status of the post is still indexable after the changes we do an update. + $log->log('The item will be saved with the update action. '); + self::add_to_update_on_save_db($post_id, $type, "update"); + } else { + # If the status of the post is no longer indexable we have to delete it. + $log->log('The item will be saved with the delete action. '); + self::add_to_update_on_save_db($post_id, $type, "delete"); + } + } + + /** + * Adds an item to the update queue in the database. + * + * @param int $post_id The ID of the post. + * @param string $post_type The type of the post. + * @param string $action The action to perform on the post (update/delete). + */ + public static function add_to_update_on_save_db($post_id, $post_type, $action) + { + global $wpdb; + + $table_name = $wpdb->prefix . 'doofinder_update_on_save'; + + $resultado = $wpdb->get_var("SELECT * FROM $table_name WHERE post_id = $post_id"); + + if ($resultado != null) { + $wpdb->update( + $table_name, + array( + 'post_id' => $post_id, + 'type_post' => $post_type, + 'type_action' => $action + ), + array('id' => $resultado) + ); + } else { + $wpdb->insert( + $table_name, + array( + 'post_id' => $post_id, + 'type_post' => $post_type, + 'type_action' => $action + ) + ); + } + } + + /** + * Checks if processing of items is allowed based on the configured update frequency. + * + * @return bool True if processing is allowed, false otherwise. + */ + public static function allow_process_items() + { + + $log = new Log('update_on_save.txt'); + $language = Multilanguage::instance(); + $current_language = $language->get_active_language(); + $update_on_save_schedule = Settings::get_update_on_save($current_language); + + // Get all available scheduled intervals + $schedules = wp_get_schedules(); + + // Check if the cron job is scheduled + if (isset($schedules[$update_on_save_schedule])) { + $delay = $schedules[$update_on_save_schedule]['interval']; + } else { + $delay = 900; + } + + $last_exec = get_option('doofinder_update_on_save_last_exec'); + + $log->log('The last execution was: ' . $last_exec); + $log->log('The established delay is: ' . $delay); + + $last_exec_ts = strtotime($last_exec); + + $diff_min = (time() - $last_exec_ts); + + $log->log('The difference is: ' . $diff_min); + + if ($diff_min >= $delay) { + return true; + } + + return false; + } + + /** + * Cleans the update on save database table by deleting all entries. + * + * @return bool True if the database table was cleaned successfully, false otherwise. + */ + public static function clean_update_on_save_db() + { + global $wpdb; + $table_name = $wpdb->prefix . 'doofinder_update_on_save'; + + $wpdb->query("TRUNCATE TABLE $table_name"); + + $log = new Log('update_on_save.txt'); + $log->log('Cleaned database'); + } + + /** + * Deletes the update on save database table. + * + * @return bool True if the database table was deleted successfully, false otherwise. + */ + public static function delete_update_on_save_db() + { + global $wpdb; + $table_name = $wpdb->prefix . 'doofinder_update_on_save'; + + $wpdb->query("DROP TABLE $table_name"); + + $log = new Log('update_on_save.txt'); + $log->log('Deleted database'); + } +} diff --git a/doofinder-for-woocommerce/includes/data-feed/class-data-feed-item.php b/doofinder-for-woocommerce/includes/data-feed/class-data-feed-item.php deleted file mode 100644 index 891dcb56..00000000 --- a/doofinder-for-woocommerce/includes/data-feed/class-data-feed-item.php +++ /dev/null @@ -1,834 +0,0 @@ -log = new Log('api.txt'); - - $this->post = $post; - $this->product = WC()->product_factory->get_product($post->ID); - $this->parent = $parent; - $this->settings = $settings; - $this->attributes = Attributes::instance(); - $this->paths_cache = &$paths_cache; - $this->terms_cache = &$terms_cache; - - $this->add_basic_fields(); - $this->add_link(); - $this->add_title(); - $this->add_description(); - $this->add_group_id(); - $this->add_variation_attributes(); - $this->add_availability(); - $this->add_sku(); - $this->add_thumbnail(); - $this->add_prices(); - $this->add_group_leader(); - $this->add_categories(); - $this->add_tags(); - $this->add_additional_attributes(); - $this->remove_out_of_stock_attributes(); - $this->remove_empty_fields(); - $this->decode_fields(); - } - - /** - * Retrieve the item fields. - * - * @since 1.0.0 - * @return array Fields to add to feed. - */ - public function get_fields() - { - return $this->fields; - } - - /* Adding fields **************************************************************/ - - /** - * Add basic fields - those that are present regardless of product type - * and don't require any additional checks. - * - * @since 1.0.0 - */ - private function add_basic_fields() - { - $this->fields['id'] = $this->post->ID; - } - - /** - * Add product link to the feed. - * - * @since 1.0.0 - */ - private function add_link() - { - if ($this->attributes->have('link')) { - $this->fields['link'] = $this->attributes->get('link', $this->post); - } else { - $this->fields['link'] = get_permalink($this->post); - } - } - - /** - * In case of regular products add just the title. - * In case of variations add product name with variation attributes in brackets, e.g. - * "A shirt (blue)" - * - * @since 1.0.0 - */ - private function add_title() - { - $suffix = ''; - if ($this->parent && $this->product) { - $attributes = $this->product->get_variation_attributes(); - $suffix = ' (' . implode(', ', $attributes) . ')'; - } - - $post = $this->post; - if ($this->parent) { - $post = $this->parent; - } - - $title = $post->post_title; - if ($this->attributes->have('title')) { - $title = $this->attributes->get('title', $post); - } - - $this->add_field('title', $title . $suffix); - } - - /** - * In case of regular products add content as description. - * Product variations don't have the content, so in their case add parents content. - * - * @since 1.0.0 - */ - private function add_description() - { - $post = $this->post; - if ($this->parent) { - $post = $this->parent; - } - - if ($this->attributes->have('description')) { - $this->add_field('description', $this->attributes->get('description', $post)); - } else { - $this->add_field('description', $post->post_content); - } - } - - /** - * Product variations require "item_group_id" field, which denotes which product variations - * they are. - * - * @since 1.0.0 - */ - private function add_group_id() - { - if (!$this->parent) { - return; - } - - $this->fields['item_group_id'] = $this->parent->ID; - } - - /** - * When adding a variable products as one (not splitting it) add variation attributes - * as fields to the feed to make product ready for faceted search. - * - * @since 1.0.0 - */ - private function add_variation_attributes() - { - //if ( $this->parent || ! $this->product->is_type( 'variable' ) ) { - if (!$this->product->is_type('variation')) { - return; - } - - $attributes = $this->product->get_attributes(); - foreach (array_keys($attributes) as $attribute) { - $values = array_map('trim', preg_split('/\,/', $this->product->get_attribute($attribute))); - - foreach ($values as $key => $val) { - $val = str_replace('/', '//', $val); - $values[$key] = str_replace(' | ', '/', $val); - } - - // Custom attributes added at the product level can have - // characters in them that are not allowed in XML tags, - // and therefore need to be slugified. - - // Woo adds 'pa_' to attributes added in "Attributes" men. - $slug = str_replace('pa_', '', $attribute); - - // Make lowercase, remove all non-url characters. - $slug = sanitize_title($slug); - - // "sanitize_title" separates words using "-"; use "_" instead. - $slug = preg_replace('/-/', '_', $slug); - - $this->fields[$slug] = implode('/', $values); - } - } - - /** - * Add product availability. - * - * @since 1.0.0 - */ - private function add_availability() - { - - $type = $this->product->get_type(); - - if ($type === 'grouped' || $type === 'external') { - $availability = $this->product->is_in_stock() ? 'in stock' : 'out of stock'; - } else { - $availability = $this->product->is_purchasable() && $this->product->is_in_stock() ? 'in stock' : 'out of stock'; - } - - $this->fields['availability'] = $availability; - } - - /** - * Add product type (simple, variable, etc.). - * - * - * @since 1.0.0 - */ - private function add_type() - { - - $this->fields['type'] = $this->product->get_type(); - } - - /** - * Add product SKU. - * - * @since 1.0.0 - */ - private function add_sku() - { - if ($mpn = $this->product->get_sku()) { - $this->fields['mpn'] = $mpn; - } - } - - /** - * Add post thumbnail. - * The size of the thumbnail is configurable in settings, but thumbnail size is exported if not set. - * - * @since 1.0.0 - */ - private function add_thumbnail() - { - $size = 'thumbnail'; - $image_id = $this->product->get_image_id(); - - - $default_sizes = array( - 'thumbnail', - 'medium', - 'medium-large', - 'large', - ); - - if ($this->settings['image_size'] && (has_image_size($this->settings['image_size']) || in_array($this->settings['image_size'], $default_sizes))) { - $size = $this->settings['image_size']; - } - - if ($image_id) { - if ($image_url = wp_get_attachment_image_src($image_id, $size)) { - $this->fields['image_link'] = $image_url[0]; - } - } else { - $this->fields['image_link'] = wc_placeholder_img_src($size); - } - } - - /** - * Add regular and sale price. - * Whether or not add prices to the feed can be controlled via settings. - * - * @since 1.0.0 - */ - private function add_prices() - { - if ('no' === $this->settings['export_prices']) { - return; - } - - $prices = $this->get_prices($this->product); - - if ($prices['regular']) { - $this->fields['price'] = (float) $prices['regular']; - } - - if (isset($prices['sale']) && $prices['sale']) { - // If there's no regular price display sale price as regular. - $field_name = $prices['regular'] ? 'sale_price' : 'price'; - $this->fields[$field_name] = (float) $prices['sale']; - } - } - - /** - * Add product leader. - * Product with variations and variations themselves require - * 'df_group_leader' and 'group_id' fields. - * Product with variations is group leader but variations aren`t. - * Variation gets his parent id as a reference. - * - * @since 1.5.11 - */ - private function add_group_leader() - { - if ('no' === $this->settings['split_variable']) { - return; - } - - $id = $this->post->ID; - $product = wc_get_product($id); - $variation = wc_get_product($product->get_parent_id()); - - - if ($variation) { - $this->fields['df_group_leader'] = 'false'; - $this->fields['group_id'] = (string) $variation->get_id(); - } else { - if ($product->is_type('variable')) { - $this->fields['df_group_leader'] = 'true'; - $this->fields['group_id'] = (string) $id; - } else { - $this->fields['df_group_leader'] = 'false'; - $this->fields['group_id'] = false; - } - } - } - - /* Taxonomies *****************************************************************/ - - /** - * Add categories. - * Product variations don't have categories so we have to grab them from parent. - * - * @since 1.0.0 - */ - private function add_categories() - { - if ($this->parent) { - $this->fields['categories'] = $this->get_categories($this->parent->ID); - } else { - $this->fields['categories'] = $this->get_categories($this->post->ID); - } - } - - /** - * Add tags. - * Product variations don't have tags so we have to grab them from parent. - * Whether or not tags are exported can be controlled via settings. - * - * @since 1.2.0 - */ - private function add_tags() - { - if ('yes' !== $this->settings['export_tags']) { - return; - } - - $id = $this->post->ID; - if ($this->parent) { - $id = $this->parent->ID; - } - - $tags = wp_get_post_terms($id, 'product_tag'); - if (!$tags) { - return; - } - - $tags = array_map(function ($tag) { - return $tag->name; - }, $tags); - - - $this->fields['tags'] = implode('/', $tags); - } - - /* Additional fields **********************************************************/ - - /** - * Add additional attributes chosen by the user in config to the feed. - */ - private function add_additional_attributes() - { - $attributes = Settings::get('feed_attributes', 'additional_attributes'); - if (empty($attributes) || !is_array($attributes)) { - return; - } - - $attributes = array_map('wp_parse_args', $attributes); - - foreach ($attributes as $attribute) { - if (isset($attribute['field']) && isset($attribute['attribute'])) { - $this->fields[$attribute['field']] = $this->attributes->get_attribute_value( - $attribute['attribute'], - $this->post, - $attribute - ); - - // Inherit attributes from parent. - if ($this->parent) { - $parent_attributes = $this->attributes->get_attribute_value( - $attribute['attribute'], - $this->parent, - $attribute - ); - } - } - } - } - - /** - * Removes all empty fields - * - * @since 1.2.2 - */ - private function remove_empty_fields() - { - foreach ($this->fields as $key => $field) { - if (empty($this->fields[$key])) { - unset($this->fields[$key]); - } - } - } - - /** - * Check if all variations for a given attribute have stock. - * For example, if the attribute Size with value 'Small' is out of stock, we - * will remove it from the Small value from the size attribute. - * - * @since 1.5.44 - * @return void - */ - public function remove_out_of_stock_attributes() - { - if ($this->product->get_type() != 'variable') { - return; - } - - $variations = $this->product->get_available_variations(); - $stock_by_attribute = $this->get_stock_by_attribute($variations); - - foreach ($stock_by_attribute as $attribute => $values) { - $keys_without_stock = array_keys(array_filter($values, function ($value) { - return $value === false; - })); - if (empty($keys_without_stock)) { - continue; - } - //WooCommerce attributes start with pa_ - $attribute = str_replace("pa_", "", $attribute); - //We need to replace double slashes by another character in order to avoid errors when exploding by single slashes - $new_attributes = explode("/", str_replace("//", "@SLASH@", $this->fields[$attribute])); - $new_attributes = array_map(function ($value) { - return str_replace('@SLASH@', '/', $value); - }, $new_attributes); - foreach ($keys_without_stock as $value) { - $pos = array_search($value, $new_attributes); - if ($pos !== false) { - unset($new_attributes[$pos]); - } - } - if (!empty($new_attributes)) { - //Replace single slashes with a custom marker - $new_attributes = array_map(function ($value) { - return str_replace('/', '@SLASH@', $value); - }, $new_attributes); - //Implode by slashes and replace the custom marker with double slashes - $this->fields[$attribute] = str_replace('@SLASH@', '//', implode('/', $new_attributes)); - } else { - //This attribute has no values, remove it - unset($this->fields[$attribute]); - } - } - } - - /** - * Given a list of variations returns the stock status by attribute value. - * - * @param array $variations - * @return array The list of attributes and stock status by value. - */ - private function get_stock_by_attribute($variations) - { - $stock_by_attribute = []; - foreach ($variations as $variation) { - $variation_obj = new \WC_Product_variation($variation['variation_id']); - $attributes = $variation_obj->get_attributes(); - foreach ($attributes as $attribute => $value) { - if (isset($stock_by_attribute[$attribute][$value]) && $stock_by_attribute[$attribute][$value]) { - continue; - } - - if (!isset($stock_by_attribute[$attribute])) { - $stock_by_attribute[$attribute] = []; - } - - if (!isset($stock_by_attribute[$attribute][$value])) { - $stock_by_attribute[$attribute][$value] = false; - } - - if ($variation["is_in_stock"]) { - $stock_by_attribute[$attribute][$value] = true; - } - } - } - return $stock_by_attribute; - } - - /** - * Decode fields from special chars - * - * @since 1.5.15 - */ - private function decode_fields() - { - // $this->log->log('Decode fields: '); - // $this->log->log( $this->fields ); - - array_walk_recursive($this->fields, function (&$value, $key) { - if (strpos($key, 'price') === false) { - $value = html_entity_decode($value, ENT_QUOTES); - } - }); - - // $this->log->log('Decoded fields: '); - // $this->log->log($this->fields); - } - - /* Helpers ********************************************************************/ - - /** - * Add a field, but clean up the value from HTML, control characters, etc. - * - * @since 1.1.0 - * - * @param string $name Field name to add. - * @param string $value Field value to add. - */ - private function add_field($name, $value) - { - $value = preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', $value); - $value = wp_strip_all_tags($value); - - $this->fields[$name] = $value; - } - - /** - * Get all categories (in forms of paths from term to the oldest ancestor) for a given term. - * - * @since 1.0.0 - * - * @param int $id ID of WP_Post to get categories for. - * - * @return string All category paths. - */ - private function get_categories($id) - { - $paths = array(); - $terms = get_the_terms($id, 'product_cat'); - $this->log->log('Data Feed Item - Get Categories: '); - $this->log->log($terms); - - if (!empty($terms) && is_array($terms)) { - foreach ($terms as $term) { - $paths[] = $this->get_category_path($term); - } - $this->clean_paths($paths); - - $this->log->log('Returning paths: '); - $this->log->log($paths); - return $paths; - } - } - - /** - * Filter the list of all paths for the item leaving only the most complete category paths - * (removing sub-paths). - * - * @param array $paths Paths to clean up. - */ - private function clean_paths(&$paths) - { - sort($paths); - for ($x = 0, $i = 1, $j = count($paths); $i < $j; $x = $i++) { - - if (isset($paths[$i]) && isset($paths[$x])) { - if (strpos($paths[$i], $paths[$x]) === 0) { - unset($paths[$x]); - } - } - - $paths = array_values($paths); - } - } - - /** - * Generate a path from the given term to the oldest ancestor. - * - * @since 1.0.0 - * - * @param \WP_Term|int $term - * - * @return array|mixed|string - */ - private function get_category_path($term) - { - - if (is_int($term)) { - - if ($term > 0) { - $term = get_term_by('id', $term, 'product_cat'); - } else { - return ''; - } - } - - // Don't traverse again if we already have the path cached. - if (isset($this->paths_cache[$term->term_id])) { - return $this->paths_cache[$term->term_id]; - } - - $term_id = isset($term->term_id) ? $term->term_id : 0; - $path = array(); - $path[] = isset($term->name) ? html_entity_decode($term->name) : null; - - /* - * Traverse from current term to the oldest ancestor. - * Terms are already loaded to the cache, so there's no need to load them from DB again. - */ - if (isset($term->parent)) { - while ($term->parent) { - $term = $this->terms_cache[$term->parent]; - $path[] = $term->name; - } - - // Build a path, and cache it for future use. - $path = implode(' > ', array_reverse($path)); - $this->paths_cache[$term_id] = $path; - } else { - $path = ''; - } - - return $path; - } - - /** - * Get regular and sale price of the Product. - * - * @since 1.0.0 - * - * @param \WC_Product|\WC_Product_Variable $product - * - * @return array Regular and sale price. - */ - private function get_prices($product) - { - // Calculate prices for variable products - if ($product->is_type('variable')) { - return $this->get_variable_prices($product); - } - - // Calculate prices for non-variable products - $prices = array('regular' => $product->get_regular_price()); - if ($product->is_on_sale()) { - $prices['sale'] = $product->get_sale_price(); - } - - if ($this->settings['include_taxes']) { - // Methods for retrieving prices with taxes on \WC_Product have been - // deprecated in Woo 3.0.0, but we want to make sure we don't crash - // and retrieve the prices correctly if older version of WooCommerce - // is installed. - if (function_exists('wc_get_price_including_tax')) { - $prices = $this->get_simple_prices_with_taxes($product, $prices); - } else { - $prices = $this->get_simple_prices_with_taxes_legacy($product, $prices); - } - } - - return $prices; - } - - /** - * Retrieve prices with taxes for non-variable product. - * - * @since 1.2.6 - * - * @param \WC_Product $product - * @param array $prices - * - * @return array - */ - private function get_simple_prices_with_taxes($product, $prices) - { - $prices['regular'] = wc_get_price_including_tax($product, array( - 'qty' => 1, - 'price' => $prices['regular'], - )); - - if (isset($prices['sale'])) { - $prices['sale'] = wc_get_price_including_tax($product, array( - 'qty' => 1, - 'price' => $prices['sale'], - )); - } - - return $prices; - } - - /** - * Retrieve prices with taxes for the non-variable product. - * - * This function is here to provide WooCommerce 2.* compatibility, - * as it uses legacy methods on \WC_Product that were deprecated - * in WooCommerce 3.0.0. It will not be used if new version - * of WooCommerce is installed. - * - * @since 1.2.6 - * - * @param \WC_Product $product - * @param array $prices - * - * @return array - */ - private function get_simple_prices_with_taxes_legacy($product, $prices) - { - $prices['regular'] = $product->get_price_including_tax(1, $prices['regular']); - - if (isset($prices['sale'])) { - $prices['sale'] = $product->get_price_including_tax(1, $prices['sale']); - } - - return $prices; - } - - /** - * Retrieve regular and (optionally) sale price for a variable product. - * - * @since 1.2.6 - * - * @param \WC_Product_Variable $product - * - * @return array - */ - private function get_variable_prices($product) - { - $include_taxes = (bool) $this->settings['include_taxes']; - - $regular_price = $product->get_variation_regular_price('min', $include_taxes); - $sale_price = false; - - if ($product->is_on_sale()) { - $sale_price = $product->get_variation_sale_price('min', $include_taxes); - } - - $prices = array('regular' => $regular_price); - if ($sale_price) { - $prices['sale'] = $sale_price; - } - - return $prices; - } -} diff --git a/doofinder-for-woocommerce/includes/data-feed/class-feed-xml.php b/doofinder-for-woocommerce/includes/data-feed/class-feed-xml.php deleted file mode 100644 index e60f38d8..00000000 --- a/doofinder-for-woocommerce/includes/data-feed/class-feed-xml.php +++ /dev/null @@ -1,137 +0,0 @@ -open(); - } - - $this->items(); - - if ( true == $close ) { - $this->close(); - } - } - - /** - * Retrieve the generated XML feed. - * - * @return string - */ - public function get() { - return trim( $this->feed ); - } - - /** - * Display the opening tags and header of the feed. - * - * @since 1.0.0 - */ - private function open() { - $this->feed = - ''; - - foreach( $this->header as $name => $value ) { - $this->add_node( $name, $value ); - } - } - - /** - * Display the closing tags of the feed. - * - * @since 1.0.0 - */ - private function close() { - $this->feed .= ''; - } - - /** - * Print feed items. - * - * @since 1.0.0 - */ - private function items() { - foreach ( $this->items as $item ) { - $this->feed .= ''; - - foreach ( $item as $field => $value ) { - $this->add_node( $field, $value ); - } - - $this->feed .= ''; - } - } - - /** - * Print an XML node. - * - * @since 1.0.0 - * @param string $name Name of the node (tag). - * @param string $value Value of the node. - */ - private function add_node( $name, $value ) { - $this->feed .= "<$name>"; - - if( $name === 'categories' && is_array($value) ) { - $categoryFeed = ''; - $arrLength = count($value); - $i = 0; - foreach( $value as $item ) { - $categoryFeed .= $item; - if( ++$i !== $arrLength ) { - $categoryFeed .= ' %% '; - } - } - $this->cdata( $categoryFeed ); - } else { - $this->cdata( $value ); - } - - $this->feed .= ""; - } - - /** - * Print given content wrapped as CData. - * - * @since 1.0.0 - * @param string $value Content to print. - */ - private function cdata( $value ) { - $this->feed .= ""; - } -} diff --git a/doofinder-for-woocommerce/includes/helpers/class-helpers.php b/doofinder-for-woocommerce/includes/helpers/class-helpers.php old mode 100644 new mode 100755 index dfdc70b5..c166adc7 --- a/doofinder-for-woocommerce/includes/helpers/class-helpers.php +++ b/doofinder-for-woocommerce/includes/helpers/class-helpers.php @@ -1,22 +1,12 @@ get_active_language(); - // if ( ! $language_code ) { - // return $base; - // } + /** + * Retrieve the name of the wordpress option + * for the current languages. + * + * Some fields in Doofinder settings will have different values, + * depending on language. + * + * @param string $base + * + * @return string + */ - // $base_language = $this->get_base_language(); - // if ( $language_code === $base_language ) { - // return $base; - // } - - // return "{$base}_{$language_code}"; - // } - - /** - * Retrieve the name of the wordpress option - * for the current languages. - * - * Some fields in Doofinder settings will have different values, - * depending on language. - * - * @param string $base - * - * @return string - */ - //abstract public function get_option_name( $base ); + /** + * Retrieve the name of the wordpress option + * for the current languages. + * + * Some fields in Doofinder settings will have different values, + * depending on language. + * + * @param string $base + * + * @return string + */ + //abstract public function get_option_name( $base ); } diff --git a/doofinder-for-woocommerce/includes/multilanguage/class-multilanguage.php b/doofinder-for-woocommerce/includes/multilanguage/class-multilanguage.php old mode 100644 new mode 100755 index 53fb4eb2..aad9262e --- a/doofinder-for-woocommerce/includes/multilanguage/class-multilanguage.php +++ b/doofinder-for-woocommerce/includes/multilanguage/class-multilanguage.php @@ -1,6 +1,6 @@ posts as posts - LEFT JOIN $wpdb->posts as postparents - ON posts.post_parent = postparents.ID - WHERE (posts.post_type = '{$post_type}' OR posts.post_type = '{$post_type}_variation') - AND posts.post_status = 'publish' - AND (postparents.post_status IS NULL OR postparents.post_status = 'publish') - AND posts.ID > $ids_greater_than - ORDER BY posts.ID - LIMIT $number_of_posts - "; - } else { - $query = " - SELECT DISTINCT $wpdb->posts.ID - FROM $wpdb->posts - WHERE $wpdb->posts.post_type = '{$post_type}' - AND $wpdb->posts.post_status = 'publish' - AND $wpdb->posts.ID > $ids_greater_than - ORDER BY $wpdb->posts.ID - LIMIT $number_of_posts - "; - } - - - - $log->log( 'Get Posts IDs - Query:' ); - $log->log($query); - - $ids = $wpdb->get_results( $query, ARRAY_N ); - - //$log->log( 'Get Posts IDs - Result:' ); - //$log->log( $ids ); - - if ( ! $ids ) { - return array(); - } - - return array_map( function ( $item ) { - return $item[0]; - }, $ids ); - } - - /** - * Retrieve the name of the wordpress option - * for the current languages. - * - * Some fields in Doofinder settings will have different values, - * depending on language. - * - * @param string $base - * - * @return string - */ - public function get_option_name( $base ) { - $language_code = $this->get_active_language(); - if ( ! $language_code ) { - return $base; - } - - $base_language = $this->get_base_language(); - if ( $language_code === $base_language ) { - return $base; - } - - return "{$base}_{$language_code}"; - } -} +get_active_language(); + if (!$language_code) { + return $base; + } + + $base_language = $this->get_base_language(); + if ($language_code === $base_language) { + return $base; + } + + return "{$base}_{$language_code}"; + } +} diff --git a/doofinder-for-woocommerce/includes/multilanguage/class-polylang.php b/doofinder-for-woocommerce/includes/multilanguage/class-polylang.php new file mode 100755 index 00000000..b23d7e28 --- /dev/null +++ b/doofinder-for-woocommerce/includes/multilanguage/class-polylang.php @@ -0,0 +1,78 @@ + 'language')); + foreach ($languages as $language) { + $language_slugs[$language->slug] = $language->name; + } + + return $language_slugs; + } + + /** + * @inheritdoc + */ + public function get_active_language() + { + // Sometimes even if Polylang constant exists the function does not. + if (!function_exists('pll_current_language')) { + return ''; + } + + // There's "Show all languages" option. When selected we want to treat + // it as if no language was selected. Luckily Polylang already + // returns empty string for it so we don't have to do anything else. + return \pll_current_language(); + } + + /** + * @inheritdoc + */ + public function get_current_language() + { + // Sometimes even if Polylang constant exists the function does not. + if (!function_exists('pll_current_language')) { + return ''; + } + + // There's "Show all languages" option. When selected we want to treat + // it as if no language was selected. Luckily Polylang already + // returns empty string for it so we don't have to do anything else. + return \pll_current_language(); + } + + /** + * @inheritdoc + */ + public function get_base_language() + { + return \pll_default_language(); + } + + /** + * @inheritdoc + */ + public function get_default_language() + { + return \pll_default_language(); + } +} diff --git a/doofinder-for-woocommerce/includes/multilanguage/class-wpml.php b/doofinder-for-woocommerce/includes/multilanguage/class-wpml.php old mode 100644 new mode 100755 index 2aac6c77..a48dc079 --- a/doofinder-for-woocommerce/includes/multilanguage/class-wpml.php +++ b/doofinder-for-woocommerce/includes/multilanguage/class-wpml.php @@ -1,10 +1,10 @@ get_default_language(); - return $this->languages[$lang_code]['locale']; + $lang_code = $sitepress->get_default_language(); + return $this->languages[$lang_code]['code']; } @@ -83,7 +83,7 @@ public function get_base_locale() { global $sitepress; - $lang_code = $sitepress->get_default_language(); + $lang_code = $sitepress->get_default_language(); return $this->languages[$lang_code]['locale']; } @@ -106,10 +106,6 @@ public function get_active_language() if ($lang === 'all') { return ''; } - - //get locale code - $lang = $this->get_locale_by_lang_code($lang); - return $lang; } @@ -134,7 +130,12 @@ public function get_current_language() return ''; } - return $this->languages[$lang]; + + if($lang === $this->get_base_language()){ + return ''; + } + + return $lang; } return false; @@ -155,25 +156,6 @@ public function get_home_url($language) return $url; } - /** - * @since 1.0.0 - * @inheritdoc - */ - public function get_feed_link($name, $language = '') - { - if (empty($language)) { - return get_feed_link($name); - } - - global $sitepress; - - $sitepress->switch_lang($language); - $link = get_feed_link($name); - $sitepress->switch_lang(ICL_LANGUAGE_CODE); - - return $link; - } - /** * @since 1.0.0 * @inheritdoc @@ -183,110 +165,37 @@ public function get_languages() return $this->languages; } - /** - * @inheritdoc - */ - public function get_formatted_languages() - { - if (!function_exists('icl_get_languages')) { - return array(); - } - - // "wpml_active_languages" filters the list of the - // languages enabled (active) for a site. - $languages = apply_filters('wpml_active_languages', null, 'orderby=code&order=desc'); - - if (empty($languages)) { - return array(); - } - - // Create associative array with lang code / lang name pairs. - // For example 'en' => 'English'. - $formatted_languages = array(); - foreach ($languages as $key => $value) { - $language_code = $value['default_locale']; - $formatted_languages[$language_code] = $value['translated_name']; - } - - return $formatted_languages; - } - - /** - * @since 1.0.0 - * @inheritdoc - */ - public function get_posts($args, $language) - { - global $sitepress; - - $sitepress->switch_lang($language); - $posts = get_posts($args); - $sitepress->switch_lang($this->get_current_language()); - - return $posts; - } - - /** - * @inheritdoc - */ - public function get_posts_ids($language_code, $post_type, $ids_greater_than, $number_of_posts) - { - global $wpdb; - global $sitepress; - - $language_code = Helpers::get_language_from_locale($language_code); - $split_variable_lang = $sitepress ? 'all' : ''; - - // Set post types to query depending on split_variable option - if ('yes' === Settings::get('feed', 'split_variable', $split_variable_lang) && $post_type === 'product') { - - $query = " - SELECT DISTINCT posts.ID - FROM {$wpdb->prefix}icl_translations as translations - LEFT JOIN {$wpdb->prefix}posts as posts - ON ( translations.element_id = posts.ID ) - LEFT JOIN {$wpdb->prefix}posts as postparents - ON posts.post_parent = postparents.ID - WHERE translations.language_code = '$language_code' - AND ( translations.element_type = 'post_{$post_type}' OR translations.element_type = 'post_{$post_type}_variation' ) - AND posts.id > $ids_greater_than - AND posts.post_status = 'publish' - AND (postparents.post_status IS NULL OR postparents.post_status = 'publish') - ORDER BY posts.id - LIMIT $number_of_posts - "; - } else { - - $query = " - SELECT {$wpdb->prefix}icl_translations.element_id - FROM {$wpdb->prefix}icl_translations - JOIN {$wpdb->prefix}posts - ON {$wpdb->prefix}icl_translations.element_id = {$wpdb->prefix}posts.ID - WHERE {$wpdb->prefix}icl_translations.language_code = '$language_code' - AND {$wpdb->prefix}icl_translations.element_type = 'post_{$post_type}' - AND {$wpdb->prefix}icl_translations.element_id > $ids_greater_than - AND {$wpdb->prefix}posts.post_status = 'publish' - ORDER BY {$wpdb->prefix}icl_translations.element_id - LIMIT $number_of_posts - "; - } - - $this->log->log('Get Posts IDs - Query:'); - $this->log->log($query); - - $ids = $wpdb->get_results($query, ARRAY_N); - - //$this->log->log( 'Get Posts IDs - Result:' ); - //$this->log->log( $ids ); - - if (!$ids) { - return array(); - } - - return array_map(function ($item) { - return $item[0]; - }, $ids); - } + /** + * @inheritdoc + */ + public function get_formatted_languages() + { + if (!function_exists('icl_get_languages')) { + return array(); + } + + // "wpml_active_languages" filters the list of the + // languages enabled (active) for a site. + $languages = apply_filters('wpml_active_languages', null, 'orderby=code&order=desc'); + + if (empty($languages)) { + return array(); + } + + // Create associative array with lang code / lang name pairs. + // For example 'en' => 'English'. + $formatted_languages = array(); + foreach ($languages as $key => $value) { + $language_code = $value['default_locale']; + $translated_name = isset($value['translated_name']) ? $value['translated_name'] : ''; + if(empty($translated_name)){ + $translated_name = isset($value['display_name']) ? $value['display_name'] : ''; + } + $formatted_languages[$language_code] = $translated_name; + } + + return $formatted_languages; + } /** * @inheritdoc @@ -303,9 +212,9 @@ public function get_option_name($base) return $base; } - //Replace hyphens with underscores in language code + //Replace hyphens with underscores in language code $language_code = Helpers::get_language_from_locale($language_code); return "{$base}_{$language_code}"; } -} \ No newline at end of file +} diff --git a/doofinder-for-woocommerce/includes/settings/attributes.php b/doofinder-for-woocommerce/includes/settings/attributes.php deleted file mode 100644 index d99c0097..00000000 --- a/doofinder-for-woocommerce/includes/settings/attributes.php +++ /dev/null @@ -1,104 +0,0 @@ - array( - 'title' => __( 'Attribute: Post Title', 'woocommerce-doofinder' ), - 'type' => 'predefined', - 'source' => 'post_title', - ), - - 'post_content' => array( - 'title' => __( 'Attribute: Description', 'woocommerce-doofinder' ), - 'type' => 'predefined', - 'source' => 'post_content', - ), - - 'post_excerpt' => array( - 'title' => __( 'Attribute: Short Description', 'woocommerce-doofinder' ), - 'type' => 'predefined', - 'source' => 'post_excerpt', - ), - - 'permalink' => array( - 'title' => __( 'Attribute: Post Link', 'woocommerce-doofinder' ), - 'type' => 'predefined', - 'source' => 'permalink', - ), - - /* - * WooCommerce fields - */ - - 'downloadable' => array( - 'title' => __( 'Attribute: Downloadable', 'woocommerce-doofinder' ), - 'type' => 'meta', - 'source' => '_downloadable', - ), - - 'virtual' => array( - 'title' => __( 'Attribute: Virtual', 'woocommerce-doofinder' ), - 'type' => 'meta', - 'source' => '_virtual', - ), - - 'purchase_note' => array( - 'title' => __( 'Attribute: Purchase Note', 'woocommerce-doofinder' ), - 'type' => 'meta', - 'source' => '_purchase_note', - ), - - 'featured' => array( - 'title' => __( 'Attribute: Featured', 'woocommerce-doofinder' ), - 'type' => 'meta', - 'source' => '_featured', - ), - - 'weight' => array( - 'title' => __( 'Attribute: Weight', 'woocommerce-doofinder' ), - 'type' => 'meta', - 'source' => '_weight', - ), - - 'length' => array( - 'title' => __( 'Attribute: Length', 'woocommerce-doofinder' ), - 'type' => 'meta', - 'source' => '_length', - ), - - 'width' => array( - 'title' => __( 'Attribute: Width', 'woocommerce-doofinder' ), - 'type' => 'meta', - 'source' => '_width', - ), - - 'height' => array( - 'title' => __( 'Attribute: Height', 'woocommerce-doofinder' ), - 'type' => 'meta', - 'source' => '_height', - ), -); - -// WooCommerce attributes. -// (the taxonomy registered by WC, in Products > Attributes) -$wc_attributes = wc_get_attribute_taxonomies(); -foreach ( $wc_attributes as $wc_attribute ) { - $attributes[ 'pa_' . $wc_attribute->attribute_name ] = array( - 'title' => __( 'Custom Attribute:', 'woocommerce-doofinder' ) . ' ' . $wc_attribute->attribute_label, - 'type' => 'wc_attribute', - 'source' => $wc_attribute->attribute_name, - ); -} - -// Custom attribute. -// Allowing user to provide a custom meta field name. -$attributes['custom'] = array( - 'title' => __( 'Custom (Post Meta)', 'woocommerce-doofinder' ), - 'type' => 'custom_meta' -); - -return $attributes; diff --git a/doofinder-for-woocommerce/includes/settings/class-accessors.php b/doofinder-for-woocommerce/includes/settings/class-accessors.php index 436bef77..04a68874 100644 --- a/doofinder-for-woocommerce/includes/settings/class-accessors.php +++ b/doofinder-for-woocommerce/includes/settings/class-accessors.php @@ -1,676 +1,368 @@ - 'on'] $post_types - * @param string $language Language code. - */ - public static function set_post_types_to_index($post_types, $language = '') - { - update_option(self::option_name_for_language( - 'doofinder_for_wc_post_types_to_index', - $language - ), $post_types); - } - - /** - * Retrieve the information whether or not we should index categories. - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - * - * @return bool - */ - public static function get_index_categories($language = '') - { - return (bool) get_option(self::option_name_for_language( - 'doofinder_for_wc_index_categories', - $language - )); - } - - /** - * Retrieve the information whether or not we should index tags. - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - * - * @return bool - */ - public static function get_index_tags($language = '') - { - return (bool) get_option(self::option_name_for_language( - 'doofinder_for_wc_index_tags', - $language - )); - } - - /** - * Determine if the configuration is completed. - * - * Complete configuration means that API Key and Search Engine HashID fields are filled. - * - * @return bool - */ - public static function is_configuration_complete() - { - return (bool) (self::get_api_key() && self::get_search_engine_hash()); - } - - /** - * Determine if the configuration of data for API connection is completed. - * - * Complete configuration means that API Key and API Host and Admin Endpoint fields are filled. - * - * @return bool - */ - public static function is_api_configuration_complete() - { - return (bool) (self::get_api_key() && self::get_api_host() && self::get_admin_endpoint()); - } - - /** - * Determine if the JS Layer is enabled in the settings. - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - * - * @return bool - */ - public static function is_js_layer_enabled($language = '') - { - $option_name = self::option_name_for_language( - 'woocommerce_doofinder_layer_enabled', - $language - ); - //var_dump($option_name); - - $option = get_option($option_name); - //var_dump($option); - - return $option === 'yes' ? true : false; - } - - /** - * Determine if we should grab JS layer directly from Doofinder. - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - * - * @return bool - */ - public static function is_js_layer_from_doofinder_enabled($language = '') - { - return (bool) get_option(self::option_name_for_language( - 'doofinder_for_wc_load_js_layer_from_doofinder', - $language - )); - } - - /** - * Enable JS Layer. - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - */ - public static function enable_js_layer($language = '') - { - update_option(self::option_name_for_language( - 'woocommerce_doofinder_layer_enabled', - $language - ), 'yes'); - } - - /** - * Disable JS Layer. - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - */ - public static function disable_js_layer($language = '') - { - update_option(self::option_name_for_language( - 'woocommerce_doofinder_layer_enabled', - $language - ), 'no'); - } - - /** - * Retrieve the code of the JS Layer. - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - * - * @return string - */ - public static function get_js_layer($language = '') - { - return wp_unslash(get_option(self::option_name_for_language( - 'woocommerce_doofinder_layer_code', - $language - ))); - } - - /** - * Update the value of the JS Layer script. - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $value - * @param string $language Language code. - */ - public static function set_js_layer($value, $language = '') - { - update_option(self::option_name_for_language('woocommerce_doofinder_layer_code', $language), $value); - } - - /** - * Determine if the Internal Search is enabled. - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - * - * @return bool - */ - public static function is_internal_search_enabled($language = '') - { - - $option_name = self::option_name_for_language( - 'woocommerce_doofinder_internal_search_enable', - $language - ); - //var_dump($option_name); - - $option = get_option($option_name); - //var_dump($option); - - return $option === 'yes' ? true : false; - } - - /** - * Enable Internal Search. - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - */ - public static function enable_internal_search($language = '') - { - update_option(self::option_name_for_language( - 'woocommerce_doofinder_internal_search_enable', - $language - ), 'yes'); - } - - /** - * Disable Internal Search. - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - */ - public static function disable_internal_search($language = '') - { - update_option(self::option_name_for_language( - 'woocommerce_doofinder_internal_search_enable', - $language - ), 'no'); - } - - - /** - * Determine if the update on save is enabled. - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @return bool - */ - public static function is_update_on_save_enabled() - { - $option = get_option('woocommerce_doofinder_indexing_update_on_save', 'yes'); - return $option === 'yes' ? true : false; - } - - /** - * Enable update on save. - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - */ - public static function enable_update_on_save() - { - update_option('woocommerce_doofinder_indexing_update_on_save', 'yes'); - } - - /** - * Disable update on save. - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - */ - public static function disable_update_on_save() - { - update_option('woocommerce_doofinder_indexing_update_on_save', 'no'); - } - - /** - * Retrieve additional attributes to be added to the index - * by the user. - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - * - * @return array - */ - public static function get_additional_attributes($language = '') - { - return get_option(self::option_name_for_language( - 'woocommerce_doofinder_feed_attributes_additional_attributes', - $language - )); - } - - /** - * Retrieve last modified date for index (in Doofinder) - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - */ - public static function get_last_modified_index($language = '') - { - return get_option(self::option_name_for_language( - 'woocommerce_doofinder_last_modified_index', - $language - )); - } - - /** - * Set last modified date for index (in Doofinder) - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - * @param int $update_time Timestamp of the update time - */ - public static function set_last_modified_index($language = '', $update_time = null) - { - - $update_time = $update_time ?: time(); - - update_option(self::option_name_for_language( - 'woocommerce_doofinder_last_modified_index', - $language - ), $update_time); - } - - - /** - * Retrieve last modified date for db data - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - */ - public static function get_last_modified_db($language = '') - { - return get_option(self::option_name_for_language( - 'woocommerce_doofinder_last_modified_db', - $language - )); - } - - /** - * Set last modified date for db data - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - * @param int $update_time Timestamp of the update time - */ - public static function set_last_modified_db($language = '', $update_time = null) - { - - $update_time = $update_time ?: time(); - - update_option(self::option_name_for_language( - 'woocommerce_doofinder_last_modified_db', - $language - ), $update_time); - } - - - /** - * Retrieve the Business Sector - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $language Language code. - * - * @return bool - */ - public static function get_sector($language = '') - { - return get_option(self::option_name_for_language( - 'doofinder_for_wc_sector', - $language - )); - } - - - /** - * Update the value of the Business Sector - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $value - * @param string $language Language code. - */ - public static function set_sector($value, $language = '') - { - update_option(self::option_name_for_language('doofinder_for_wc_sector', $language), $value); - } - - /** - * Generate the name of the option for a given language. - * - * Values of the fields for different languages are stored under different options. - * Language code is added to option name, except for default language, because we want - * settings for default language be exactly the same as if language plugin - * was disabled. - * - * @param string $option_name Base option name, before adding a suffix. - * @param string $language Language code. - * - * @return string Option name with optionally added suffix. - */ - private static function option_name_for_language($option_name, $language = '') - { - if ($language) { - $option_name .= "_{$language}"; - } else { - $language = Multilanguage::instance(); - $option_name = $language->get_option_name($option_name); - } - - return $option_name; - } - - - /** - * Retrieve the Plugin Version - * - * Just an alias for "get_option", because ideally we don't - * want to replace the option name in multiple files. - * - * - * @return string - */ - public static function get_plugin_version() - { - return get_option('doofinder_for_wc_plugin_version', '1.5.29'); - } - - - /** - * Update the value of the Plugin Version - * - * Just an alias for "update_option", because ideally we don't - * want to replace the option name in multiple files. - * - * @param string $value - */ - public static function set_plugin_version($value) - { - update_option("doofinder_for_wc_plugin_version", $value); - } -} +get_option_name($option_name); + } + + return $option_name; + } + + /** + * Retrieve last modified date for index (in Doofinder) + * + * Just an alias for "get_option", because ideally we don't + * want to replace the option name in multiple files. + * + * @param string $language Language code. + */ + public static function get_last_modified_index($language = '') + { + return get_option(self::option_name_for_language( + 'doofinder_for_wp_last_modified_index', + $language + )); + } + + /** + * Set last modified date for index (in Doofinder) + * + * Just an alias for "update_option", because ideally we don't + * want to replace the option name in multiple files. + * + * @param string $language Language code. + * @param int $update_time Timestamp of the update time + */ + public static function set_last_modified_index($language = '', $update_time = null) + { + $update_time = $update_time ?: time(); + + update_option(self::option_name_for_language( + 'doofinder_for_wp_last_modified_index', + $language + ), $update_time); + } + + /** + * Retrieve the Business Sector + * + * Just an alias for "get_option", because ideally we don't + * want to replace the option name in multiple files. + * + * @return string + */ + public static function get_sector() + { + return get_option('doofinder_sector'); + } + + + /** + * Update the value of the Business Sector + * + * Just an alias for "update_option", because ideally we don't + * want to replace the option name in multiple files. + * + * @param string $value + */ + public static function set_sector($value) + { + update_option('doofinder_sector', $value); + } + + /** + * Determine if the configuration of data is completed. + * + * Complete configuration means that API Key and API Host and Admin Endpoint fields are filled. + * + * @return bool + */ + public static function is_api_configuration_complete() + { + return (bool) (self::get_api_key() && self::get_api_host()); + } + + + /** + * Retrieve the Indexing status + * + * @param string $language Language code. + * + * @return bool + */ + public static function get_indexing_status($language = '') + { + $status = get_option(self::option_name_for_language( + 'doofinder_for_wp_indexing_status', + $language + ), 'processing'); + return $status; + } + + + /** + * Update the value of the Indexing status + * + * + * @param string $value + */ + public static function set_indexing_status($value, $language = '') + { + update_option(self::option_name_for_language('doofinder_for_wp_indexing_status', $language), $value); + } + + public static function get_plugin_version() + { + return get_option('doofinder_for_wp_plugin_version', '1.9.9'); + } + + + public static function set_plugin_version($version) + { + return update_option('doofinder_for_wp_plugin_version', $version); + } +} diff --git a/doofinder-for-woocommerce/includes/settings/class-attributes.php b/doofinder-for-woocommerce/includes/settings/class-attributes.php deleted file mode 100644 index 519377b6..00000000 --- a/doofinder-for-woocommerce/includes/settings/class-attributes.php +++ /dev/null @@ -1,255 +0,0 @@ -attributes = include 'attributes.php'; - } - - /** - * Check if the attribute of given name is customized in settings. - * - * @param string $name Name of the attribute to check. - * - * @return bool True if the user configured and saved the attribute, false otherwise. - */ - public function have($name) - { - $option = Settings::get('feed_attributes', $name); - - return !empty($option); - } - - /** - * Retrieve the value of the attribute by name. - * - * @param string $name Name of the attribute to retrieve. - * @param \WP_Post $product Product to retrieve attribute value from. - * - * @return mixed Attribute value. - */ - public function get($name, $product) - { - $attribute = Settings::get('feed_attributes', $name); - if (!isset($this->attributes[$attribute])) { - return ''; - } - - return $this->get_attribute_value($attribute, $product); - } - - /** - * Retrieve the value of the attribute from a given product. - * - * @param string $attribute_name Attribute name, as present in attributes config. - * @param \WP_Post $product Product to retrieve attribute value from. - * @param array $parameters Additional attribute parameters. Not all attributes use this. - * - * @return mixed Attribute value. - */ - public function get_attribute_value($attribute_name, $product, $parameters = []) - { - $attribute = $this->attributes[$attribute_name]; - $value = ''; - switch ($attribute['type']) { - case 'predefined': - $value = $this->get_attribute_predefined($attribute['source'], $product); - break; - - case 'meta': - $value = $this->get_attribute_meta($attribute['source'], $product); - break; - - case 'wc_attribute': - $value = $this->get_attribute_wc($attribute['source'], $product); - break; - - case 'custom_meta': - $value = $this->get_attribute_custom_meta($parameters, $product); - break; - } - - // Check if we should export units - if ('yes' === Settings::get('feed', 'export_units') && !empty($value)) { - if (in_array($attribute_name, $this->dimensions)) { - return $value . Settings::get_wc_option('woocommerce_dimension_unit'); - } - - if (in_array($attribute_name, $this->weight)) { - return $value . Settings::get_wc_option('woocommerce_weight_unit'); - } - } - - return $value; - } - - /** - * Get value of predefined (coming from the WP functions relating to posts) attribute. - * - * @param string $source What is the source of the attribute (which part of WP functionality). - * @param \WP_Post $product Product to retrieve attribute from. - * - * @return mixed The attribute value. - */ - private function get_attribute_predefined($source, $product) - { - switch ($source) { - case 'permalink': - return get_permalink($product); - case 'post_excerpt': - // Woo gives Product Variations weird excerpt by default - // (just the list of attributes). There's no UI to change it, - // but variations have a "description" field. - // So we'll take excerpt for regular products, and this - // description for variations. - if ($product->post_parent) { - return get_post_meta($product->ID, '_variation_description', true); - } else { - return get_the_excerpt($product); - } - // no break - default: - return $product->$source; - } - } - - /** - * Get the value of attribute stored in meta field. - * - * @param string $source Name of the meta field. - * @param \WP_Post $product Product to retrieve attribute from. - * - * @return mixed The attribute value. - */ - private function get_attribute_meta($source, $product) - { - return get_post_meta($product->ID, $source, true); - } - - /** - * Get the value of WooCommerce product attribute. - * - * @param string $source Name of the product attribute. - * @param \WP_Post $product Product to retrieve attribute from. - * - * @return mixed The attribute value. - * @since 1.2.2 - */ - private function get_attribute_wc($source, $product) - { - $product_factory = new \WC_Product_Factory(); - $product_object = $product_factory->get_product($product->ID); - $attribute = ""; - $attribute_name = 'pa_' . $source; - if ($product_object->get_type() === 'variable') { - $attributes = $product_object->get_variation_attributes(); - if(isset($attributes[$attribute_name])) { - $attribute = $attributes[$attribute_name]; - } - - } else { - $attributes = $product_object->get_attributes(); - $attribute = $product_object->get_attribute($attribute_name); - } - - if (empty($attribute)) { - return ""; - } - // Doofinder requires attributes to be separated by `/`. - // @see https://www.doofinder.com/support/the-data-feed/facets - if (is_array($attribute)) { - $attribute = array_map(function ($value) use ($attribute_name) { - return str_replace('/', '//', $this->get_wc_attribute_name($attribute_name, $value)); - }, $attribute); - return implode('/', $attribute); - } else { - $attribute = $this->get_wc_attribute_name($attribute_name, $attribute); - return str_replace('/', '//', $attribute); - } - } - - private function get_wc_attribute_name($attribute_name, $attribute_value_slug) - { - $attribute_term = get_term_by('slug', $attribute_value_slug, $attribute_name); - if (is_a($attribute_term, 'WP_Term')) { - return $attribute_term->name; - } else { - return $attribute_value_slug; - } - } - - /** - * Get the value of meta field by name specified by the user in - * Doofinder settings. - * - * @param array $parameters - * @param \WP_Post $product - * - * @return string - */ - private function get_attribute_custom_meta($parameters, $product) - { - if (!$parameters || !isset($parameters['value'])) { - return ''; - } - - return get_post_meta($product->ID, $parameters['value'], true); - } -} diff --git a/doofinder-for-woocommerce/includes/settings/class-helpers.php b/doofinder-for-woocommerce/includes/settings/class-helpers.php new file mode 100755 index 00000000..c570440c --- /dev/null +++ b/doofinder-for-woocommerce/includes/settings/class-helpers.php @@ -0,0 +1,26 @@ + +

+language->get_option_name('doofinder_for_wp_enable_js_layer'); + add_settings_field( + $enable_js_layer_option_name, + __('Enable Doofinder Layer', 'doofinder_for_wp'), + function () use ($enable_js_layer_option_name) { + $this->render_html_enable_js_layer($enable_js_layer_option_name); + }, + self::$top_level_menu, + $field_id + ); + + register_setting(self::$top_level_menu, $enable_js_layer_option_name); + + // API Key + $api_key_option_name = 'doofinder_for_wp_api_key'; + add_settings_field( + $api_key_option_name, + __('Api Key', 'doofinder_for_wp'), + function () use ($api_key_option_name) { + $this->render_html_api_key($api_key_option_name); + }, + self::$top_level_menu, + $field_id + ); + + register_setting(self::$top_level_menu, $api_key_option_name, array($this, 'validate_api_key')); + + // API Host + $api_host_option_name = 'doofinder_for_wp_api_host'; + add_settings_field( + $api_host_option_name, + __('Server', 'doofinder_for_wp'), + function () use ($api_host_option_name) { + $this->render_html_api_host($api_host_option_name); + }, + self::$top_level_menu, + $field_id, + [ + 'class' => 'hidden' + ] + ); + + register_setting(self::$top_level_menu, $api_host_option_name, array($this, 'validate_api_host')); + + // Search engine hash + $search_engine_hash_option_name = + $this->language->get_option_name('doofinder_for_wp_search_engine_hash'); + add_settings_field( + $search_engine_hash_option_name, + __('Search Engine HashID', 'doofinder_for_wp'), + function () use ($search_engine_hash_option_name) { + $this->render_html_search_engine_hash($search_engine_hash_option_name); + }, + self::$top_level_menu, + $field_id + ); + + register_setting(self::$top_level_menu, $search_engine_hash_option_name, array( + $this, + 'validate_search_engine_hash', + )); + + // Update on save + $update_on_save_option_name = $this->language->get_option_name('doofinder_for_wp_update_on_save'); + add_settings_field( + $update_on_save_option_name, + __('Update on save', 'doofinder_for_wp'), + function () use ($update_on_save_option_name) { + $this->render_html_update_on_save($update_on_save_option_name); + }, + self::$top_level_menu, + $field_id + ); + + register_setting(self::$top_level_menu, $update_on_save_option_name, array($this, 'validate_update_on_save')); + + + // JS Layer + $js_layer_option_name = + $this->language->get_option_name( 'doofinder_for_wp_js_layer' ); + add_settings_field( + $js_layer_option_name, + __( 'JS Layer Script', 'doofinder_for_wp' ), + function () use ( $js_layer_option_name ) { + $this->render_html_js_layer( $js_layer_option_name ); + }, + self::$top_level_menu, + $field_id + ); + + register_setting( self::$top_level_menu, $js_layer_option_name ); + } + + /** + * Add top level menu. + * + * @since 1.0.0 + */ + private function add_settings_page() + { + add_action('admin_menu', function () { + add_menu_page( + 'Doofinder WP & WooCommerce Search', + 'Doofinder', + 'manage_options', + self::$top_level_menu, + function () { + $this->render_html_settings_page(); + }, + 'dashicons-search' + ); + }); + } + + /** + * Validate api key. + * + * @param string + * + * @return string|null + */ + function validate_api_key($input) + { + if (null == $input) { + add_settings_error( + 'doofinder_for_wp_messages', + 'doofinder_for_wp_message_api_key', + __('API Key is mandatory.', 'doofinder_for_wp') + ); + } + + /** + * Old API keys use prefixes like eu1- and us1-, + * in api 2.0 there aren't needed. + */ + if (strpos($input, '-')) { + return substr($input, 4); + } else { + return $input; + } + } + + /** + * Validate api host. + * + * @param string + * + * @return string + */ + function validate_api_host($input) + { + if (null == $input) { + add_settings_error( + 'doofinder_for_wp_messages', + 'doofinder_for_wp_message_api_host', + __('API Host is mandatory.', 'doofinder_for_wp') + ); + } + + /** + * New API host must include https:// protocol. + */ + if (!empty($input)) { + $url = parse_url($input); + + if ($url['scheme'] !== 'https' && $url['scheme'] !== 'http') { + return 'https://' . $input; + } elseif ($url['scheme'] == 'http') { + return 'https://' . substr($input, 7); + } else { + return $input; + } + } + } + + /** + * Validate search engine hash. + * + * @param string $input + * + * @return string|null $input + */ + public function validate_search_engine_hash($input) + { + if (null == $input) { + add_settings_error( + 'doofinder_for_wp_messages', + 'doofinder_for_wp_message_search_engine_hash', + __('HashID is mandatory.', 'doofinder_for_wp') + ); + } + + return $input; + } + + /** + * Validate api host. + * + * @param string + * + * @return string|null + */ + function validate_update_on_save($input) + { + if (null == $input) { + add_settings_error( + 'doofinder_for_wp_messages', + 'doofinder_for_wp_message_update_on_save', + __('Update on save is mandatory.', 'doofinder_for_wp') + ); + } + return $input; + } +} diff --git a/doofinder-for-woocommerce/includes/settings/class-renderers.php b/doofinder-for-woocommerce/includes/settings/class-renderers.php new file mode 100755 index 00000000..5f4318d6 --- /dev/null +++ b/doofinder-for-woocommerce/includes/settings/class-renderers.php @@ -0,0 +1,351 @@ +language instanceof No_Language_Plugin) || $this->language->get_active_language()) { + $this->render_html_settings(); + + return; + } + + $this->render_html_pick_language_prompt(); + } + + /** + * Display the tabs. + */ + private function render_html_tabs() + { + // URL to the current page, but without GET for the nav item. + $base_url = add_query_arg( + 'page', + self::$top_level_menu, + admin_url('admin.php') + ); + + if (count(self::$tabs) > 1) : +?> + + + in_2d_array('doofinder_for_wp_message', $errors)) { + add_settings_error( + 'doofinder_for_wp_messages', + 'doofinder_for_wp_message', + __('Settings Saved', 'doofinder_for_wp'), + 'updated' + ); + } + + // show error/update messages + settings_errors('doofinder_for_wp_messages'); + get_settings_errors('doofinder_for_wp_messages'); + + ?> + +
+

+ + render_html_tabs(); ?> + +
+ render_html_current_tab_id(); + do_settings_sections(self::$top_level_menu); + submit_button('Save Settings'); + + ?> +
+ +
+ + + +
+

+ +
+

+
+
+ + + + + + + + + value="" > + + + + + + + + + + + value="" > + + language->get_current_language()); + $schedules = wp_get_schedules(); + //Sort by interval + uasort($schedules, function ($a, $b) { + return $a['interval'] - $b['interval']; + }); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +is_active() ) { - if ( empty( $language ) ) { - $language = $multilanguage->get_language_prefix(); - } elseif ($language == 'all') { - $language = ''; - } else { - $languages = $multilanguage->get_languages(); - $language = $languages[ $language ]['prefix']; - } - } - - $option = self::option_id( $part1, $part2, $language ); - return self::get_wc_option( $option ); - } - - /** - * Retrieve WooCommerce option. - * This is essentially a copy of WC_Admin_Settings::get_option, because earlier versions - * of WooCommerce don't include the class everywhere, and sometimes it's not present - * when reading the options. - * - * @param string $name Name of the option to retrieve. - * @return mixed Option value. - */ - public static function get_wc_option( $name ) { - // Array value - if ( strstr( $name, '[' ) ) { - parse_str( $name, $option_array ); - - // Option name is first key - $name = current( array_keys( $option_array ) ); - - // Get value - $option_values = get_option( $name, '' ); - - $key = key( $option_array[ $name ] ); - - if ( isset( $option_values[ $key ] ) ) { - $option_value = $option_values[ $key ]; - } else { - $option_value = null; - } - } - - // Single value - else { - $option_value = get_option( $name, null ); - } - - return $option_value; - } -} diff --git a/doofinder-for-woocommerce/includes/settings/feed-url.php b/doofinder-for-woocommerce/includes/settings/feed-url.php deleted file mode 100644 index db6f8b67..00000000 --- a/doofinder-for-woocommerce/includes/settings/feed-url.php +++ /dev/null @@ -1,18 +0,0 @@ - - -
- - -
diff --git a/doofinder-for-woocommerce/includes/settings/settings-data.php b/doofinder-for-woocommerce/includes/settings/settings-data.php deleted file mode 100644 index 9eab1ddd..00000000 --- a/doofinder-for-woocommerce/includes/settings/settings-data.php +++ /dev/null @@ -1,197 +0,0 @@ -is_active() && ! $multilanguage->get_language_code() ) { - echo $multilanguage->get_choose_language_notice(); - return array(); -} - -$affix = $multilanguage->get_language_prefix(); - -$sizes = array(); - -foreach ( $this->get_image_sizes() as $name => $dimensions ) { - $sizes[] = "$name (" . $dimensions['width'] . ' x ' . $dimensions['height'] . ')'; -} - -$feed_settings = array( - array( - 'title' => __( 'Settings', 'woocommerce-doofinder' ), - 'type' => 'title', - 'desc' => '', - 'id' => Multilanguage::code_suffix( 'feed_options', $affix ), - ), - - array( - 'title' => __( 'Export product prices', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'feed', 'export_prices', $affix ), - 'type' => 'checkbox', - 'default' => 'yes', - ), - - array( - 'title' => __( 'Export product tags', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'feed', 'export_tags', $affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - // array( - // 'title' => __( 'Protect feed with password', 'woocommerce-doofidner' ), - // 'desc' => '', - // 'id' => Settings::option_id( 'feed', 'password_protected', $affix ), - // 'type' => 'checkbox', - // 'default' => 'no', - // ), - - // array( - // 'title' => __( 'Feed password', 'woocommerce-doofinder' ), - // 'desc' => '', - // 'id' => Settings::option_id( 'feed', 'password', $affix ), - // 'type' => 'text', - // 'css' => 'width: 100%', - // 'default' => '', - // ), - - array( - 'title' => __( 'Split variable products', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'feed', 'split_variable', $affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - array( - 'title' => __( 'Export values with units', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'feed', 'export_units', $affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - /** - * This setting would have be better implemented in indexing-settings but it is not - * possible because that section is used to show the indexation interface. - */ - - array( - 'title' => __( 'Update on save', 'woocommerce-doofinder' ), - 'desc' => 'The index will be updated every time you make a change in your product', - 'id' => Settings::option_id( 'indexing', 'update_on_save' ), - 'type' => 'checkbox', - 'default' => 'yes', - ), - - /* - * Image size configuration temporarily omitted. - */ - array( - 'title' => __( 'Image size', 'woocommerce-doofinder' ), - 'desc' => sprintf( - __( 'Image size to export products with. If left empty the thumbnail size will be exported. Available image sizes are: %s', 'woocommerce-doofinder' ), - '
' . implode( ', ', $sizes ) . '
' - ), - 'id' => Settings::option_id( 'feed', 'image_size', $affix ), - 'type' => 'text', - 'css' => 'width: 100%', - 'default' => '', - ), - - array( - 'type' => 'sectionend', - 'id' => Multilanguage::code_suffix( 'feed_options', $affix ), - ), -); - -// Transform fields config into array accepted by Select fields -$options = array(); - -foreach ( $this->fields as $name => $settings ) { - $options[ $name ] = $settings['title']; -} - -$attributes = array( - array( - 'title' => __( 'Attributes', 'woocommerce-doofinder' ), - 'type' => 'title', - 'desc' => '', - 'id' => Multilanguage::code_suffix( 'feed_attributes', $affix ), - ), - - array( - 'id' => Settings::option_id( 'feed_attributes', 'title', $affix ), - 'title' => __( 'Title', 'woocommerce-doofinder' ), - 'type' => 'select', - 'desc' => '', - 'css' => 'width: 100%', - 'options' => $options, - 'default' => 'post_title', - ), - - array( - 'id' => Settings::option_id( 'feed_attributes', 'description', $affix ), - 'title' => __( 'Description', 'woocommerce-doofinder' ), - 'type' => 'select', - 'desc' => '', - 'css' => 'width: 100%', - 'options' => $options, - 'default' => 'post_content', - ), - - array( - 'id' => Settings::option_id( 'feed_attributes', 'link', $affix ), - 'title' => __( 'Link', 'woocommerce-doofinder' ), - 'type' => 'select', - 'desc' => '', - 'css' => 'width: 100%', - 'options' => $options, - 'default' => 'permalink', - ), - - array( - 'id' => Settings::option_id( 'feed_attributes', 'additional_attributes', $affix ), - 'title' => __( 'Additional Attributes', 'woocommerce-doofinder' ), - 'type' => 'doofinder-wc-attributes-repeater', - 'options' => $options, - ), - - array( - 'type' => 'sectionend', - 'id' => Multilanguage::code_suffix( 'feed_attributes', $affix ), - ), -); - - -$indexing_settings = array( - array( - 'title' => __( 'Indexing', 'woocommerce-doofinder' ), - 'type' => 'title', - 'desc' => '', - 'id' => Multilanguage::code_suffix( 'indexing_options', $affix ), - ), - - array( - 'title' => __( 'Enable debug mode', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'indexing', 'enable_debug_mode', $affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - - array( - 'type' => 'sectionend', - 'id' => Multilanguage::code_suffix( 'indexing_options', $affix ), - ), -); - - -return array_merge($feed_settings, $attributes, $indexing_settings); diff --git a/doofinder-for-woocommerce/includes/settings/settings-feed-attributes.php b/doofinder-for-woocommerce/includes/settings/settings-feed-attributes.php deleted file mode 100644 index bf06ee63..00000000 --- a/doofinder-for-woocommerce/includes/settings/settings-feed-attributes.php +++ /dev/null @@ -1,70 +0,0 @@ -is_active() && ! $multilanguage->get_language_code() ) { - echo $multilanguage->get_choose_language_notice(); - return array(); -} - -$affix = $multilanguage->get_language_prefix(); - -// Transform fields config into array accepted by Select fields -$options = array(); -foreach ( $this->fields as $name => $settings ) { - $options[ $name ] = $settings['title']; -} - -return array( - array( - 'title' => __( 'Data Feed Attributes', 'woocommerce-doofinder' ), - 'type' => 'title', - 'desc' => '', - 'id' => Multilanguage::code_suffix( 'feed_attributes', $affix ), - ), - - array( - 'id' => Settings::option_id( 'feed_attributes', 'title', $affix ), - 'title' => __( 'Title', 'woocommerce-doofinder' ), - 'type' => 'select', - 'desc' => '', - 'css' => 'width: 100%', - 'options' => $options, - 'default' => 'post_title', - ), - - array( - 'id' => Settings::option_id( 'feed_attributes', 'description', $affix ), - 'title' => __( 'Description', 'woocommerce-doofinder' ), - 'type' => 'select', - 'desc' => '', - 'css' => 'width: 100%', - 'options' => $options, - 'default' => 'post_content', - ), - - array( - 'id' => Settings::option_id( 'feed_attributes', 'link', $affix ), - 'title' => __( 'Link', 'woocommerce-doofinder' ), - 'type' => 'select', - 'desc' => '', - 'css' => 'width: 100%', - 'options' => $options, - 'default' => 'permalink', - ), - - array( - 'id' => Settings::option_id( 'feed_attributes', 'additional_attributes', $affix ), - 'title' => __( 'Additional Attributes', 'woocommerce-doofinder' ), - 'type' => 'doofinder-wc-attributes-repeater', - 'options' => $options, - ), - - array( - 'type' => 'sectionend', - 'id' => Multilanguage::code_suffix( 'feed_attributes', $affix ), - ), -); diff --git a/doofinder-for-woocommerce/includes/settings/settings-feed.php b/doofinder-for-woocommerce/includes/settings/settings-feed.php deleted file mode 100644 index e5218bec..00000000 --- a/doofinder-for-woocommerce/includes/settings/settings-feed.php +++ /dev/null @@ -1,98 +0,0 @@ -is_active() && ! $multilanguage->get_language_code() ) { - echo $multilanguage->get_choose_language_notice(); - return array(); -} - -$affix = $multilanguage->get_language_prefix(); - -$sizes = array(); -foreach ( $this->get_image_sizes() as $name => $dimensions ) { - $sizes[] = "$name (" . $dimensions['width'] . ' x ' . $dimensions['height'] . ')'; -} - -return array( - array( - 'title' => __( 'Feed Options', 'woocommerce-doofinder' ), - 'type' => 'title', - 'desc' => '', - 'id' => Multilanguage::code_suffix( 'feed_options', $affix ), - ), - - array( - 'title' => __( 'Protect feed with password', 'woocommerce-doofidner' ), - 'desc' => '', - 'id' => Settings::option_id( 'feed', 'password_protected', $affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - array( - 'title' => __( 'Feed password', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'feed', 'password', $affix ), - 'type' => 'text', - 'css' => 'width: 100%', - 'default' => '', - ), - - array( - 'title' => __( 'Export product prices', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'feed', 'export_prices', $affix ), - 'type' => 'checkbox', - 'default' => 'yes', - ), - - array( - 'title' => __( 'Export product tags', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'feed', 'export_tags', $affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - /* - * Image size configuration temporarily omitted. - */ - array( - 'title' => __( 'Image size', 'woocommerce-doofinder' ), - 'desc' => sprintf( - __( 'Image size to export products with. If left empty the thumbnail size will be exported. Available image sizes are: %s', 'woocommerce-doofinder' ), - '
' . implode( ', ', $sizes ) . '
' - ), - 'id' => Settings::option_id( 'feed', 'image_size', $affix ), - 'type' => 'text', - 'css' => 'width: 100%', - 'default' => '', - ), - - array( - 'title' => __( 'Split Variable products', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'feed', 'split_variable', $affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - array( - 'title' => __( 'Export values with units where applicable', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'feed', 'export_units', $affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - array( - 'type' => 'sectionend', - 'id' => Multilanguage::code_suffix( 'feed_options', $affix ), - ), -); diff --git a/doofinder-for-woocommerce/includes/settings/settings-indexing.php b/doofinder-for-woocommerce/includes/settings/settings-indexing.php deleted file mode 100644 index f41ee7d0..00000000 --- a/doofinder-for-woocommerce/includes/settings/settings-indexing.php +++ /dev/null @@ -1,20 +0,0 @@ - - -
- render_html_subpage(); - ?> -
get_language_prefix(); - -$api = array( - array( - 'title' => __( 'API Key', 'woocommerce-doofinder' ), - 'type' => 'title', - 'desc' => '', - 'id' => 'internal_search_api', - ), - - array( - 'title' => __( 'API Key', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'internal_search', 'api_key' ), - 'type' => 'text', - 'css' => 'width: 100%', - 'default' => '', - ), - - array( - 'type' => 'sectionend', - 'id' => 'internal_search_api', - ), -); - -$search_engine = array(); -if ( - $multilanguage->is_active() && $multilanguage->get_language_code() || - ! $multilanguage->is_active() -) { - $enable_question = __( 'Enable?', 'woocommerce-doofinder' ); - - // If we have internationalization - ask a question for specific language. - if ( $multilanguage->is_active() ) { - $lang = $multilanguage->get_current_language(); - $enable_question = sprintf( __( 'Enable for %s?', 'woocommerce-doofinder' ), $lang['name'] ); - } - - $search_engine = array( - array( - 'title' => __( 'Search Engine', 'woocommerce-doofinder' ), - 'type' => 'title', - 'desc' => '', - 'id' => Multilanguage::code_suffix( 'internal_search_engine', $lang_affix ), - ), - - array( - 'title' => $enable_question, - 'desc' => '', - 'id' => Settings::option_id( 'internal_search', 'enable', $lang_affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - array( - 'title' => __( 'Hash ID', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'internal_search', 'hashid', $lang_affix ), - 'type' => 'text', - 'css' => 'width: 100%', - 'default' => '', - ), - - array( - 'title' => __( 'Display banners above search results', 'woocommerce-doofinder' ), - 'desc' => __( '(You can disable this and use the Doofinder Banner widget instead)', 'woocommerce-doofinder' ), - 'id' => Settings::option_id( 'internal_search', 'banner', $lang_affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - array( - 'type' => 'sectionend', - 'id' => Multilanguage::code_suffix( 'internal_search_engine', $lang_affix ), - ), - ); -} - -return array_merge( $api, $search_engine ); diff --git a/doofinder-for-woocommerce/includes/settings/settings-layer.php b/doofinder-for-woocommerce/includes/settings/settings-layer.php deleted file mode 100644 index 0334c087..00000000 --- a/doofinder-for-woocommerce/includes/settings/settings-layer.php +++ /dev/null @@ -1,134 +0,0 @@ -get_language_prefix(); - - -$auth = array( - array( - 'title' => __( 'Authentication', 'woocommerce-doofinder' ), - 'type' => 'title', - 'desc' => '', - 'id' => 'internal_search_api', - ), - - array( - 'title' => __( 'API Key', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'internal_search', 'api_key' ), - 'type' => 'text', - 'css' => 'width: 100%', - 'default' => '', - // 'custom_attributes' => array('readonly' => 'readonly'), - ), - - // TODO Maybe hide this - array( - 'title' => __( 'API Host', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'internal_search', 'api_host' ), - 'type' => 'text', - 'css' => 'width: 100%', - 'class' => 'dfwc-url-input', - 'default' => '', - // 'custom_attributes' => array('readonly' => 'readonly'), - ), - - - // TODO Maybe hide this - array( - 'title' => __( 'Admin Endpoint', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'api', 'admin_endpoint' ), - 'type' => 'text', - 'css' => 'width: 100%', - 'class' => 'dfwc-url-input', - 'default' => '', - // 'custom_attributes' => array('readonly' => 'readonly'), - ), - - array( - 'type' => 'sectionend', - 'id' => 'internal_search_api', - ), -); - -if ( $multilanguage->is_active() && ! $multilanguage->get_language_code() ) { - echo $multilanguage->get_choose_language_notice(false); - return $auth; -} - -$search_engine = array(); - -if ( - $multilanguage->is_active() && $multilanguage->get_language_code() || - ! $multilanguage->is_active() -) { - - $search_engine = array( - array( - 'title' => __( 'Search', 'woocommerce-doofinder' ), - 'type' => 'title', - 'desc' => '', - 'id' => Multilanguage::code_suffix( 'internal_search_engine', $lang_affix ), - ), - - array( - 'title' => __( 'Hash ID', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'internal_search', 'hashid', $lang_affix ), - 'type' => 'text', - 'css' => 'width: 100%', - 'default' => '' - ), - - array( - 'title' => __( 'Search Server', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'internal_search', 'search_server' ), // Lang affix removed to make this setting global - 'type' => 'text', - 'css' => 'width: 100%', - 'class' => 'dfwc-url-input', - 'default' => '', - // 'custom_attributes' => array('readonly' => 'readonly'), - ), - - array( - 'title' => __( 'Layer Snippet', 'woocommerce-doofinder' ), - 'desc' => '',//__( 'Paste here the Javascript code you will find in your Doofinder Control Panel under Configuration > Installation Scripts > Doofinder Layer.', 'woocommerce-doofinder' ), - 'id' => Settings::option_id( 'layer', 'code', $lang_affix ), - 'css' => 'margin-top: 5px; width: 100%; height: 350px; font-family: Consolas,Monaco,monospace; background: rgb(255 255 255 / 100%);', - 'type' => 'textarea', - 'default' => '' - ), - - array( - 'title' => __( 'Enable Doofinder Layer', 'woocommerce-doofinder' ), - 'desc' => '', - 'id' => Settings::option_id( 'layer', 'enabled', $lang_affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - array( - 'title' => __( 'Enable Banners', 'woocommerce-doofinder' ), - 'desc' => __( '(Banners will be displayed above search results. You can use Doofinder Banner widget instead)', 'woocommerce-doofinder' ), - 'id' => Settings::option_id( 'internal_search', 'banner', $lang_affix ), - 'type' => 'checkbox', - 'default' => 'no', - ), - - array( - 'type' => 'sectionend', - 'id' => Multilanguage::code_suffix( 'internal_search_engine', $lang_affix ), - ), - ); -} - - -return array_merge($auth, $search_engine); diff --git a/doofinder-for-woocommerce/includes/settings/settings-log.php b/doofinder-for-woocommerce/includes/settings/settings-log.php deleted file mode 100644 index 31e09319..00000000 --- a/doofinder-for-woocommerce/includes/settings/settings-log.php +++ /dev/null @@ -1,24 +0,0 @@ - - - -
-

- -

-
-
'Displays banners from Doofinder search. Use it in the search results page if you don\'t like the default location.', - ) - ); - } - - /** - * Output the widget on the frontend. - * - * This is done via action because banner data comes as a part of API response, which will - * be done only once. Therefore a class that has access to results can (and should) hook into this - * action to generate output. - * - * @param array $args - * @param array $instance - */ - public function widget( $args, $instance ) { - // Banner is only displayed sometimes, and we don't want to add widget wrapper - // in case there is no banner, because that adds additional padding / space - // in the widget sidebar. - ob_start(); - do_action( 'doofinder_for_woocommerce_search_banner_widget' ); - $banner_html = ob_get_clean(); - - if ( empty( trim( $banner_html ) ) ) { - return; - } - - echo $args['before_widget']; - echo $banner_html; - echo $args['after_widget']; - } -} diff --git a/doofinder-for-woocommerce/lib/autoload.php b/doofinder-for-woocommerce/lib/autoload.php deleted file mode 100644 index dceb0600..00000000 --- a/doofinder-for-woocommerce/lib/autoload.php +++ /dev/null @@ -1,21 +0,0 @@ -=5.6", - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "guzzlehttp/guzzle": "^6.5" - }, - "require-dev": { - "phpunit/phpunit": "4.8.*", - "php-mock/php-mock-phpunit": "1.1.*", - "squizlabs/php_codesniffer": "~2.6" - }, - "autoload": { - "psr-4": { - "Doofinder\\Search\\": "src/Search/", - "Doofinder\\Management\\" : "src/Management/", - "DoofinderManagement\\" : "src/Management/PhpClient/" - } - } -} diff --git a/doofinder-for-woocommerce/lib/composer.lock b/doofinder-for-woocommerce/lib/composer.lock deleted file mode 100644 index 583c02d2..00000000 --- a/doofinder-for-woocommerce/lib/composer.lock +++ /dev/null @@ -1,2145 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "93dab442505e0b704efad1f53344d1e4", - "packages": [ - { - "name": "guzzlehttp/guzzle", - "version": "6.5.5", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17.0" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.1" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.5-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5" - }, - "time": "2020-06-16T21:01:06+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.1" - }, - "time": "2021-03-07T09:25:29+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.8.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "dc960a912984efb74d0a90222870c72c87f10c91" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", - "reference": "dc960a912984efb74d0a90222870c72c87f10c91", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.2" - }, - "time": "2021-04-26T09:17:50+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "time": "2019-03-08T08:55:37+00:00" - }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", - "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T09:27:20+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T09:17:38+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2020-11-10T18:47:58+00:00" - }, - { - "name": "php-mock/php-mock", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-mock/php-mock.git", - "reference": "bfa2d17d64dbf129073a7ba2051a96ce52749570" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock/zipball/bfa2d17d64dbf129073a7ba2051a96ce52749570", - "reference": "bfa2d17d64dbf129073a7ba2051a96ce52749570", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpunit/php-text-template": "^1" - }, - "replace": { - "malkusch/php-mock": "*" - }, - "require-dev": { - "phpunit/phpunit": "^4|^5" - }, - "suggest": { - "php-mock/php-mock-mockery": "Allows using PHPMockery for Mockery integration", - "php-mock/php-mock-phpunit": "Allows integration into PHPUnit testcase with the trait PHPMock." - }, - "type": "library", - "autoload": { - "psr-4": { - "phpmock\\": [ - "classes/", - "tests/unit/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "WTFPL" - ], - "authors": [ - { - "name": "Markus Malkusch", - "email": "markus@malkusch.de", - "homepage": "http://markus.malkusch.de", - "role": "Developer" - } - ], - "description": "PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.", - "homepage": "https://github.com/php-mock/php-mock", - "keywords": [ - "BDD", - "TDD", - "function", - "mock", - "stub", - "test", - "test double" - ], - "support": { - "issues": "https://github.com/php-mock/php-mock/issues", - "source": "https://github.com/php-mock/php-mock/tree/master" - }, - "time": "2015-11-11T22:37:09+00:00" - }, - { - "name": "php-mock/php-mock-integration", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-mock/php-mock-integration.git", - "reference": "e83fb65dd20cd3cf250d554cbd4682b96b684f4b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-integration/zipball/e83fb65dd20cd3cf250d554cbd4682b96b684f4b", - "reference": "e83fb65dd20cd3cf250d554cbd4682b96b684f4b", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "php-mock/php-mock": "^1", - "phpunit/php-text-template": "^1" - }, - "require-dev": { - "phpunit/phpunit": "^4|^5" - }, - "type": "library", - "autoload": { - "psr-4": { - "phpmock\\integration\\": "classes/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "WTFPL" - ], - "authors": [ - { - "name": "Markus Malkusch", - "email": "markus@malkusch.de", - "homepage": "http://markus.malkusch.de", - "role": "Developer" - } - ], - "description": "Integration package for PHP-Mock", - "homepage": "https://github.com/php-mock/php-mock-integration", - "keywords": [ - "BDD", - "TDD", - "function", - "mock", - "stub", - "test", - "test double" - ], - "support": { - "issues": "https://github.com/php-mock/php-mock-integration/issues", - "source": "https://github.com/php-mock/php-mock-integration/tree/master" - }, - "time": "2015-10-26T21:21:42+00:00" - }, - { - "name": "php-mock/php-mock-phpunit", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/php-mock/php-mock-phpunit.git", - "reference": "359e3038c016cee4c8f8db6387bcab3fcdebada0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-mock/php-mock-phpunit/zipball/359e3038c016cee4c8f8db6387bcab3fcdebada0", - "reference": "359e3038c016cee4c8f8db6387bcab3fcdebada0", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "php-mock/php-mock-integration": "^1", - "phpunit/phpunit": "^4.0.0 || ^5.0.0" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "3.2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "phpmock\\phpunit\\": "classes/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "WTFPL" - ], - "authors": [ - { - "name": "Markus Malkusch", - "email": "markus@malkusch.de", - "homepage": "http://markus.malkusch.de", - "role": "Developer" - } - ], - "description": "Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.", - "homepage": "https://github.com/php-mock/php-mock-phpunit", - "keywords": [ - "BDD", - "TDD", - "function", - "mock", - "phpunit", - "stub", - "test", - "test double" - ], - "support": { - "issues": "https://github.com/php-mock/php-mock-phpunit/issues", - "source": "https://github.com/php-mock/php-mock-phpunit/tree/fix-phpunit-fuckup" - }, - "time": "2016-06-15T23:36:13+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" - }, - "time": "2020-09-03T19:13:55+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" - }, - "time": "2020-09-17T18:55:26+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.10.3", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" - }, - "time": "2020-03-05T15:02:03+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "irc": "irc://irc.freenode.net/phpunit", - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/2.2" - }, - "time": "2015-10-06T15:47:00+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "irc": "irc://irc.freenode.net/phpunit", - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5" - }, - "time": "2017-11-27T13:52:08+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" - }, - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/master" - }, - "time": "2017-02-26T11:10:40+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.12", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/1.4" - }, - "abandoned": true, - "time": "2017-12-04T08:55:13+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.36", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/4.8.36" - }, - "time": "2017-06-21T08:07:12+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "support": { - "irc": "irc://irc.freenode.net/phpunit", - "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues", - "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/2.3" - }, - "abandoned": true, - "time": "2015-10-02T06:51:40+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/1.2" - }, - "time": "2017-01-29T09:50:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/1.4" - }, - "time": "2017-05-22T07:24:03+00:00" - }, - { - "name": "sebastian/environment", - "version": "1.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/1.3" - }, - "time": "2016-08-18T05:49:44+00:00" - }, - { - "name": "sebastian/exporter", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/master" - }, - "time": "2016-06-17T09:04:28+00:00" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/1.1.1" - }, - "time": "2015-10-12T03:26:01+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" - }, - "time": "2016-10-03T07:41:43+00:00" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/1.0.6" - }, - "time": "2015-06-21T13:59:46+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "2.9.2", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", - "reference": "2acf168de78487db620ab4bc524135a13cfe6745", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2018-11-07T22:31:41+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/yaml", - "version": "v3.4.47", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "88289caa3c166321883f67fe5130188ebbb47094" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094", - "reference": "88289caa3c166321883f67fe5130188ebbb47094", - "shasum": "" - }, - "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v3.4.47" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-24T10:57:07+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.6", - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*" - }, - "platform-dev": [], - "plugin-api-version": "2.0.0" -} diff --git a/doofinder-for-woocommerce/lib/src/Management/Errors/APITimeout.php b/doofinder-for-woocommerce/lib/src/Management/Errors/APITimeout.php deleted file mode 100644 index d266c554..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/Errors/APITimeout.php +++ /dev/null @@ -1,6 +0,0 @@ -body = $body; - } - - // custom string representation of object - public function __toString() { - return ": [{$this->message}]: {$this->body}\n"; - } - - /** - * Gets the HTTP body of the server response either as Json or string - * - * @return mixed HTTP body of the server response either as \stdClass or string - */ - public function getBody() { - return $this->body; - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/Errors/NotAllowed.php b/doofinder-for-woocommerce/lib/src/Management/Errors/NotAllowed.php deleted file mode 100644 index c071264c..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/Errors/NotAllowed.php +++ /dev/null @@ -1,6 +0,0 @@ -config = Configuration::getDefaultConfiguration(); - $this->client = new Client(); - $this->setHost($host); - $this->setApiKey($token); - - $this->searchEngineClient = new SearchEnginesApi( - $this->client, - $this->config - ); - - $this->ItemsClient = new ItemsApi( - $this->client, - $this->config - ); - - $this->IndicesClient = new IndicesApi( - $this->client, - $this->config - ); - } - - public function getConfig() { - return $this->config; - } - - public function setApiKey($value) { - $this->config->setApiKey('Authorization', $value); - $this->config->setApiKeyPrefix('Authorization', 'Token'); - } - - public function setBearerToken($value) { - $this->config->setApiKey('Authorization', $value); - $this->config->setApiKeyPrefix('Authorization', 'Bearer'); - } - - public function setHost($host) { - $this->config->setHost($host); - } - - /** - * Process all search engine's data sources. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @return \DoofinderManagement\Model\ProcessingTask - */ - public function processSearchEngine($hashid) { - try { - return $this->searchEngineClient->process($hashid); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Gets the status of the process task. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @return \DoofinderManagement\Model\ProcessingTask - */ - public function getProcessStatus($hashid) { - try { - return $this->searchEngineClient->processStatus($hashid); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Create SearchEngine - * - * @param object $body attributes to create a Search Engine. (required) - * - * @return \DoofinderManagement\Model\SearchEngine - */ - public function createSearchEngine($body) { - try { - return $this->searchEngineClient->searchEngineCreate($body); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Get SearchEngine - * - * @param string $hashid Unique id of a search engine. (required) - * - * @return \DoofinderManagement\Model\SearchEngine - */ - public function getSearchEngine($hashid) { - try { - return $this->searchEngineClient->searchEngineShow($hashid); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Delete SearchEngine - * - * @param string $hashid Unique id of a search engine. (required) - */ - public function deleteSearchEngine($hashid) { - try { - $this->searchEngineClient->searchEngineDelete($hashid); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Update SearchEngine - * - * @param object $body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @return \DoofinderManagement\Model\SearchEngine - */ - public function updateSearchEngine($hashid, $body){ - try { - return $this->searchEngineClient->searchEngineUpdate($body, $hashid); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * List SearchEngines - * - * @return \DoofinderManagement\Model\SearchEngines - */ - public function listSearchEngines(){ - try { - return $this->searchEngineClient->searchEngineList(); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Return the status of the current reindexing task. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @return \DoofinderManagement\Model\ReindexingTask - */ - public function returnReindexingStatus($hashid, $name) { - try { - return $this->IndicesClient->getReindexingStatus($hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Creates an Index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param object $body attributes to create an Index. (required) - * @return \DoofinderManagement\Model\Index - */ - public function createIndex($hashid, $body) { - try { - return $this->IndicesClient->indexCreate($body, $hashid); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Deletes an Index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @return void - */ - public function deleteIndex($hashid, $name) { - try { - $this->IndicesClient->indexDelete($hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * List Indices - * - * @param string $hashid Unique id of a search engine. (required) - * @return \DoofinderManagement\Model\Indices - */ - public function listIndices($hashid){ - try { - return $this->IndicesClient->indexIndex($hashid); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Gets an Index - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @return \DoofinderManagement\Model\Index - */ - public function getIndex($hashid, $name) { - try { - return $this->IndicesClient->indexShow($hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Updates Index - * - * @param object $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @return \DoofinderManagement\Model\Index - */ - public function updateIndex($hashid, $name, $body){ - try { - return $this->IndicesClient->indexUpdate($body, $hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Reindex the content of the real index into the temporary one. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @return object - */ - public function reindex($hashid, $name){ - try { - return $this->IndicesClient->reindexToTemp($hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Replace the real index with the temporary one. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @return object - */ - public function replace($hashid, $name){ - try { - return $this->IndicesClient->replaceByTemp($hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Creates a temporary index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @return object - */ - public function createTemporaryIndex($hashid, $name){ - try { - return $this->IndicesClient->temporaryIndexCreate($hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Deletes a temporary index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @return void - */ - public function deleteTemporaryIndex($hashid, $name){ - try { - return $this->IndicesClient->temporaryIndexDelete($hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Creates an item. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param map[string,object] $body body (required) - * - * @return \DoofinderManagement\Model\Item - */ - public function createItem($hashid, $name, $body) { - try { - return $this->ItemsClient->itemCreate($body, $hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Deletes an item from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * @param string $name Name of an index. (required) - * - * @return void - */ - public function deleteItem($hashid, $item_id, $name) { - try { - return $this->ItemsClient->itemDelete($hashid, $name, $item_id); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Scrolls through all index items - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $scroll_id Unique identifier for the scroll. The scroll saves a "pointer" to the last fetched page so each successive request to the same scroll_id return a new page. (optional) - * @param int $rpp _Results per page_. How many items are fetched per page/request. (optional) - - * - * @return \DoofinderManagement\Model\Scroller - */ - public function scrollsItems($hashid, $name, $scroll_id = null, $rpp = null) { - try { - return $this->ItemsClient->itemIndex($hashid, $name, $scroll_id, $rpp); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Gets an item from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * @param string $name Name of an index. (required) - * - * @return \DoofinderManagement\Model\Item - */ - public function getItem($hashid, $item_id, $name) { - try { - return $this->ItemsClient->itemShow($hashid, $name, $item_id); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Creates an item in the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param map[string,object] $body body (required) - * - * @return \DoofinderManagement\Model\Item - */ - public function createTempItem($hashid, $name, $body) { - try { - return $this->ItemsClient->itemTempCreate($body, $hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Deletes an item in the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * @param string $name Name of an index. (required) - * - * @return void - */ - public function deleteTempItem($hashid, $item_id, $name) { - try { - return $this->ItemsClient->itemTempDelete($hashid, $name, $item_id); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Gets an item from the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * @param string $name Name of an index. (required) - * - * @return \DoofinderManagement\Model\Item - */ - public function getTempItem($hashid, $item_id, $name) { - try { - return $this->ItemsClient->itemTempShow($hashid, $name, $item_id); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Partially updates an item in the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * @param string $name Name of an index. (required) - * @param map[string,object] $body body (required) - * - * @return \DoofinderManagement\Model\Item - */ - public function updateTempItem($hashid, $item_id, $name, $body) { - try { - return $this->ItemsClient->itemTempUpdate($body, $hashid, $name, $item_id); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Updates an item in the index. - * - * We call itemCreate instead of itemUpdate because itemUpdate uses PATCH - * method what causes an issue when the special_price is being removed. - * The sale_price property never gets removed. - * - * Using POST instead, removes this issue, as it completely updates the item. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * @param string $name Name of an index. (required) - * @param map[string,object] $body body (required) - * - * @return \DoofinderManagement\Model\Item - */ - public function updateItem($hashid, $item_id, $name, $body) { - try { - return $this->ItemsClient->itemCreate($body, $hashid, $name, $item_id); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Creates a bulk of item in the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body body (required) - * - * @return \DoofinderManagement\Model\BulkResult - */ - public function createBulk($hashid, $name, $body) { - try { - return $this->ItemsClient->itemsBulkCreate($body, $hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Deletes a bulk of items from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param \DoofinderManagement\Model\Item[] $body body (required) - * - * @return \DoofinderManagement\Model\BulkResult - */ - public function deleteBulk($hashid, $name, $body) { - try { - return $this->ItemsClient->itemsBulkDelete($body, $hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Partial updates a bulk of items in the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param \DoofinderManagement\Model\Item[] $body body (required) - * - * @return \DoofinderManagement\Model\BulkResult - */ - public function updateBulk($hashid, $name, $body) { - try { - return $this->ItemsClient->itemsBulkUpdate($body, $hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Creates a bulk of items in the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param \DoofinderManagement\Model\Item[] $body body (required) - * - * @return \DoofinderManagement\Model\BulkResult - */ - public function createTempBulk($hashid, $name, $body) { - try { - return $this->ItemsClient->itemsTempBulkCreate($body, $hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Deletes items in bulk in the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body body (required) - * - * @return \DoofinderManagement\Model\BulkResult - */ - public function deleteTempBulk($hashid, $name, $body) { - try { - return $this->ItemsClient->itemsTempBulkDelete($body, $hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - - /** - * Partial updates a bulk of items in the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param \DoofinderManagement\Model\Item[] $body body (required) - * - * @return \DoofinderManagement\Model\BulkResult - */ - public function updateTempBulk($hashid, $name, $body) { - try { - return $this->ItemsClient->itemsTempBulkUpdate($body, $hashid, $name); - } catch (ApiException $e) { - $statusCode = $e->getCode(); - $contentResponse = $e->getResponseBody(); - $error = Utils::handleErrors($statusCode, $contentResponse, $e); - - throw $error; - } - } - } - diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/IndicesApi.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/IndicesApi.php deleted file mode 100644 index 0263da01..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/IndicesApi.php +++ /dev/null @@ -1,2933 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation getReindexingStatus - * - * Return the status of the current reindexing task. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\ReindexingTask - */ - public function getReindexingStatus($hashid, $name) - { - list($response) = $this->getReindexingStatusWithHttpInfo($hashid, $name); - return $response; - } - - /** - * Operation getReindexingStatusWithHttpInfo - * - * Return the status of the current reindexing task. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\ReindexingTask, HTTP status code, HTTP response headers (array of strings) - */ - public function getReindexingStatusWithHttpInfo($hashid, $name) - { - $returnType = '\DoofinderManagement\Model\ReindexingTask'; - $request = $this->getReindexingStatusRequest($hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\ReindexingTask', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getReindexingStatusAsync - * - * Return the status of the current reindexing task. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function getReindexingStatusAsync($hashid, $name) - { - return $this->getReindexingStatusAsyncWithHttpInfo($hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getReindexingStatusAsyncWithHttpInfo - * - * Return the status of the current reindexing task. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function getReindexingStatusAsyncWithHttpInfo($hashid, $name) - { - $returnType = '\DoofinderManagement\Model\ReindexingTask'; - $request = $this->getReindexingStatusRequest($hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getReindexingStatus' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function getReindexingStatusRequest($hashid, $name) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling getReindexingStatus' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling getReindexingStatus' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/_reindex_to_temp/'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation indexCreate - * - * Creates an index. - * - * @param \DoofinderManagement\Model\Index $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Index - */ - public function indexCreate($body, $hashid) - { - list($response) = $this->indexCreateWithHttpInfo($body, $hashid); - return $response; - } - - /** - * Operation indexCreateWithHttpInfo - * - * Creates an index. - * - * @param \DoofinderManagement\Model\Index $body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Index, HTTP status code, HTTP response headers (array of strings) - */ - public function indexCreateWithHttpInfo($body, $hashid) - { - $returnType = '\DoofinderManagement\Model\Index'; - $request = $this->indexCreateRequest($body, $hashid); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Index', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation indexCreateAsync - * - * Creates an index. - * - * @param \DoofinderManagement\Model\Index $body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function indexCreateAsync($body, $hashid) - { - return $this->indexCreateAsyncWithHttpInfo($body, $hashid) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation indexCreateAsyncWithHttpInfo - * - * Creates an index. - * - * @param \DoofinderManagement\Model\Index $body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function indexCreateAsyncWithHttpInfo($body, $hashid) - { - $returnType = '\DoofinderManagement\Model\Index'; - $request = $this->indexCreateRequest($body, $hashid); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'indexCreate' - * - * @param \DoofinderManagement\Model\Index $body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function indexCreateRequest($body, $hashid) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling indexCreate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling indexCreate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation indexDelete - * - * Deletes an Index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function indexDelete($hashid, $name) - { - $this->indexDeleteWithHttpInfo($hashid, $name); - } - - /** - * Operation indexDeleteWithHttpInfo - * - * Deletes an Index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function indexDeleteWithHttpInfo($hashid, $name) - { - $returnType = ''; - $request = $this->indexDeleteRequest($hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation indexDeleteAsync - * - * Deletes an Index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function indexDeleteAsync($hashid, $name) - { - return $this->indexDeleteAsyncWithHttpInfo($hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation indexDeleteAsyncWithHttpInfo - * - * Deletes an Index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function indexDeleteAsyncWithHttpInfo($hashid, $name) - { - $returnType = ''; - $request = $this->indexDeleteRequest($hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'indexDelete' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function indexDeleteRequest($hashid, $name) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling indexDelete' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling indexDelete' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation indexIndex - * - * Lists all indices. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Indices - */ - public function indexIndex($hashid) - { - list($response) = $this->indexIndexWithHttpInfo($hashid); - return $response; - } - - /** - * Operation indexIndexWithHttpInfo - * - * Lists all indices. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Indices, HTTP status code, HTTP response headers (array of strings) - */ - public function indexIndexWithHttpInfo($hashid) - { - $returnType = '\DoofinderManagement\Model\Indices'; - $request = $this->indexIndexRequest($hashid); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Indices', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation indexIndexAsync - * - * Lists all indices. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function indexIndexAsync($hashid) - { - return $this->indexIndexAsyncWithHttpInfo($hashid) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation indexIndexAsyncWithHttpInfo - * - * Lists all indices. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function indexIndexAsyncWithHttpInfo($hashid) - { - $returnType = '\DoofinderManagement\Model\Indices'; - $request = $this->indexIndexRequest($hashid); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'indexIndex' - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function indexIndexRequest($hashid) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling indexIndex' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation indexShow - * - * Gets an Index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Index - */ - public function indexShow($hashid, $name) - { - list($response) = $this->indexShowWithHttpInfo($hashid, $name); - return $response; - } - - /** - * Operation indexShowWithHttpInfo - * - * Gets an Index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Index, HTTP status code, HTTP response headers (array of strings) - */ - public function indexShowWithHttpInfo($hashid, $name) - { - $returnType = '\DoofinderManagement\Model\Index'; - $request = $this->indexShowRequest($hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Index', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation indexShowAsync - * - * Gets an Index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function indexShowAsync($hashid, $name) - { - return $this->indexShowAsyncWithHttpInfo($hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation indexShowAsyncWithHttpInfo - * - * Gets an Index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function indexShowAsyncWithHttpInfo($hashid, $name) - { - $returnType = '\DoofinderManagement\Model\Index'; - $request = $this->indexShowRequest($hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'indexShow' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function indexShowRequest($hashid, $name) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling indexShow' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling indexShow' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation indexUpdate - * - * Updates an index. - * - * @param \DoofinderManagement\Model\IndexUpdate $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Index - */ - public function indexUpdate($body, $hashid, $name) - { - list($response) = $this->indexUpdateWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation indexUpdateWithHttpInfo - * - * Updates an index. - * - * @param \DoofinderManagement\Model\IndexUpdate $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Index, HTTP status code, HTTP response headers (array of strings) - */ - public function indexUpdateWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\Index'; - $request = $this->indexUpdateRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Index', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation indexUpdateAsync - * - * Updates an index. - * - * @param \DoofinderManagement\Model\IndexUpdate $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function indexUpdateAsync($body, $hashid, $name) - { - return $this->indexUpdateAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation indexUpdateAsyncWithHttpInfo - * - * Updates an index. - * - * @param \DoofinderManagement\Model\IndexUpdate $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function indexUpdateAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\Index'; - $request = $this->indexUpdateRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'indexUpdate' - * - * @param \DoofinderManagement\Model\IndexUpdate $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function indexUpdateRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling indexUpdate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling indexUpdate' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling indexUpdate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation reindexToTemp - * - * Reindex the content of the real index into the temporary one. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - */ - public function reindexToTemp($hashid, $name) - { - list($response) = $this->reindexToTempWithHttpInfo($hashid, $name); - return $response; - } - - /** - * Operation reindexToTempWithHttpInfo - * - * Reindex the content of the real index into the temporary one. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - */ - public function reindexToTempWithHttpInfo($hashid, $name) - { - $returnType = 'object'; - $request = $this->reindexToTempRequest($hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation reindexToTempAsync - * - * Reindex the content of the real index into the temporary one. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function reindexToTempAsync($hashid, $name) - { - return $this->reindexToTempAsyncWithHttpInfo($hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation reindexToTempAsyncWithHttpInfo - * - * Reindex the content of the real index into the temporary one. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function reindexToTempAsyncWithHttpInfo($hashid, $name) - { - $returnType = 'object'; - $request = $this->reindexToTempRequest($hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'reindexToTemp' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function reindexToTempRequest($hashid, $name) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling reindexToTemp' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling reindexToTemp' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/_reindex_to_temp/'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation replaceByTemp - * - * Replace the real index with the temporary one. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - */ - public function replaceByTemp($hashid, $name) - { - list($response) = $this->replaceByTempWithHttpInfo($hashid, $name); - return $response; - } - - /** - * Operation replaceByTempWithHttpInfo - * - * Replace the real index with the temporary one. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - */ - public function replaceByTempWithHttpInfo($hashid, $name) - { - $returnType = 'object'; - $request = $this->replaceByTempRequest($hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation replaceByTempAsync - * - * Replace the real index with the temporary one. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function replaceByTempAsync($hashid, $name) - { - return $this->replaceByTempAsyncWithHttpInfo($hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation replaceByTempAsyncWithHttpInfo - * - * Replace the real index with the temporary one. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function replaceByTempAsyncWithHttpInfo($hashid, $name) - { - $returnType = 'object'; - $request = $this->replaceByTempRequest($hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'replaceByTemp' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function replaceByTempRequest($hashid, $name) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling replaceByTemp' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling replaceByTemp' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/_replace_by_temp/'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation temporaryIndexCreate - * - * Creates a temporary index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - */ - public function temporaryIndexCreate($hashid, $name) - { - list($response) = $this->temporaryIndexCreateWithHttpInfo($hashid, $name); - return $response; - } - - /** - * Operation temporaryIndexCreateWithHttpInfo - * - * Creates a temporary index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - */ - public function temporaryIndexCreateWithHttpInfo($hashid, $name) - { - $returnType = 'object'; - $request = $this->temporaryIndexCreateRequest($hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation temporaryIndexCreateAsync - * - * Creates a temporary index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function temporaryIndexCreateAsync($hashid, $name) - { - return $this->temporaryIndexCreateAsyncWithHttpInfo($hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation temporaryIndexCreateAsyncWithHttpInfo - * - * Creates a temporary index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function temporaryIndexCreateAsyncWithHttpInfo($hashid, $name) - { - $returnType = 'object'; - $request = $this->temporaryIndexCreateRequest($hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'temporaryIndexCreate' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function temporaryIndexCreateRequest($hashid, $name) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling temporaryIndexCreate' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling temporaryIndexCreate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/temp/'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation temporaryIndexDelete - * - * Deletes the temporary index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function temporaryIndexDelete($hashid, $name) - { - $this->temporaryIndexDeleteWithHttpInfo($hashid, $name); - } - - /** - * Operation temporaryIndexDeleteWithHttpInfo - * - * Deletes the temporary index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function temporaryIndexDeleteWithHttpInfo($hashid, $name) - { - $returnType = ''; - $request = $this->temporaryIndexDeleteRequest($hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation temporaryIndexDeleteAsync - * - * Deletes the temporary index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function temporaryIndexDeleteAsync($hashid, $name) - { - return $this->temporaryIndexDeleteAsyncWithHttpInfo($hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation temporaryIndexDeleteAsyncWithHttpInfo - * - * Deletes the temporary index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function temporaryIndexDeleteAsyncWithHttpInfo($hashid, $name) - { - $returnType = ''; - $request = $this->temporaryIndexDeleteRequest($hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'temporaryIndexDelete' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function temporaryIndexDeleteRequest($hashid, $name) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling temporaryIndexDelete' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling temporaryIndexDelete' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/temp/'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/ItemsApi.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/ItemsApi.php deleted file mode 100644 index 63c69a6c..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/ItemsApi.php +++ /dev/null @@ -1,5280 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation itemCreate - * - * Creates an item. - * - * @param map[string,object] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Item - */ - public function itemCreate($body, $hashid, $name) - { - list($response) = $this->itemCreateWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation itemCreateWithHttpInfo - * - * Creates an item. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Item, HTTP status code, HTTP response headers (array of strings) - */ - public function itemCreateWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemCreateRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Item', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemCreateAsync - * - * Creates an item. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemCreateAsync($body, $hashid, $name) - { - return $this->itemCreateAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemCreateAsyncWithHttpInfo - * - * Creates an item. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemCreateAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemCreateRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemCreate' - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemCreateRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemCreate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemCreate' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemCreate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/items/'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemDelete - * - * Deletes an item from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function itemDelete($hashid, $name, $item_id) - { - $this->itemDeleteWithHttpInfo($hashid, $name, $item_id); - } - - /** - * Operation itemDeleteWithHttpInfo - * - * Deletes an item from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function itemDeleteWithHttpInfo($hashid, $name, $item_id) - { - $returnType = ''; - $request = $this->itemDeleteRequest($hashid, $name, $item_id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation itemDeleteAsync - * - * Deletes an item from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemDeleteAsync($hashid, $name, $item_id) - { - return $this->itemDeleteAsyncWithHttpInfo($hashid, $name, $item_id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemDeleteAsyncWithHttpInfo - * - * Deletes an item from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemDeleteAsyncWithHttpInfo($hashid, $name, $item_id) - { - $returnType = ''; - $request = $this->itemDeleteRequest($hashid, $name, $item_id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemDelete' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemDeleteRequest($hashid, $name, $item_id) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemDelete' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemDelete' - ); - } - // verify the required parameter 'item_id' is set - if ($item_id === null || (is_array($item_id) && count($item_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $item_id when calling itemDelete' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/items/{item_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - // path params - if ($item_id !== null) { - $resourcePath = str_replace( - '{' . 'item_id' . '}', - ObjectSerializer::toPathValue($item_id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemIndex - * - * Scrolls through all index items - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $scroll_id Unique identifier for the scroll. The scroll saves a \"pointer\" to the last fetched page so each successive request to the same scroll_id return a new page. (optional) - * @param int $rpp _Results per page_. How many items are fetched per page/request. (optional) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Scroller - */ - public function itemIndex($hashid, $name, $scroll_id = null, $rpp = null) - { - list($response) = $this->itemIndexWithHttpInfo($hashid, $name, $scroll_id, $rpp); - return $response; - } - - /** - * Operation itemIndexWithHttpInfo - * - * Scrolls through all index items - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $scroll_id Unique identifier for the scroll. The scroll saves a \"pointer\" to the last fetched page so each successive request to the same scroll_id return a new page. (optional) - * @param int $rpp _Results per page_. How many items are fetched per page/request. (optional) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Scroller, HTTP status code, HTTP response headers (array of strings) - */ - public function itemIndexWithHttpInfo($hashid, $name, $scroll_id = null, $rpp = null) - { - $returnType = '\DoofinderManagement\Model\Scroller'; - $request = $this->itemIndexRequest($hashid, $name, $scroll_id, $rpp); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Scroller', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemIndexAsync - * - * Scrolls through all index items - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $scroll_id Unique identifier for the scroll. The scroll saves a \"pointer\" to the last fetched page so each successive request to the same scroll_id return a new page. (optional) - * @param int $rpp _Results per page_. How many items are fetched per page/request. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemIndexAsync($hashid, $name, $scroll_id = null, $rpp = null) - { - return $this->itemIndexAsyncWithHttpInfo($hashid, $name, $scroll_id, $rpp) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemIndexAsyncWithHttpInfo - * - * Scrolls through all index items - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $scroll_id Unique identifier for the scroll. The scroll saves a \"pointer\" to the last fetched page so each successive request to the same scroll_id return a new page. (optional) - * @param int $rpp _Results per page_. How many items are fetched per page/request. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemIndexAsyncWithHttpInfo($hashid, $name, $scroll_id = null, $rpp = null) - { - $returnType = '\DoofinderManagement\Model\Scroller'; - $request = $this->itemIndexRequest($hashid, $name, $scroll_id, $rpp); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemIndex' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $scroll_id Unique identifier for the scroll. The scroll saves a \"pointer\" to the last fetched page so each successive request to the same scroll_id return a new page. (optional) - * @param int $rpp _Results per page_. How many items are fetched per page/request. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemIndexRequest($hashid, $name, $scroll_id = null, $rpp = null) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemIndex' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemIndex' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/items/'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($scroll_id !== null) { - $queryParams['scroll_id'] = ObjectSerializer::toQueryValue($scroll_id); - } - // query params - if ($rpp !== null) { - $queryParams['rpp'] = ObjectSerializer::toQueryValue($rpp); - } - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemShow - * - * Gets an item from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Item - */ - public function itemShow($hashid, $name, $item_id) - { - list($response) = $this->itemShowWithHttpInfo($hashid, $name, $item_id); - return $response; - } - - /** - * Operation itemShowWithHttpInfo - * - * Gets an item from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Item, HTTP status code, HTTP response headers (array of strings) - */ - public function itemShowWithHttpInfo($hashid, $name, $item_id) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemShowRequest($hashid, $name, $item_id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Item', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemShowAsync - * - * Gets an item from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemShowAsync($hashid, $name, $item_id) - { - return $this->itemShowAsyncWithHttpInfo($hashid, $name, $item_id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemShowAsyncWithHttpInfo - * - * Gets an item from the index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemShowAsyncWithHttpInfo($hashid, $name, $item_id) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemShowRequest($hashid, $name, $item_id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemShow' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemShowRequest($hashid, $name, $item_id) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemShow' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemShow' - ); - } - // verify the required parameter 'item_id' is set - if ($item_id === null || (is_array($item_id) && count($item_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $item_id when calling itemShow' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/items/{item_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - // path params - if ($item_id !== null) { - $resourcePath = str_replace( - '{' . 'item_id' . '}', - ObjectSerializer::toPathValue($item_id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemTempCreate - * - * Creates an item in the temporal index. - * - * @param map[string,object] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Item - */ - public function itemTempCreate($body, $hashid, $name) - { - list($response) = $this->itemTempCreateWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation itemTempCreateWithHttpInfo - * - * Creates an item in the temporal index. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Item, HTTP status code, HTTP response headers (array of strings) - */ - public function itemTempCreateWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemTempCreateRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Item', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemTempCreateAsync - * - * Creates an item in the temporal index. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemTempCreateAsync($body, $hashid, $name) - { - return $this->itemTempCreateAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemTempCreateAsyncWithHttpInfo - * - * Creates an item in the temporal index. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemTempCreateAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemTempCreateRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemTempCreate' - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemTempCreateRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemTempCreate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemTempCreate' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemTempCreate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/temp/items/'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemTempDelete - * - * Deletes an item in the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function itemTempDelete($hashid, $name, $item_id) - { - $this->itemTempDeleteWithHttpInfo($hashid, $name, $item_id); - } - - /** - * Operation itemTempDeleteWithHttpInfo - * - * Deletes an item in the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function itemTempDeleteWithHttpInfo($hashid, $name, $item_id) - { - $returnType = ''; - $request = $this->itemTempDeleteRequest($hashid, $name, $item_id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation itemTempDeleteAsync - * - * Deletes an item in the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemTempDeleteAsync($hashid, $name, $item_id) - { - return $this->itemTempDeleteAsyncWithHttpInfo($hashid, $name, $item_id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemTempDeleteAsyncWithHttpInfo - * - * Deletes an item in the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemTempDeleteAsyncWithHttpInfo($hashid, $name, $item_id) - { - $returnType = ''; - $request = $this->itemTempDeleteRequest($hashid, $name, $item_id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemTempDelete' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemTempDeleteRequest($hashid, $name, $item_id) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemTempDelete' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemTempDelete' - ); - } - // verify the required parameter 'item_id' is set - if ($item_id === null || (is_array($item_id) && count($item_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $item_id when calling itemTempDelete' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/temp/items/{item_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - // path params - if ($item_id !== null) { - $resourcePath = str_replace( - '{' . 'item_id' . '}', - ObjectSerializer::toPathValue($item_id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemTempShow - * - * Gets an item from the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Item - */ - public function itemTempShow($hashid, $name, $item_id) - { - list($response) = $this->itemTempShowWithHttpInfo($hashid, $name, $item_id); - return $response; - } - - /** - * Operation itemTempShowWithHttpInfo - * - * Gets an item from the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Item, HTTP status code, HTTP response headers (array of strings) - */ - public function itemTempShowWithHttpInfo($hashid, $name, $item_id) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemTempShowRequest($hashid, $name, $item_id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Item', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemTempShowAsync - * - * Gets an item from the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemTempShowAsync($hashid, $name, $item_id) - { - return $this->itemTempShowAsyncWithHttpInfo($hashid, $name, $item_id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemTempShowAsyncWithHttpInfo - * - * Gets an item from the temporal index. - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemTempShowAsyncWithHttpInfo($hashid, $name, $item_id) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemTempShowRequest($hashid, $name, $item_id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemTempShow' - * - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemTempShowRequest($hashid, $name, $item_id) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemTempShow' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemTempShow' - ); - } - // verify the required parameter 'item_id' is set - if ($item_id === null || (is_array($item_id) && count($item_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $item_id when calling itemTempShow' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/temp/items/{item_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - // path params - if ($item_id !== null) { - $resourcePath = str_replace( - '{' . 'item_id' . '}', - ObjectSerializer::toPathValue($item_id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemTempUpdate - * - * Partially updates an item in the temporal index. - * - * @param map[string,object] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Item - */ - public function itemTempUpdate($body, $hashid, $name, $item_id) - { - list($response) = $this->itemTempUpdateWithHttpInfo($body, $hashid, $name, $item_id); - return $response; - } - - /** - * Operation itemTempUpdateWithHttpInfo - * - * Partially updates an item in the temporal index. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Item, HTTP status code, HTTP response headers (array of strings) - */ - public function itemTempUpdateWithHttpInfo($body, $hashid, $name, $item_id) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemTempUpdateRequest($body, $hashid, $name, $item_id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Item', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemTempUpdateAsync - * - * Partially updates an item in the temporal index. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemTempUpdateAsync($body, $hashid, $name, $item_id) - { - return $this->itemTempUpdateAsyncWithHttpInfo($body, $hashid, $name, $item_id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemTempUpdateAsyncWithHttpInfo - * - * Partially updates an item in the temporal index. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemTempUpdateAsyncWithHttpInfo($body, $hashid, $name, $item_id) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemTempUpdateRequest($body, $hashid, $name, $item_id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemTempUpdate' - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemTempUpdateRequest($body, $hashid, $name, $item_id) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemTempUpdate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemTempUpdate' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemTempUpdate' - ); - } - // verify the required parameter 'item_id' is set - if ($item_id === null || (is_array($item_id) && count($item_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $item_id when calling itemTempUpdate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/temp/items/{item_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - // path params - if ($item_id !== null) { - $resourcePath = str_replace( - '{' . 'item_id' . '}', - ObjectSerializer::toPathValue($item_id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemUpdate - * - * Partially updates an item in the index. - * - * @param map[string,object] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\Item - */ - public function itemUpdate($body, $hashid, $name, $item_id) - { - list($response) = $this->itemUpdateWithHttpInfo($body, $hashid, $name, $item_id); - return $response; - } - - /** - * Operation itemUpdateWithHttpInfo - * - * Partially updates an item in the index. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\Item, HTTP status code, HTTP response headers (array of strings) - */ - public function itemUpdateWithHttpInfo($body, $hashid, $name, $item_id) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemUpdateRequest($body, $hashid, $name, $item_id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\Item', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemUpdateAsync - * - * Partially updates an item in the index. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemUpdateAsync($body, $hashid, $name, $item_id) - { - return $this->itemUpdateAsyncWithHttpInfo($body, $hashid, $name, $item_id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemUpdateAsyncWithHttpInfo - * - * Partially updates an item in the index. - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemUpdateAsyncWithHttpInfo($body, $hashid, $name, $item_id) - { - $returnType = '\DoofinderManagement\Model\Item'; - $request = $this->itemUpdateRequest($body, $hashid, $name, $item_id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemUpdate' - * - * @param map[string,object] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * @param string $item_id Unique identifier of an item inside an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemUpdateRequest($body, $hashid, $name, $item_id) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemUpdate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemUpdate' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemUpdate' - ); - } - // verify the required parameter 'item_id' is set - if ($item_id === null || (is_array($item_id) && count($item_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $item_id when calling itemUpdate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/items/{item_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - // path params - if ($item_id !== null) { - $resourcePath = str_replace( - '{' . 'item_id' . '}', - ObjectSerializer::toPathValue($item_id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemsBulkCreate - * - * Creates a bulk of item in the index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\BulkResult - */ - public function itemsBulkCreate($body, $hashid, $name) - { - list($response) = $this->itemsBulkCreateWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation itemsBulkCreateWithHttpInfo - * - * Creates a bulk of item in the index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\BulkResult, HTTP status code, HTTP response headers (array of strings) - */ - public function itemsBulkCreateWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsBulkCreateRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\BulkResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemsBulkCreateAsync - * - * Creates a bulk of item in the index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsBulkCreateAsync($body, $hashid, $name) - { - return $this->itemsBulkCreateAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemsBulkCreateAsyncWithHttpInfo - * - * Creates a bulk of item in the index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsBulkCreateAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsBulkCreateRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemsBulkCreate' - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemsBulkCreateRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemsBulkCreate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemsBulkCreate' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemsBulkCreate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/items/_bulk'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemsBulkDelete - * - * Deletes a bulk of items from the index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\BulkResult - */ - public function itemsBulkDelete($body, $hashid, $name) - { - list($response) = $this->itemsBulkDeleteWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation itemsBulkDeleteWithHttpInfo - * - * Deletes a bulk of items from the index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\BulkResult, HTTP status code, HTTP response headers (array of strings) - */ - public function itemsBulkDeleteWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsBulkDeleteRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\BulkResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemsBulkDeleteAsync - * - * Deletes a bulk of items from the index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsBulkDeleteAsync($body, $hashid, $name) - { - return $this->itemsBulkDeleteAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemsBulkDeleteAsyncWithHttpInfo - * - * Deletes a bulk of items from the index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsBulkDeleteAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsBulkDeleteRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemsBulkDelete' - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemsBulkDeleteRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemsBulkDelete' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemsBulkDelete' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemsBulkDelete' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/items/_bulk'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemsBulkUpdate - * - * Partial updates a bulk of items in the index. - * - * @param \DoofinderManagement\Model\Item[] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\BulkResult - */ - public function itemsBulkUpdate($body, $hashid, $name) - { - list($response) = $this->itemsBulkUpdateWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation itemsBulkUpdateWithHttpInfo - * - * Partial updates a bulk of items in the index. - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\BulkResult, HTTP status code, HTTP response headers (array of strings) - */ - public function itemsBulkUpdateWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsBulkUpdateRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\BulkResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemsBulkUpdateAsync - * - * Partial updates a bulk of items in the index. - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsBulkUpdateAsync($body, $hashid, $name) - { - return $this->itemsBulkUpdateAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemsBulkUpdateAsyncWithHttpInfo - * - * Partial updates a bulk of items in the index. - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsBulkUpdateAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsBulkUpdateRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemsBulkUpdate' - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemsBulkUpdateRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemsBulkUpdate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemsBulkUpdate' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemsBulkUpdate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/items/_bulk'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemsMget - * - * Retrieves a list of items. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\MGETResponse - */ - public function itemsMget($body, $hashid, $name) - { - list($response) = $this->itemsMgetWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation itemsMgetWithHttpInfo - * - * Retrieves a list of items. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\MGETResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function itemsMgetWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\MGETResponse'; - $request = $this->itemsMgetRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\MGETResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemsMgetAsync - * - * Retrieves a list of items. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsMgetAsync($body, $hashid, $name) - { - return $this->itemsMgetAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemsMgetAsyncWithHttpInfo - * - * Retrieves a list of items. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsMgetAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\MGETResponse'; - $request = $this->itemsMgetRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemsMget' - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemsMgetRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemsMget' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemsMget' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemsMget' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/items/_mget'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemsTempBulkCreate - * - * Creates a bulk of items in the temporal index. - * - * @param \DoofinderManagement\Model\Item[] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\BulkResult - */ - public function itemsTempBulkCreate($body, $hashid, $name) - { - list($response) = $this->itemsTempBulkCreateWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation itemsTempBulkCreateWithHttpInfo - * - * Creates a bulk of items in the temporal index. - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\BulkResult, HTTP status code, HTTP response headers (array of strings) - */ - public function itemsTempBulkCreateWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsTempBulkCreateRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\BulkResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemsTempBulkCreateAsync - * - * Creates a bulk of items in the temporal index. - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsTempBulkCreateAsync($body, $hashid, $name) - { - return $this->itemsTempBulkCreateAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemsTempBulkCreateAsyncWithHttpInfo - * - * Creates a bulk of items in the temporal index. - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsTempBulkCreateAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsTempBulkCreateRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemsTempBulkCreate' - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemsTempBulkCreateRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemsTempBulkCreate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemsTempBulkCreate' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemsTempBulkCreate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/temp/items/_bulk'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemsTempBulkDelete - * - * Deletes items in bulk in the temporal index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\BulkResult - */ - public function itemsTempBulkDelete($body, $hashid, $name) - { - list($response) = $this->itemsTempBulkDeleteWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation itemsTempBulkDeleteWithHttpInfo - * - * Deletes items in bulk in the temporal index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\BulkResult, HTTP status code, HTTP response headers (array of strings) - */ - public function itemsTempBulkDeleteWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsTempBulkDeleteRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\BulkResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemsTempBulkDeleteAsync - * - * Deletes items in bulk in the temporal index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsTempBulkDeleteAsync($body, $hashid, $name) - { - return $this->itemsTempBulkDeleteAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemsTempBulkDeleteAsyncWithHttpInfo - * - * Deletes items in bulk in the temporal index. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsTempBulkDeleteAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsTempBulkDeleteRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemsTempBulkDelete' - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemsTempBulkDeleteRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemsTempBulkDelete' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemsTempBulkDelete' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemsTempBulkDelete' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/temp/items/_bulk'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemsTempBulkUpdate - * - * Partial updates a bulk of items in the temporal index. - * - * @param \DoofinderManagement\Model\Item[] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\BulkResult - */ - public function itemsTempBulkUpdate($body, $hashid, $name) - { - list($response) = $this->itemsTempBulkUpdateWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation itemsTempBulkUpdateWithHttpInfo - * - * Partial updates a bulk of items in the temporal index. - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\BulkResult, HTTP status code, HTTP response headers (array of strings) - */ - public function itemsTempBulkUpdateWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsTempBulkUpdateRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\BulkResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemsTempBulkUpdateAsync - * - * Partial updates a bulk of items in the temporal index. - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsTempBulkUpdateAsync($body, $hashid, $name) - { - return $this->itemsTempBulkUpdateAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemsTempBulkUpdateAsyncWithHttpInfo - * - * Partial updates a bulk of items in the temporal index. - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsTempBulkUpdateAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\BulkResult'; - $request = $this->itemsTempBulkUpdateRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemsTempBulkUpdate' - * - * @param \DoofinderManagement\Model\Item[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemsTempBulkUpdateRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemsTempBulkUpdate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemsTempBulkUpdate' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemsTempBulkUpdate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/temp/items/_bulk'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation itemsTempMget - * - * Retrieves a list of items. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\MGETResponse - */ - public function itemsTempMget($body, $hashid, $name) - { - list($response) = $this->itemsTempMgetWithHttpInfo($body, $hashid, $name); - return $response; - } - - /** - * Operation itemsTempMgetWithHttpInfo - * - * Retrieves a list of items. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\MGETResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function itemsTempMgetWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\MGETResponse'; - $request = $this->itemsTempMgetRequest($body, $hashid, $name); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\MGETResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation itemsTempMgetAsync - * - * Retrieves a list of items. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsTempMgetAsync($body, $hashid, $name) - { - return $this->itemsTempMgetAsyncWithHttpInfo($body, $hashid, $name) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation itemsTempMgetAsyncWithHttpInfo - * - * Retrieves a list of items. - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function itemsTempMgetAsyncWithHttpInfo($body, $hashid, $name) - { - $returnType = '\DoofinderManagement\Model\MGETResponse'; - $request = $this->itemsTempMgetRequest($body, $hashid, $name); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'itemsTempMget' - * - * @param \DoofinderManagement\Model\ItemsIdsInner[] $body (required) - * @param string $hashid Unique id of a search engine. (required) - * @param string $name Name of an index. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function itemsTempMgetRequest($body, $hashid, $name) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling itemsTempMget' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling itemsTempMget' - ); - } - // verify the required parameter 'name' is set - if ($name === null || (is_array($name) && count($name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $name when calling itemsTempMget' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/indices/{name}/temp/items/_mget'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - // path params - if ($name !== null) { - $resourcePath = str_replace( - '{' . 'name' . '}', - ObjectSerializer::toPathValue($name), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/SearchEnginesApi.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/SearchEnginesApi.php deleted file mode 100644 index 675f82b3..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/SearchEnginesApi.php +++ /dev/null @@ -1,1964 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation process - * - * Process all search engine's data sources. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\ProcessingTask - */ - public function process($hashid) - { - list($response) = $this->processWithHttpInfo($hashid); - return $response; - } - - /** - * Operation processWithHttpInfo - * - * Process all search engine's data sources. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\ProcessingTask, HTTP status code, HTTP response headers (array of strings) - */ - public function processWithHttpInfo($hashid) - { - $returnType = '\DoofinderManagement\Model\ProcessingTask'; - $request = $this->processRequest($hashid); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\ProcessingTask', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation processAsync - * - * Process all search engine's data sources. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function processAsync($hashid) - { - return $this->processAsyncWithHttpInfo($hashid) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation processAsyncWithHttpInfo - * - * Process all search engine's data sources. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function processAsyncWithHttpInfo($hashid) - { - $returnType = '\DoofinderManagement\Model\ProcessingTask'; - $request = $this->processRequest($hashid); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'process' - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function processRequest($hashid) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling process' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/_process'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation processStatus - * - * Gets the status of the process task. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\ProcessingTask - */ - public function processStatus($hashid) - { - list($response) = $this->processStatusWithHttpInfo($hashid); - return $response; - } - - /** - * Operation processStatusWithHttpInfo - * - * Gets the status of the process task. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\ProcessingTask, HTTP status code, HTTP response headers (array of strings) - */ - public function processStatusWithHttpInfo($hashid) - { - $returnType = '\DoofinderManagement\Model\ProcessingTask'; - $request = $this->processStatusRequest($hashid); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\ProcessingTask', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation processStatusAsync - * - * Gets the status of the process task. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function processStatusAsync($hashid) - { - return $this->processStatusAsyncWithHttpInfo($hashid) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation processStatusAsyncWithHttpInfo - * - * Gets the status of the process task. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function processStatusAsyncWithHttpInfo($hashid) - { - $returnType = '\DoofinderManagement\Model\ProcessingTask'; - $request = $this->processStatusRequest($hashid); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'processStatus' - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function processStatusRequest($hashid) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling processStatus' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}/_process'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation searchEngineCreate - * - * Creates a new search engine. - * - * @param \DoofinderManagement\Model\SearchEngine $body body (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\SearchEngine - */ - public function searchEngineCreate($body) - { - list($response) = $this->searchEngineCreateWithHttpInfo($body); - return $response; - } - - /** - * Operation searchEngineCreateWithHttpInfo - * - * Creates a new search engine. - * - * @param \DoofinderManagement\Model\SearchEngine $body (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\SearchEngine, HTTP status code, HTTP response headers (array of strings) - */ - public function searchEngineCreateWithHttpInfo($body) - { - $returnType = '\DoofinderManagement\Model\SearchEngine'; - $request = $this->searchEngineCreateRequest($body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\SearchEngine', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation searchEngineCreateAsync - * - * Creates a new search engine. - * - * @param \DoofinderManagement\Model\SearchEngine $body (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchEngineCreateAsync($body) - { - return $this->searchEngineCreateAsyncWithHttpInfo($body) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation searchEngineCreateAsyncWithHttpInfo - * - * Creates a new search engine. - * - * @param \DoofinderManagement\Model\SearchEngine $body (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchEngineCreateAsyncWithHttpInfo($body) - { - $returnType = '\DoofinderManagement\Model\SearchEngine'; - $request = $this->searchEngineCreateRequest($body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'searchEngineCreate' - * - * @param \DoofinderManagement\Model\SearchEngine $body (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function searchEngineCreateRequest($body) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling searchEngineCreate' - ); - } - - $resourcePath = '/api/v2/search_engines'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation searchEngineDelete - * - * Deletes a search engine. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function searchEngineDelete($hashid) - { - $this->searchEngineDeleteWithHttpInfo($hashid); - } - - /** - * Operation searchEngineDeleteWithHttpInfo - * - * Deletes a search engine. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function searchEngineDeleteWithHttpInfo($hashid) - { - $returnType = ''; - $request = $this->searchEngineDeleteRequest($hashid); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation searchEngineDeleteAsync - * - * Deletes a search engine. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchEngineDeleteAsync($hashid) - { - return $this->searchEngineDeleteAsyncWithHttpInfo($hashid) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation searchEngineDeleteAsyncWithHttpInfo - * - * Deletes a search engine. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchEngineDeleteAsyncWithHttpInfo($hashid) - { - $returnType = ''; - $request = $this->searchEngineDeleteRequest($hashid); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'searchEngineDelete' - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function searchEngineDeleteRequest($hashid) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling searchEngineDelete' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation searchEngineList - * - * Lists search engines. - * - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\SearchEngines - */ - public function searchEngineList() - { - list($response) = $this->searchEngineListWithHttpInfo(); - return $response; - } - - /** - * Operation searchEngineListWithHttpInfo - * - * Lists search engines. - * - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\SearchEngines, HTTP status code, HTTP response headers (array of strings) - */ - public function searchEngineListWithHttpInfo() - { - $returnType = '\DoofinderManagement\Model\SearchEngines'; - $request = $this->searchEngineListRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\SearchEngines', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation searchEngineListAsync - * - * Lists search engines. - * - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchEngineListAsync() - { - return $this->searchEngineListAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation searchEngineListAsyncWithHttpInfo - * - * Lists search engines. - * - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchEngineListAsyncWithHttpInfo() - { - $returnType = '\DoofinderManagement\Model\SearchEngines'; - $request = $this->searchEngineListRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'searchEngineList' - * - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function searchEngineListRequest() - { - - $resourcePath = '/api/v2/search_engines'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation searchEngineShow - * - * Gets a search engine. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\SearchEngine - */ - public function searchEngineShow($hashid) - { - list($response) = $this->searchEngineShowWithHttpInfo($hashid); - return $response; - } - - /** - * Operation searchEngineShowWithHttpInfo - * - * Gets a search engine. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\SearchEngine, HTTP status code, HTTP response headers (array of strings) - */ - public function searchEngineShowWithHttpInfo($hashid) - { - $returnType = '\DoofinderManagement\Model\SearchEngine'; - $request = $this->searchEngineShowRequest($hashid); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\SearchEngine', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation searchEngineShowAsync - * - * Gets a search engine. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchEngineShowAsync($hashid) - { - return $this->searchEngineShowAsyncWithHttpInfo($hashid) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation searchEngineShowAsyncWithHttpInfo - * - * Gets a search engine. - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchEngineShowAsyncWithHttpInfo($hashid) - { - $returnType = '\DoofinderManagement\Model\SearchEngine'; - $request = $this->searchEngineShowRequest($hashid); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'searchEngineShow' - * - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function searchEngineShowRequest($hashid) - { - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling searchEngineShow' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation searchEngineUpdate - * - * Updates a search engine. - * - * @param \DoofinderManagement\Model\SearchEngine $body body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\SearchEngine - */ - public function searchEngineUpdate($body, $hashid) - { - list($response) = $this->searchEngineUpdateWithHttpInfo($body, $hashid); - return $response; - } - - /** - * Operation searchEngineUpdateWithHttpInfo - * - * Updates a search engine. - * - * @param \DoofinderManagement\Model\SearchEngine $body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\SearchEngine, HTTP status code, HTTP response headers (array of strings) - */ - public function searchEngineUpdateWithHttpInfo($body, $hashid) - { - $returnType = '\DoofinderManagement\Model\SearchEngine'; - $request = $this->searchEngineUpdateRequest($body, $hashid); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\SearchEngine', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation searchEngineUpdateAsync - * - * Updates a search engine. - * - * @param \DoofinderManagement\Model\SearchEngine $body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchEngineUpdateAsync($body, $hashid) - { - return $this->searchEngineUpdateAsyncWithHttpInfo($body, $hashid) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation searchEngineUpdateAsyncWithHttpInfo - * - * Updates a search engine. - * - * @param \DoofinderManagement\Model\SearchEngine $body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchEngineUpdateAsyncWithHttpInfo($body, $hashid) - { - $returnType = '\DoofinderManagement\Model\SearchEngine'; - $request = $this->searchEngineUpdateRequest($body, $hashid); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'searchEngineUpdate' - * - * @param \DoofinderManagement\Model\SearchEngine $body (required) - * @param string $hashid Unique id of a search engine. (required) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function searchEngineUpdateRequest($body, $hashid) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling searchEngineUpdate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling searchEngineUpdate' - ); - } - - $resourcePath = '/api/v2/search_engines/{hashid}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($hashid !== null) { - $resourcePath = str_replace( - '{' . 'hashid' . '}', - ObjectSerializer::toPathValue($hashid), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/StatsApi.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/StatsApi.php deleted file mode 100644 index 9c906d12..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Api/StatsApi.php +++ /dev/null @@ -1,4180 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation bannersClicks - * - * Gets the total amount of clicks performed in banners. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the banner. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\StatsBannersResult - */ - public function bannersClicks($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - list($response) = $this->bannersClicksWithHttpInfo($from, $to, $hashid, $id, $tz, $device, $format); - return $response; - } - - /** - * Operation bannersClicksWithHttpInfo - * - * Gets the total amount of clicks performed in banners. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the banner. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\StatsBannersResult, HTTP status code, HTTP response headers (array of strings) - */ - public function bannersClicksWithHttpInfo($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsBannersResult'; - $request = $this->bannersClicksRequest($from, $to, $hashid, $id, $tz, $device, $format); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\StatsBannersResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation bannersClicksAsync - * - * Gets the total amount of clicks performed in banners. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the banner. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function bannersClicksAsync($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - return $this->bannersClicksAsyncWithHttpInfo($from, $to, $hashid, $id, $tz, $device, $format) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation bannersClicksAsyncWithHttpInfo - * - * Gets the total amount of clicks performed in banners. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the banner. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function bannersClicksAsyncWithHttpInfo($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsBannersResult'; - $request = $this->bannersClicksRequest($from, $to, $hashid, $id, $tz, $device, $format); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'bannersClicks' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the banner. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function bannersClicksRequest($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling bannersClicks' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling bannersClicks' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling bannersClicks' - ); - } - - $resourcePath = '/api/v2/stats/banners/clicks'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($id !== null) { - $queryParams['id'] = ObjectSerializer::toQueryValue($id); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation bannersDisplay - * - * Gets how many times a banner has been displayed. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the banner. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\StatsBannersResult - */ - public function bannersDisplay($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - list($response) = $this->bannersDisplayWithHttpInfo($from, $to, $hashid, $id, $tz, $device, $format); - return $response; - } - - /** - * Operation bannersDisplayWithHttpInfo - * - * Gets how many times a banner has been displayed. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the banner. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\StatsBannersResult, HTTP status code, HTTP response headers (array of strings) - */ - public function bannersDisplayWithHttpInfo($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsBannersResult'; - $request = $this->bannersDisplayRequest($from, $to, $hashid, $id, $tz, $device, $format); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\StatsBannersResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation bannersDisplayAsync - * - * Gets how many times a banner has been displayed. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the banner. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function bannersDisplayAsync($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - return $this->bannersDisplayAsyncWithHttpInfo($from, $to, $hashid, $id, $tz, $device, $format) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation bannersDisplayAsyncWithHttpInfo - * - * Gets how many times a banner has been displayed. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the banner. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function bannersDisplayAsyncWithHttpInfo($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsBannersResult'; - $request = $this->bannersDisplayRequest($from, $to, $hashid, $id, $tz, $device, $format); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'bannersDisplay' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the banner. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function bannersDisplayRequest($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling bannersDisplay' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling bannersDisplay' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling bannersDisplay' - ); - } - - $resourcePath = '/api/v2/stats/banners/displays'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($id !== null) { - $queryParams['id'] = ObjectSerializer::toQueryValue($id); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation checkoutsByDate - * - * Gets the checkouts by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\StatsTimeResult - */ - public function checkoutsByDate($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json') - { - list($response) = $this->checkoutsByDateWithHttpInfo($from, $to, $hashid, $tz, $device, $interval, $format); - return $response; - } - - /** - * Operation checkoutsByDateWithHttpInfo - * - * Gets the checkouts by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\StatsTimeResult, HTTP status code, HTTP response headers (array of strings) - */ - public function checkoutsByDateWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsTimeResult'; - $request = $this->checkoutsByDateRequest($from, $to, $hashid, $tz, $device, $interval, $format); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\StatsTimeResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation checkoutsByDateAsync - * - * Gets the checkouts by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function checkoutsByDateAsync($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json') - { - return $this->checkoutsByDateAsyncWithHttpInfo($from, $to, $hashid, $tz, $device, $interval, $format) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation checkoutsByDateAsyncWithHttpInfo - * - * Gets the checkouts by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function checkoutsByDateAsyncWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsTimeResult'; - $request = $this->checkoutsByDateRequest($from, $to, $hashid, $tz, $device, $interval, $format); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'checkoutsByDate' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function checkoutsByDateRequest($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json') - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling checkoutsByDate' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling checkoutsByDate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling checkoutsByDate' - ); - } - - $resourcePath = '/api/v2/stats/checkouts'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($interval !== null) { - $queryParams['interval'] = ObjectSerializer::toQueryValue($interval); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation clicksByDate - * - * Get the clicks by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $custom_results_id Filter by some custom result. (optional) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\StatsTimeResult - */ - public function clicksByDate($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json', $custom_results_id = null) - { - list($response) = $this->clicksByDateWithHttpInfo($from, $to, $hashid, $tz, $device, $interval, $format, $custom_results_id); - return $response; - } - - /** - * Operation clicksByDateWithHttpInfo - * - * Get the clicks by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $custom_results_id Filter by some custom result. (optional) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\StatsTimeResult, HTTP status code, HTTP response headers (array of strings) - */ - public function clicksByDateWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json', $custom_results_id = null) - { - $returnType = '\DoofinderManagement\Model\StatsTimeResult'; - $request = $this->clicksByDateRequest($from, $to, $hashid, $tz, $device, $interval, $format, $custom_results_id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\StatsTimeResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation clicksByDateAsync - * - * Get the clicks by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $custom_results_id Filter by some custom result. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function clicksByDateAsync($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json', $custom_results_id = null) - { - return $this->clicksByDateAsyncWithHttpInfo($from, $to, $hashid, $tz, $device, $interval, $format, $custom_results_id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation clicksByDateAsyncWithHttpInfo - * - * Get the clicks by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $custom_results_id Filter by some custom result. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function clicksByDateAsyncWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json', $custom_results_id = null) - { - $returnType = '\DoofinderManagement\Model\StatsTimeResult'; - $request = $this->clicksByDateRequest($from, $to, $hashid, $tz, $device, $interval, $format, $custom_results_id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'clicksByDate' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $custom_results_id Filter by some custom result. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function clicksByDateRequest($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json', $custom_results_id = null) - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling clicksByDate' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling clicksByDate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling clicksByDate' - ); - } - - $resourcePath = '/api/v2/stats/clicks'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($interval !== null) { - $queryParams['interval'] = ObjectSerializer::toQueryValue($interval); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - // query params - if ($custom_results_id !== null) { - $queryParams['custom_results_id'] = ObjectSerializer::toQueryValue($custom_results_id); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation clicksByQuery - * - * Get the products clicked given a certain query term. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $query Search query term (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\InlineResponse200 - */ - public function clicksByQuery($from, $to, $hashid, $query, $tz = '+00:00', $device = null, $format = 'json') - { - list($response) = $this->clicksByQueryWithHttpInfo($from, $to, $hashid, $query, $tz, $device, $format); - return $response; - } - - /** - * Operation clicksByQueryWithHttpInfo - * - * Get the products clicked given a certain query term. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $query Search query term (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\InlineResponse200, HTTP status code, HTTP response headers (array of strings) - */ - public function clicksByQueryWithHttpInfo($from, $to, $hashid, $query, $tz = '+00:00', $device = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\InlineResponse200'; - $request = $this->clicksByQueryRequest($from, $to, $hashid, $query, $tz, $device, $format); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\InlineResponse200', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation clicksByQueryAsync - * - * Get the products clicked given a certain query term. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $query Search query term (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function clicksByQueryAsync($from, $to, $hashid, $query, $tz = '+00:00', $device = null, $format = 'json') - { - return $this->clicksByQueryAsyncWithHttpInfo($from, $to, $hashid, $query, $tz, $device, $format) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation clicksByQueryAsyncWithHttpInfo - * - * Get the products clicked given a certain query term. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $query Search query term (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function clicksByQueryAsyncWithHttpInfo($from, $to, $hashid, $query, $tz = '+00:00', $device = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\InlineResponse200'; - $request = $this->clicksByQueryRequest($from, $to, $hashid, $query, $tz, $device, $format); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'clicksByQuery' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $query Search query term (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function clicksByQueryRequest($from, $to, $hashid, $query, $tz = '+00:00', $device = null, $format = 'json') - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling clicksByQuery' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling clicksByQuery' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling clicksByQuery' - ); - } - // verify the required parameter 'query' is set - if ($query === null || (is_array($query) && count($query) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $query when calling clicksByQuery' - ); - } - - $resourcePath = '/api/v2/stats/clicks/by-query/{query}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - - // path params - if ($query !== null) { - $resourcePath = str_replace( - '{' . 'query' . '}', - ObjectSerializer::toPathValue($query), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation clicksTop - * - * Get the most common clicks. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $query Search query term. (optional) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\InlineResponse2001 - */ - public function clicksTop($from, $to, $hashid, $tz = '+00:00', $device = null, $format = 'json', $query = null) - { - list($response) = $this->clicksTopWithHttpInfo($from, $to, $hashid, $tz, $device, $format, $query); - return $response; - } - - /** - * Operation clicksTopWithHttpInfo - * - * Get the most common clicks. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $query Search query term. (optional) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\InlineResponse2001, HTTP status code, HTTP response headers (array of strings) - */ - public function clicksTopWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $format = 'json', $query = null) - { - $returnType = '\DoofinderManagement\Model\InlineResponse2001'; - $request = $this->clicksTopRequest($from, $to, $hashid, $tz, $device, $format, $query); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\InlineResponse2001', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation clicksTopAsync - * - * Get the most common clicks. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $query Search query term. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function clicksTopAsync($from, $to, $hashid, $tz = '+00:00', $device = null, $format = 'json', $query = null) - { - return $this->clicksTopAsyncWithHttpInfo($from, $to, $hashid, $tz, $device, $format, $query) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation clicksTopAsyncWithHttpInfo - * - * Get the most common clicks. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $query Search query term. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function clicksTopAsyncWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $format = 'json', $query = null) - { - $returnType = '\DoofinderManagement\Model\InlineResponse2001'; - $request = $this->clicksTopRequest($from, $to, $hashid, $tz, $device, $format, $query); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'clicksTop' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $query Search query term. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function clicksTopRequest($from, $to, $hashid, $tz = '+00:00', $device = null, $format = 'json', $query = null) - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling clicksTop' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling clicksTop' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling clicksTop' - ); - } - - $resourcePath = '/api/v2/stats/clicks/top'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - // query params - if ($query !== null) { - $queryParams['query'] = ObjectSerializer::toQueryValue($query); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation initsByDate - * - * Get the search sessions by dates. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\StatsTimeResult - */ - public function initsByDate($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json') - { - list($response) = $this->initsByDateWithHttpInfo($from, $to, $hashid, $tz, $device, $interval, $format); - return $response; - } - - /** - * Operation initsByDateWithHttpInfo - * - * Get the search sessions by dates. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\StatsTimeResult, HTTP status code, HTTP response headers (array of strings) - */ - public function initsByDateWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsTimeResult'; - $request = $this->initsByDateRequest($from, $to, $hashid, $tz, $device, $interval, $format); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\StatsTimeResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation initsByDateAsync - * - * Get the search sessions by dates. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function initsByDateAsync($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json') - { - return $this->initsByDateAsyncWithHttpInfo($from, $to, $hashid, $tz, $device, $interval, $format) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation initsByDateAsyncWithHttpInfo - * - * Get the search sessions by dates. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function initsByDateAsyncWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsTimeResult'; - $request = $this->initsByDateRequest($from, $to, $hashid, $tz, $device, $interval, $format); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'initsByDate' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function initsByDateRequest($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json') - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling initsByDate' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling initsByDate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling initsByDate' - ); - } - - $resourcePath = '/api/v2/stats/inits'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($interval !== null) { - $queryParams['interval'] = ObjectSerializer::toQueryValue($interval); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation redirects - * - * Get the total amount of redirections done. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the redirection. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\StatsRedirectsResult - */ - public function redirects($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - list($response) = $this->redirectsWithHttpInfo($from, $to, $hashid, $id, $tz, $device, $format); - return $response; - } - - /** - * Operation redirectsWithHttpInfo - * - * Get the total amount of redirections done. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the redirection. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\StatsRedirectsResult, HTTP status code, HTTP response headers (array of strings) - */ - public function redirectsWithHttpInfo($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsRedirectsResult'; - $request = $this->redirectsRequest($from, $to, $hashid, $id, $tz, $device, $format); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\StatsRedirectsResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation redirectsAsync - * - * Get the total amount of redirections done. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the redirection. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function redirectsAsync($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - return $this->redirectsAsyncWithHttpInfo($from, $to, $hashid, $id, $tz, $device, $format) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation redirectsAsyncWithHttpInfo - * - * Get the total amount of redirections done. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the redirection. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function redirectsAsyncWithHttpInfo($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsRedirectsResult'; - $request = $this->redirectsRequest($from, $to, $hashid, $id, $tz, $device, $format); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'redirects' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param int $id Unique id of the redirection. (optional) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function redirectsRequest($from, $to, $hashid, $id = null, $tz = '+00:00', $device = null, $format = 'json') - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling redirects' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling redirects' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling redirects' - ); - } - - $resourcePath = '/api/v2/stats/redirects'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($id !== null) { - $queryParams['id'] = ObjectSerializer::toQueryValue($id); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation searchesByClick - * - * Get the top searches that got a product clicked - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $dfid Doofinder ID to filter by (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\StatsTopSearchesResult - */ - public function searchesByClick($from, $to, $hashid, $dfid, $tz = '+00:00', $device = null, $format = 'json') - { - list($response) = $this->searchesByClickWithHttpInfo($from, $to, $hashid, $dfid, $tz, $device, $format); - return $response; - } - - /** - * Operation searchesByClickWithHttpInfo - * - * Get the top searches that got a product clicked - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $dfid Doofinder ID to filter by (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\StatsTopSearchesResult, HTTP status code, HTTP response headers (array of strings) - */ - public function searchesByClickWithHttpInfo($from, $to, $hashid, $dfid, $tz = '+00:00', $device = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsTopSearchesResult'; - $request = $this->searchesByClickRequest($from, $to, $hashid, $dfid, $tz, $device, $format); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\StatsTopSearchesResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation searchesByClickAsync - * - * Get the top searches that got a product clicked - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $dfid Doofinder ID to filter by (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchesByClickAsync($from, $to, $hashid, $dfid, $tz = '+00:00', $device = null, $format = 'json') - { - return $this->searchesByClickAsyncWithHttpInfo($from, $to, $hashid, $dfid, $tz, $device, $format) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation searchesByClickAsyncWithHttpInfo - * - * Get the top searches that got a product clicked - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $dfid Doofinder ID to filter by (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchesByClickAsyncWithHttpInfo($from, $to, $hashid, $dfid, $tz = '+00:00', $device = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsTopSearchesResult'; - $request = $this->searchesByClickRequest($from, $to, $hashid, $dfid, $tz, $device, $format); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'searchesByClick' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $dfid Doofinder ID to filter by (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function searchesByClickRequest($from, $to, $hashid, $dfid, $tz = '+00:00', $device = null, $format = 'json') - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling searchesByClick' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling searchesByClick' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling searchesByClick' - ); - } - // verify the required parameter 'dfid' is set - if ($dfid === null || (is_array($dfid) && count($dfid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $dfid when calling searchesByClick' - ); - } - - $resourcePath = '/api/v2/stats/clicks/{dfid}/searches/top'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - - // path params - if ($dfid !== null) { - $resourcePath = str_replace( - '{' . 'dfid' . '}', - ObjectSerializer::toPathValue($dfid), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation searchesByDate - * - * Get the searches by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $custom_results_id Filter by some custom result. (optional) - * @param \DoofinderManagement\Model\QueryName $query_name Type of query to filter by (optional) - * @param string $source Filter by search source. (optional) - * @param int $total_hits Filter by the number of search results. (optional) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\StatsTimeResult - */ - public function searchesByDate($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json', $custom_results_id = null, $query_name = null, $source = null, $total_hits = null) - { - list($response) = $this->searchesByDateWithHttpInfo($from, $to, $hashid, $tz, $device, $interval, $format, $custom_results_id, $query_name, $source, $total_hits); - return $response; - } - - /** - * Operation searchesByDateWithHttpInfo - * - * Get the searches by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $custom_results_id Filter by some custom result. (optional) - * @param \DoofinderManagement\Model\QueryName $query_name Type of query to filter by (optional) - * @param string $source Filter by search source. (optional) - * @param int $total_hits Filter by the number of search results. (optional) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\StatsTimeResult, HTTP status code, HTTP response headers (array of strings) - */ - public function searchesByDateWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json', $custom_results_id = null, $query_name = null, $source = null, $total_hits = null) - { - $returnType = '\DoofinderManagement\Model\StatsTimeResult'; - $request = $this->searchesByDateRequest($from, $to, $hashid, $tz, $device, $interval, $format, $custom_results_id, $query_name, $source, $total_hits); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\StatsTimeResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation searchesByDateAsync - * - * Get the searches by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $custom_results_id Filter by some custom result. (optional) - * @param \DoofinderManagement\Model\QueryName $query_name Type of query to filter by (optional) - * @param string $source Filter by search source. (optional) - * @param int $total_hits Filter by the number of search results. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchesByDateAsync($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json', $custom_results_id = null, $query_name = null, $source = null, $total_hits = null) - { - return $this->searchesByDateAsyncWithHttpInfo($from, $to, $hashid, $tz, $device, $interval, $format, $custom_results_id, $query_name, $source, $total_hits) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation searchesByDateAsyncWithHttpInfo - * - * Get the searches by dates - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $custom_results_id Filter by some custom result. (optional) - * @param \DoofinderManagement\Model\QueryName $query_name Type of query to filter by (optional) - * @param string $source Filter by search source. (optional) - * @param int $total_hits Filter by the number of search results. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchesByDateAsyncWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json', $custom_results_id = null, $query_name = null, $source = null, $total_hits = null) - { - $returnType = '\DoofinderManagement\Model\StatsTimeResult'; - $request = $this->searchesByDateRequest($from, $to, $hashid, $tz, $device, $interval, $format, $custom_results_id, $query_name, $source, $total_hits); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'searchesByDate' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $interval Time interval for aggregations. (optional, default to 1d) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param string $custom_results_id Filter by some custom result. (optional) - * @param \DoofinderManagement\Model\QueryName $query_name Type of query to filter by (optional) - * @param string $source Filter by search source. (optional) - * @param int $total_hits Filter by the number of search results. (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function searchesByDateRequest($from, $to, $hashid, $tz = '+00:00', $device = null, $interval = '1d', $format = 'json', $custom_results_id = null, $query_name = null, $source = null, $total_hits = null) - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling searchesByDate' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling searchesByDate' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling searchesByDate' - ); - } - - $resourcePath = '/api/v2/stats/searches'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($interval !== null) { - $queryParams['interval'] = ObjectSerializer::toQueryValue($interval); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - // query params - if ($custom_results_id !== null) { - $queryParams['custom_results_id'] = ObjectSerializer::toQueryValue($custom_results_id); - } - // query params - if ($query_name !== null) { - $queryParams['query_name'] = ObjectSerializer::toQueryValue($query_name); - } - // query params - if ($source !== null) { - $queryParams['source'] = ObjectSerializer::toQueryValue($source); - } - // query params - if ($total_hits !== null) { - $queryParams['total_hits'] = ObjectSerializer::toQueryValue($total_hits); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation searchesTop - * - * Get the most common searches. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param \DoofinderManagement\Model\QueryName $query_name Type of query to filter by (optional) - * @param int $total_hits Filter by the number of search results. (optional) - * @param object $exclude Exclude filters (optional) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\StatsTopSearchesResult - */ - public function searchesTop($from, $to, $hashid, $tz = '+00:00', $device = null, $format = 'json', $query_name = null, $total_hits = null, $exclude = null) - { - list($response) = $this->searchesTopWithHttpInfo($from, $to, $hashid, $tz, $device, $format, $query_name, $total_hits, $exclude); - return $response; - } - - /** - * Operation searchesTopWithHttpInfo - * - * Get the most common searches. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param \DoofinderManagement\Model\QueryName $query_name Type of query to filter by (optional) - * @param int $total_hits Filter by the number of search results. (optional) - * @param object $exclude Exclude filters (optional) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\StatsTopSearchesResult, HTTP status code, HTTP response headers (array of strings) - */ - public function searchesTopWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $format = 'json', $query_name = null, $total_hits = null, $exclude = null) - { - $returnType = '\DoofinderManagement\Model\StatsTopSearchesResult'; - $request = $this->searchesTopRequest($from, $to, $hashid, $tz, $device, $format, $query_name, $total_hits, $exclude); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\StatsTopSearchesResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation searchesTopAsync - * - * Get the most common searches. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param \DoofinderManagement\Model\QueryName $query_name Type of query to filter by (optional) - * @param int $total_hits Filter by the number of search results. (optional) - * @param object $exclude Exclude filters (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchesTopAsync($from, $to, $hashid, $tz = '+00:00', $device = null, $format = 'json', $query_name = null, $total_hits = null, $exclude = null) - { - return $this->searchesTopAsyncWithHttpInfo($from, $to, $hashid, $tz, $device, $format, $query_name, $total_hits, $exclude) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation searchesTopAsyncWithHttpInfo - * - * Get the most common searches. - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param \DoofinderManagement\Model\QueryName $query_name Type of query to filter by (optional) - * @param int $total_hits Filter by the number of search results. (optional) - * @param object $exclude Exclude filters (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function searchesTopAsyncWithHttpInfo($from, $to, $hashid, $tz = '+00:00', $device = null, $format = 'json', $query_name = null, $total_hits = null, $exclude = null) - { - $returnType = '\DoofinderManagement\Model\StatsTopSearchesResult'; - $request = $this->searchesTopRequest($from, $to, $hashid, $tz, $device, $format, $query_name, $total_hits, $exclude); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'searchesTop' - * - * @param string $from Start date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param string $to End date of the interval in the format of UNIX timestamp or YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $tz Timezone for the given dates, by default assumes UTC. Timezones may be specified as an ISO 8601 UTC offset. (optional, default to +00:00) - * @param string $device Filter by kind of device. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * @param \DoofinderManagement\Model\QueryName $query_name Type of query to filter by (optional) - * @param int $total_hits Filter by the number of search results. (optional) - * @param object $exclude Exclude filters (optional) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function searchesTopRequest($from, $to, $hashid, $tz = '+00:00', $device = null, $format = 'json', $query_name = null, $total_hits = null, $exclude = null) - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling searchesTop' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling searchesTop' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling searchesTop' - ); - } - - $resourcePath = '/api/v2/stats/searches/top'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($tz !== null) { - $queryParams['tz'] = ObjectSerializer::toQueryValue($tz); - } - // query params - if ($device !== null) { - $queryParams['device'] = ObjectSerializer::toQueryValue($device); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - // query params - if ($query_name !== null) { - $queryParams['query_name'] = ObjectSerializer::toQueryValue($query_name); - } - // query params - if ($total_hits !== null) { - $queryParams['total_hits'] = ObjectSerializer::toQueryValue($total_hits); - } - // query params - if ($exclude !== null) { - $queryParams['exclude'] = ObjectSerializer::toQueryValue($exclude); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation usage - * - * Get the search engines usage. - * - * @param string $from Start date of the interval in the format of YYYYMMDD. (required) - * @param string $to End date of the interval in the format of YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $type Filter by the given usage type. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \DoofinderManagement\Model\StatsTimeResult - */ - public function usage($from, $to, $hashid, $type = null, $format = 'json') - { - list($response) = $this->usageWithHttpInfo($from, $to, $hashid, $type, $format); - return $response; - } - - /** - * Operation usageWithHttpInfo - * - * Get the search engines usage. - * - * @param string $from Start date of the interval in the format of YYYYMMDD. (required) - * @param string $to End date of the interval in the format of YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $type Filter by the given usage type. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \DoofinderManagement\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \DoofinderManagement\Model\StatsTimeResult, HTTP status code, HTTP response headers (array of strings) - */ - public function usageWithHttpInfo($from, $to, $hashid, $type = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsTimeResult'; - $request = $this->usageRequest($from, $to, $hashid, $type, $format); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if (!in_array($returnType, ['string','integer','bool'])) { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\DoofinderManagement\Model\StatsTimeResult', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation usageAsync - * - * Get the search engines usage. - * - * @param string $from Start date of the interval in the format of YYYYMMDD. (required) - * @param string $to End date of the interval in the format of YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $type Filter by the given usage type. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function usageAsync($from, $to, $hashid, $type = null, $format = 'json') - { - return $this->usageAsyncWithHttpInfo($from, $to, $hashid, $type, $format) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation usageAsyncWithHttpInfo - * - * Get the search engines usage. - * - * @param string $from Start date of the interval in the format of YYYYMMDD. (required) - * @param string $to End date of the interval in the format of YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $type Filter by the given usage type. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public function usageAsyncWithHttpInfo($from, $to, $hashid, $type = null, $format = 'json') - { - $returnType = '\DoofinderManagement\Model\StatsTimeResult'; - $request = $this->usageRequest($from, $to, $hashid, $type, $format); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'usage' - * - * @param string $from Start date of the interval in the format of YYYYMMDD. (required) - * @param string $to End date of the interval in the format of YYYYMMDD. (required) - * @param \DoofinderManagement\Model\Hashid $hashid Unique id of the search engine. It accepts a single value or an array of values. If you want to work with all user search engines you can use the special parameter value `_all`. (required) - * @param string $type Filter by the given usage type. (optional) - * @param string $format Indicates which response format should be used (optional, default to json) - * - * @throws \InvalidArgumentException - * @return \Doofinder\GuzzleHttp\Psr7\Request - */ - protected function usageRequest($from, $to, $hashid, $type = null, $format = 'json') - { - // verify the required parameter 'from' is set - if ($from === null || (is_array($from) && count($from) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $from when calling usage' - ); - } - // verify the required parameter 'to' is set - if ($to === null || (is_array($to) && count($to) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $to when calling usage' - ); - } - // verify the required parameter 'hashid' is set - if ($hashid === null || (is_array($hashid) && count($hashid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $hashid when calling usage' - ); - } - - $resourcePath = '/api/v2/stats/usage'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($from !== null) { - $queryParams['from'] = ObjectSerializer::toQueryValue($from); - } - // query params - if ($to !== null) { - $queryParams['to'] = ObjectSerializer::toQueryValue($to); - } - // query params - if ($hashid !== null) { - $queryParams['hashid'] = ObjectSerializer::toQueryValue($hashid); - } - // query params - if ($type !== null) { - $queryParams['type'] = ObjectSerializer::toQueryValue($type); - } - // query params - if ($format !== null) { - $queryParams['format'] = ObjectSerializer::toQueryValue($format); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \Doofinder\GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \Doofinder\GuzzleHttp\Psr7\build_query($formParams); - } - } - - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \Doofinder\GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/ApiException.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/ApiException.php deleted file mode 100644 index 6b758700..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/ApiException.php +++ /dev/null @@ -1,120 +0,0 @@ -responseHeaders = $responseHeaders; - $this->responseBody = $responseBody; - } - - /** - * Gets the HTTP response header - * - * @return string[]|null HTTP response header - */ - public function getResponseHeaders() - { - return $this->responseHeaders; - } - - /** - * Gets the HTTP body of the server response either as Json or string - * - * @return mixed HTTP body of the server response either as \stdClass or string - */ - public function getResponseBody() - { - return $this->responseBody; - } - - /** - * Sets the deseralized response object (during deserialization) - * - * @param mixed $obj Deserialized response object - * - * @return void - */ - public function setResponseObject($obj) - { - $this->responseObject = $obj; - } - - /** - * Gets the deseralized response object (during deserialization) - * - * @return mixed the deserialized response object - */ - public function getResponseObject() - { - return $this->responseObject; - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Configuration.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Configuration.php deleted file mode 100644 index e3ac4db4..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Configuration.php +++ /dev/null @@ -1,428 +0,0 @@ -tempFolderPath = sys_get_temp_dir(); - } - - /** - * Sets API key - * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $key API key or token - * - * @return $this - */ - public function setApiKey($apiKeyIdentifier, $key) - { - $this->apiKeys[$apiKeyIdentifier] = $key; - return $this; - } - - /** - * Gets API key - * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * - * @return string API key or token - */ - public function getApiKey($apiKeyIdentifier) - { - return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null; - } - - /** - * Sets the prefix for API key (e.g. Bearer) - * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer - * - * @return $this - */ - public function setApiKeyPrefix($apiKeyIdentifier, $prefix) - { - $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; - return $this; - } - - /** - * Gets API key prefix - * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * - * @return string - */ - public function getApiKeyPrefix($apiKeyIdentifier) - { - return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null; - } - - /** - * Sets the access token for OAuth - * - * @param string $accessToken Token for OAuth - * - * @return $this - */ - public function setAccessToken($accessToken) - { - $this->accessToken = $accessToken; - return $this; - } - - /** - * Gets the access token for OAuth - * - * @return string Access token for OAuth - */ - public function getAccessToken() - { - return $this->accessToken; - } - - /** - * Sets the username for HTTP basic authentication - * - * @param string $username Username for HTTP basic authentication - * - * @return $this - */ - public function setUsername($username) - { - $this->username = $username; - return $this; - } - - /** - * Gets the username for HTTP basic authentication - * - * @return string Username for HTTP basic authentication - */ - public function getUsername() - { - return $this->username; - } - - /** - * Sets the password for HTTP basic authentication - * - * @param string $password Password for HTTP basic authentication - * - * @return $this - */ - public function setPassword($password) - { - $this->password = $password; - return $this; - } - - /** - * Gets the password for HTTP basic authentication - * - * @return string Password for HTTP basic authentication - */ - public function getPassword() - { - return $this->password; - } - - /** - * Sets the host - * - * @param string $host Host - * - * @return $this - */ - public function setHost($host) - { - $this->host = $host; - return $this; - } - - /** - * Gets the host - * - * @return string Host - */ - public function getHost() - { - return $this->host; - } - - /** - * Sets the user agent of the api client - * - * @param string $userAgent the user agent of the api client - * - * @throws \InvalidArgumentException - * @return $this - */ - public function setUserAgent($userAgent) - { - if (!is_string($userAgent)) { - throw new \InvalidArgumentException('User-agent must be a string.'); - } - - $this->userAgent = $userAgent; - return $this; - } - - /** - * Gets the user agent of the api client - * - * @return string user agent - */ - public function getUserAgent() - { - return $this->userAgent; - } - - /** - * Sets debug flag - * - * @param bool $debug Debug flag - * - * @return $this - */ - public function setDebug($debug) - { - $this->debug = $debug; - return $this; - } - - /** - * Gets the debug flag - * - * @return bool - */ - public function getDebug() - { - return $this->debug; - } - - /** - * Sets the debug file - * - * @param string $debugFile Debug file - * - * @return $this - */ - public function setDebugFile($debugFile) - { - $this->debugFile = $debugFile; - return $this; - } - - /** - * Gets the debug file - * - * @return string - */ - public function getDebugFile() - { - return $this->debugFile; - } - - /** - * Sets the temp folder path - * - * @param string $tempFolderPath Temp folder path - * - * @return $this - */ - public function setTempFolderPath($tempFolderPath) - { - $this->tempFolderPath = $tempFolderPath; - return $this; - } - - /** - * Gets the temp folder path - * - * @return string Temp folder path - */ - public function getTempFolderPath() - { - return $this->tempFolderPath; - } - - /** - * Gets the default configuration instance - * - * @return Configuration - */ - public static function getDefaultConfiguration() - { - if (self::$defaultConfiguration === null) { - self::$defaultConfiguration = new Configuration(); - } - - return self::$defaultConfiguration; - } - - /** - * Sets the detault configuration instance - * - * @param Configuration $config An instance of the Configuration Object - * - * @return void - */ - public static function setDefaultConfiguration(Configuration $config) - { - self::$defaultConfiguration = $config; - } - - /** - * Gets the essential information for debugging - * - * @return string The report for debugging - */ - public static function toDebugReport() - { - $report = 'PHP SDK (DoofinderManagement) Debug Report:' . PHP_EOL; - $report .= ' OS: ' . php_uname() . PHP_EOL; - $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' OpenAPI Spec Version: 2.0' . PHP_EOL; - $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; - - return $report; - } - - /** - * Get API key (with prefix if set) - * - * @param string $apiKeyIdentifier name of apikey - * - * @return string API key with the prefix - */ - public function getApiKeyWithPrefix($apiKeyIdentifier) - { - $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); - $apiKey = $this->getApiKey($apiKeyIdentifier); - - if ($apiKey === null) { - return null; - } - - if ($prefix === null) { - $keyWithPrefix = $apiKey; - } else { - $keyWithPrefix = $prefix . ' ' . $apiKey; - } - - return $keyWithPrefix; - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/HeaderSelector.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/HeaderSelector.php deleted file mode 100644 index 1fd33659..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/HeaderSelector.php +++ /dev/null @@ -1,109 +0,0 @@ -selectAcceptHeader($accept); - if ($accept !== null) { - $headers['Accept'] = $accept; - } - - $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); - return $headers; - } - - /** - * @param string[] $accept - * @return array - */ - public function selectHeadersForMultipart($accept) - { - $headers = $this->selectHeaders($accept, []); - - unset($headers['Content-Type']); - return $headers; - } - - /** - * Return the header 'Accept' based on an array of Accept provided - * - * @param string[] $accept Array of header - * - * @return string Accept (e.g. application/json) - */ - private function selectAcceptHeader($accept) - { - if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) { - return null; - } elseif (preg_grep("/application\/json/i", $accept)) { - return 'application/json'; - } else { - return implode(',', $accept); - } - } - - /** - * Return the content type based on an array of content-type provided - * - * @param string[] $contentType Array fo content-type - * - * @return string Content-Type (e.g. application/json) - */ - private function selectContentTypeHeader($contentType) - { - if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) { - return 'application/json'; - } elseif (preg_grep("/application\/json/i", $contentType)) { - return 'application/json'; - } else { - return implode(',', $contentType); - } - } -} - diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/AnyOfDataSourceUrl.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/AnyOfDataSourceUrl.php deleted file mode 100644 index 9291c32d..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/AnyOfDataSourceUrl.php +++ /dev/null @@ -1,266 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/BulkRequest.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/BulkRequest.php deleted file mode 100644 index 7d1b2ae6..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/BulkRequest.php +++ /dev/null @@ -1,267 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/BulkResult.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/BulkResult.php deleted file mode 100644 index 8060df6f..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/BulkResult.php +++ /dev/null @@ -1,322 +0,0 @@ - 'bool', -'results' => '\DoofinderManagement\Model\BulkResultResults[]' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'errors' => null, -'results' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'errors' => 'errors', -'results' => 'results' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'errors' => 'setErrors', -'results' => 'setResults' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'errors' => 'getErrors', -'results' => 'getResults' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['errors'] = isset($data['errors']) ? $data['errors'] : null; - $this->container['results'] = isset($data['results']) ? $data['results'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets errors - * - * @return bool - */ - public function getErrors() - { - return $this->container['errors']; - } - - /** - * Sets errors - * - * @param bool $errors Indicates if there is any error in the results. - * - * @return $this - */ - public function setErrors($errors) - { - $this->container['errors'] = $errors; - - return $this; - } - - /** - * Gets results - * - * @return \DoofinderManagement\Model\BulkResultResults[] - */ - public function getResults() - { - return $this->container['results']; - } - - /** - * Sets results - * - * @param \DoofinderManagement\Model\BulkResultResults[] $results List of results of each bulk operation. - * - * @return $this - */ - public function setResults($results) - { - $this->container['results'] = $results; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/BulkResultResults.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/BulkResultResults.php deleted file mode 100644 index c5c198a0..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/BulkResultResults.php +++ /dev/null @@ -1,374 +0,0 @@ - 'string', -'id' => 'string', -'result' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'error' => null, -'id' => null, -'result' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'error' => 'error', -'id' => 'id', -'result' => 'result' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'error' => 'setError', -'id' => 'setId', -'result' => 'setResult' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'error' => 'getError', -'id' => 'getId', -'result' => 'getResult' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - const RESULT_CREATED = 'created'; -const RESULT_UPDATED = 'updated'; -const RESULT_DELETED = 'deleted'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getResultAllowableValues() - { - return [ - self::RESULT_CREATED, -self::RESULT_UPDATED, -self::RESULT_DELETED, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getResultAllowableValues(); - if (!is_null($this->container['result']) && !in_array($this->container['result'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'result', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets error - * - * @return string - */ - public function getError() - { - return $this->container['error']; - } - - /** - * Sets error - * - * @param string $error Result error of the operation. - * - * @return $this - */ - public function setError($error) - { - $this->container['error'] = $error; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id Item unique identifier. - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets result - * - * @return string - */ - public function getResult() - { - return $this->container['result']; - } - - /** - * Sets result - * - * @param string $result Result of the operation. - * - * @return $this - */ - public function setResult($result) - { - $this->container['result'] = $result; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/DataSource.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/DataSource.php deleted file mode 100644 index 53b9e178..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/DataSource.php +++ /dev/null @@ -1,389 +0,0 @@ - '\DoofinderManagement\Model\OneOfDataSourceOptions', -'type' => 'string', -'url' => 'AnyOfDataSourceUrl' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'options' => null, -'type' => null, -'url' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'options' => 'options', -'type' => 'type', -'url' => 'url' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'options' => 'setOptions', -'type' => 'setType', -'url' => 'setUrl' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'options' => 'getOptions', -'type' => 'getType', -'url' => 'getUrl' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - const TYPE_BIGCOMMERCE = 'bigcommerce'; -const TYPE_EKM = 'ekm'; -const TYPE_FILE = 'file'; -const TYPE_SHOPIFY = 'shopify'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE_BIGCOMMERCE, -self::TYPE_EKM, -self::TYPE_FILE, -self::TYPE_SHOPIFY, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['options'] = isset($data['options']) ? $data['options'] : null; - $this->container['type'] = isset($data['type']) ? $data['type'] : null; - $this->container['url'] = isset($data['url']) ? $data['url'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'type', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets options - * - * @return OneOfDataSourceOptions - */ - public function getOptions() - { - return $this->container['options']; - } - - /** - * Sets options - * - * @param OneOfDataSourceOptions $options DataSource general options. They define required parameters for the DataSource to work or options that modify the access to the data feed. - * - * @return $this - */ - public function setOptions($options) - { - $this->container['options'] = $options; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of datasource - * - * @return $this - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'type', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets url - * - * @return AnyOfDataSourceUrl - */ - public function getUrl() - { - return $this->container['url']; - } - - /** - * Sets url - * - * @param AnyOfDataSourceUrl $url This field defines the source of items for indexing. The schema is linked to the datasource type. For instance, `file` types should be written with domain and protocol like \"https://mydomain.com/feed\" while `shopify` types should contain only shopify domain like \"mydomain.shopify.com\". - * - * @return $this - */ - public function setUrl($url) - { - $this->container['url'] = $url; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/DataSources.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/DataSources.php deleted file mode 100644 index a9df2f38..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/DataSources.php +++ /dev/null @@ -1,267 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Hashid.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Hashid.php deleted file mode 100644 index a439076b..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Hashid.php +++ /dev/null @@ -1,266 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Index.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Index.php deleted file mode 100644 index ffb5ea3c..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Index.php +++ /dev/null @@ -1,385 +0,0 @@ - '\DoofinderManagement\Model\DataSources', -'name' => 'string', -'preset' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'datasources' => null, -'name' => null, -'preset' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes + parent::swaggerTypes(); - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats + parent::swaggerFormats(); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'datasources' => 'datasources', -'name' => 'name', -'preset' => 'preset' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'datasources' => 'setDatasources', -'name' => 'setName', -'preset' => 'setPreset' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'datasources' => 'getDatasources', -'name' => 'getName', -'preset' => 'getPreset' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return parent::attributeMap() + self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return parent::setters() + self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return parent::getters() + self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - const PRESET_GENERIC = 'generic'; -const PRESET_PRODUCT = 'product'; -const PRESET_PAGE = 'page'; -const PRESET_CATEGORY = 'category'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPresetAllowableValues() - { - return [ - self::PRESET_GENERIC, -self::PRESET_PRODUCT, -self::PRESET_PAGE, -self::PRESET_CATEGORY, ]; - } - - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - parent::__construct($data); - - $this->container['datasources'] = isset($data['datasources']) ? $data['datasources'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['preset'] = isset($data['preset']) ? $data['preset'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = parent::listInvalidProperties(); - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['preset'] === null) { - $invalidProperties[] = "'preset' can't be null"; - } - $allowedValues = $this->getPresetAllowableValues(); - if (!is_null($this->container['preset']) && !in_array($this->container['preset'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'preset', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets datasources - * - * @return \DoofinderManagement\Model\DataSources - */ - public function getDatasources() - { - return $this->container['datasources']; - } - - /** - * Sets datasources - * - * @param \DoofinderManagement\Model\DataSources $datasources datasources - * - * @return $this - */ - public function setDatasources($datasources) - { - $this->container['datasources'] = $datasources; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name of the Index. It works as the index identifier. - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets preset - * - * @return string - */ - public function getPreset() - { - return $this->container['preset']; - } - - /** - * Sets preset - * - * @param string $preset Preset of the index. The preset defines a set of configuration parameters for the index like basic fields to be included, and field transformations. For instance, the `product` preset creates the `best_price` field. - * - * @return $this - */ - public function setPreset($preset) - { - $allowedValues = $this->getPresetAllowableValues(); - if (!in_array($preset, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'preset', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['preset'] = $preset; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/IndexUpdate.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/IndexUpdate.php deleted file mode 100644 index e7da095f..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/IndexUpdate.php +++ /dev/null @@ -1,292 +0,0 @@ - '\DoofinderManagement\Model\OneOfIndexUpdateOptions' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'options' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'options' => 'options' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'options' => 'setOptions' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'options' => 'getOptions' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['options'] = isset($data['options']) ? $data['options'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets options - * - * @return OneOfIndexUpdateOptions - */ - public function getOptions() - { - return $this->container['options']; - } - - /** - * Sets options - * - * @param OneOfIndexUpdateOptions $options General options of an index. The options schema is linked to the index preset. For instance, you can set `group_variants` but only for `product` presets. - * - * @return $this - */ - public function setOptions($options) - { - $this->container['options'] = $options; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Indices.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Indices.php deleted file mode 100644 index abeed050..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Indices.php +++ /dev/null @@ -1,267 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/InlineResponse200.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/InlineResponse200.php deleted file mode 100644 index 8a9098b9..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/InlineResponse200.php +++ /dev/null @@ -1,321 +0,0 @@ - '\DoofinderManagement\Model\StatsClicksResult', -'total_count' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'results' => null, -'total_count' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'results' => 'results', -'total_count' => 'total_count' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'results' => 'setResults', -'total_count' => 'setTotalCount' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'results' => 'getResults', -'total_count' => 'getTotalCount' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['results'] = isset($data['results']) ? $data['results'] : null; - $this->container['total_count'] = isset($data['total_count']) ? $data['total_count'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets results - * - * @return \DoofinderManagement\Model\StatsClicksResult - */ - public function getResults() - { - return $this->container['results']; - } - - /** - * Sets results - * - * @param \DoofinderManagement\Model\StatsClicksResult $results results - * - * @return $this - */ - public function setResults($results) - { - $this->container['results'] = $results; - - return $this; - } - - /** - * Gets total_count - * - * @return int - */ - public function getTotalCount() - { - return $this->container['total_count']; - } - - /** - * Sets total_count - * - * @param int $total_count total_count - * - * @return $this - */ - public function setTotalCount($total_count) - { - $this->container['total_count'] = $total_count; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/InlineResponse2001.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/InlineResponse2001.php deleted file mode 100644 index e0bb1ba1..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/InlineResponse2001.php +++ /dev/null @@ -1,351 +0,0 @@ - '\DoofinderManagement\Model\StatsClicksResult', -'total' => 'int', -'total_count' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'results' => null, -'total' => null, -'total_count' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'results' => 'results', -'total' => 'total', -'total_count' => 'total_count' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'results' => 'setResults', -'total' => 'setTotal', -'total_count' => 'setTotalCount' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'results' => 'getResults', -'total' => 'getTotal', -'total_count' => 'getTotalCount' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['results'] = isset($data['results']) ? $data['results'] : null; - $this->container['total'] = isset($data['total']) ? $data['total'] : null; - $this->container['total_count'] = isset($data['total_count']) ? $data['total_count'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets results - * - * @return \DoofinderManagement\Model\StatsClicksResult - */ - public function getResults() - { - return $this->container['results']; - } - - /** - * Sets results - * - * @param \DoofinderManagement\Model\StatsClicksResult $results results - * - * @return $this - */ - public function setResults($results) - { - $this->container['results'] = $results; - - return $this; - } - - /** - * Gets total - * - * @return int - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param int $total total - * - * @return $this - */ - public function setTotal($total) - { - $this->container['total'] = $total; - - return $this; - } - - /** - * Gets total_count - * - * @return int - */ - public function getTotalCount() - { - return $this->container['total_count']; - } - - /** - * Sets total_count - * - * @param int $total_count total_count - * - * @return $this - */ - public function setTotalCount($total_count) - { - $this->container['total_count'] = $total_count; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Item.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Item.php deleted file mode 100644 index 79f9ecd5..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Item.php +++ /dev/null @@ -1,267 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Items.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Items.php deleted file mode 100644 index eb6c4668..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Items.php +++ /dev/null @@ -1,267 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ItemsIds.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ItemsIds.php deleted file mode 100644 index 7c486511..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ItemsIds.php +++ /dev/null @@ -1,267 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ItemsIdsInner.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ItemsIdsInner.php deleted file mode 100644 index fbb7bd17..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ItemsIdsInner.php +++ /dev/null @@ -1,291 +0,0 @@ - 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'id' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id Unique identifier of the item. - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/MGETItem.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/MGETItem.php deleted file mode 100644 index be815e3f..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/MGETItem.php +++ /dev/null @@ -1,351 +0,0 @@ - 'bool', -'id' => 'string', -'item' => '\DoofinderManagement\Model\Item' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'found' => null, -'id' => null, -'item' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'found' => 'found', -'id' => 'id', -'item' => 'item' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'found' => 'setFound', -'id' => 'setId', -'item' => 'setItem' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'found' => 'getFound', -'id' => 'getId', -'item' => 'getItem' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['found'] = isset($data['found']) ? $data['found'] : null; - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - $this->container['item'] = isset($data['item']) ? $data['item'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets found - * - * @return bool - */ - public function getFound() - { - return $this->container['found']; - } - - /** - * Sets found - * - * @param bool $found Indicates if the item was found or not. - * - * @return $this - */ - public function setFound($found) - { - $this->container['found'] = $found; - - return $this; - } - - /** - * Gets id - * - * @return string - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id Item id - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets item - * - * @return \DoofinderManagement\Model\Item - */ - public function getItem() - { - return $this->container['item']; - } - - /** - * Sets item - * - * @param \DoofinderManagement\Model\Item $item item - * - * @return $this - */ - public function setItem($item) - { - $this->container['item'] = $item; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/MGETResponse.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/MGETResponse.php deleted file mode 100644 index 6a2ec29f..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/MGETResponse.php +++ /dev/null @@ -1,267 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ModelInterface.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ModelInterface.php deleted file mode 100644 index f7d80400..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ModelInterface.php +++ /dev/null @@ -1,95 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/OneOfIndexUpdateOptions.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/OneOfIndexUpdateOptions.php deleted file mode 100644 index 2bf475e3..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/OneOfIndexUpdateOptions.php +++ /dev/null @@ -1,266 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/OneOfhashid.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/OneOfhashid.php deleted file mode 100644 index 921b660a..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/OneOfhashid.php +++ /dev/null @@ -1,266 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/OneOfqueryName.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/OneOfqueryName.php deleted file mode 100644 index 665691e8..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/OneOfqueryName.php +++ /dev/null @@ -1,266 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ProcessingTask.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ProcessingTask.php deleted file mode 100644 index ac5f5840..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ProcessingTask.php +++ /dev/null @@ -1,352 +0,0 @@ - 'string', -'result' => 'string', -'status' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'finished_at' => null, -'result' => null, -'status' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'finished_at' => 'finished_at', -'result' => 'result', -'status' => 'status' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'finished_at' => 'setFinishedAt', -'result' => 'setResult', -'status' => 'setStatus' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'finished_at' => 'getFinishedAt', -'result' => 'getResult', -'status' => 'getStatus' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['finished_at'] = isset($data['finished_at']) ? $data['finished_at'] : null; - $this->container['result'] = isset($data['result']) ? $data['result'] : null; - $this->container['status'] = isset($data['status']) ? $data['status'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets finished_at - * - * @return string - */ - public function getFinishedAt() - { - return $this->container['finished_at']; - } - - /** - * Sets finished_at - * - * @param string $finished_at ISO 8601 datetime string when the task has finished. - * - * @return $this - */ - public function setFinishedAt($finished_at) - { - $this->container['finished_at'] = $finished_at; - - return $this; - } - - /** - * Gets result - * - * @return string - */ - public function getResult() - { - return $this->container['result']; - } - - /** - * Sets result - * - * @param string $result Result of the task. It will be just `OK` or some error description. - * - * @return $this - */ - public function setResult($result) - { - $this->container['result'] = $result; - - return $this; - } - - /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status Status of the task. - * - * @return $this - */ - public function setStatus($status) - { - $this->container['status'] = $status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/QueryName.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/QueryName.php deleted file mode 100644 index f21095ec..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/QueryName.php +++ /dev/null @@ -1,266 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ReindexingTask.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ReindexingTask.php deleted file mode 100644 index b81f9e09..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ReindexingTask.php +++ /dev/null @@ -1,416 +0,0 @@ - '\DoofinderManagement\Model\ReindexingTaskError', -'failures' => 'string[]', -'progress' => 'float', -'status' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'error' => null, -'failures' => null, -'progress' => 'float', -'status' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'error' => 'error', -'failures' => 'failures', -'progress' => 'progress', -'status' => 'status' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'error' => 'setError', -'failures' => 'setFailures', -'progress' => 'setProgress', -'status' => 'setStatus' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'error' => 'getError', -'failures' => 'getFailures', -'progress' => 'getProgress', -'status' => 'getStatus' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - const STATUS_COMPLETED = 'completed'; -const STATUS_REINDEXING = 'reindexing'; -const STATUS_ERROR = 'error'; -const STATUS_FAILURE = 'failure'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStatusAllowableValues() - { - return [ - self::STATUS_COMPLETED, -self::STATUS_REINDEXING, -self::STATUS_ERROR, -self::STATUS_FAILURE, ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['error'] = isset($data['error']) ? $data['error'] : null; - $this->container['failures'] = isset($data['failures']) ? $data['failures'] : null; - $this->container['progress'] = isset($data['progress']) ? $data['progress'] : null; - $this->container['status'] = isset($data['status']) ? $data['status'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets error - * - * @return \DoofinderManagement\Model\ReindexingTaskError - */ - public function getError() - { - return $this->container['error']; - } - - /** - * Sets error - * - * @param \DoofinderManagement\Model\ReindexingTaskError $error error - * - * @return $this - */ - public function setError($error) - { - $this->container['error'] = $error; - - return $this; - } - - /** - * Gets failures - * - * @return string[] - */ - public function getFailures() - { - return $this->container['failures']; - } - - /** - * Sets failures - * - * @param string[] $failures If status is `failure` this contains a list of all failures recieved while reindexing. - * - * @return $this - */ - public function setFailures($failures) - { - $this->container['failures'] = $failures; - - return $this; - } - - /** - * Gets progress - * - * @return float - */ - public function getProgress() - { - return $this->container['progress']; - } - - /** - * Sets progress - * - * @param float $progress Indicates the progress of the reindexing operation. For instance, 0.5 means the task is half complete. - * - * @return $this - */ - public function setProgress($progress) - { - $this->container['progress'] = $progress; - - return $this; - } - - /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status Indicates the current status of the task. - * - * @return $this - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($status) && !in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for 'status', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ReindexingTaskError.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ReindexingTaskError.php deleted file mode 100644 index 4f0c991c..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/ReindexingTaskError.php +++ /dev/null @@ -1,322 +0,0 @@ - 'string', -'type' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'reason' => null, -'type' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'reason' => 'reason', -'type' => 'type' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'reason' => 'setReason', -'type' => 'setType' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'reason' => 'getReason', -'type' => 'getType' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; - $this->container['type'] = isset($data['type']) ? $data['type'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets reason - * - * @return string - */ - public function getReason() - { - return $this->container['reason']; - } - - /** - * Sets reason - * - * @param string $reason A verbose description of the error returned. - * - * @return $this - */ - public function setReason($reason) - { - $this->container['reason'] = $reason; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type Type of error - * - * @return $this - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Scroller.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Scroller.php deleted file mode 100644 index a16737a7..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/Scroller.php +++ /dev/null @@ -1,352 +0,0 @@ - '\DoofinderManagement\Model\Items', -'scroll_id' => 'string', -'total' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'items' => null, -'scroll_id' => null, -'total' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'items' => 'items', -'scroll_id' => 'scroll_id', -'total' => 'total' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'items' => 'setItems', -'scroll_id' => 'setScrollId', -'total' => 'setTotal' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'items' => 'getItems', -'scroll_id' => 'getScrollId', -'total' => 'getTotal' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['items'] = isset($data['items']) ? $data['items'] : null; - $this->container['scroll_id'] = isset($data['scroll_id']) ? $data['scroll_id'] : null; - $this->container['total'] = isset($data['total']) ? $data['total'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets items - * - * @return \DoofinderManagement\Model\Items - */ - public function getItems() - { - return $this->container['items']; - } - - /** - * Sets items - * - * @param \DoofinderManagement\Model\Items $items items - * - * @return $this - */ - public function setItems($items) - { - $this->container['items'] = $items; - - return $this; - } - - /** - * Gets scroll_id - * - * @return string - */ - public function getScrollId() - { - return $this->container['scroll_id']; - } - - /** - * Sets scroll_id - * - * @param string $scroll_id Unique identifier for the Scroller. The id should be provided for traversing all items. - * - * @return $this - */ - public function setScrollId($scroll_id) - { - $this->container['scroll_id'] = $scroll_id; - - return $this; - } - - /** - * Gets total - * - * @return int - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param int $total Total number of items fetched by the Scroller. - * - * @return $this - */ - public function setTotal($total) - { - $this->container['total'] = $total; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/SearchEngine.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/SearchEngine.php deleted file mode 100644 index ace461fe..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/SearchEngine.php +++ /dev/null @@ -1,508 +0,0 @@ - 'string', -'inactive' => 'bool', -'indices' => '\DoofinderManagement\Model\Indices', -'language' => 'string', -'name' => 'string', -'search_url' => 'string', -'site_url' => 'string', -'stopwords' => 'bool' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'hashid' => null, -'inactive' => null, -'indices' => null, -'language' => null, -'name' => null, -'search_url' => 'uri', -'site_url' => null, -'stopwords' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'hashid' => 'hashid', -'inactive' => 'inactive', -'indices' => 'indices', -'language' => 'language', -'name' => 'name', -'search_url' => 'search_url', -'site_url' => 'site_url', -'stopwords' => 'stopwords' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'hashid' => 'setHashid', -'inactive' => 'setInactive', -'indices' => 'setIndices', -'language' => 'setLanguage', -'name' => 'setName', -'search_url' => 'setSearchUrl', -'site_url' => 'setSiteUrl', -'stopwords' => 'setStopwords' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'hashid' => 'getHashid', -'inactive' => 'getInactive', -'indices' => 'getIndices', -'language' => 'getLanguage', -'name' => 'getName', -'search_url' => 'getSearchUrl', -'site_url' => 'getSiteUrl', -'stopwords' => 'getStopwords' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['hashid'] = isset($data['hashid']) ? $data['hashid'] : null; - $this->container['inactive'] = isset($data['inactive']) ? $data['inactive'] : null; - $this->container['indices'] = isset($data['indices']) ? $data['indices'] : null; - $this->container['language'] = isset($data['language']) ? $data['language'] : null; - $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['search_url'] = isset($data['search_url']) ? $data['search_url'] : null; - $this->container['site_url'] = isset($data['site_url']) ? $data['site_url'] : null; - $this->container['stopwords'] = isset($data['stopwords']) ? $data['stopwords'] : false; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['language'] === null) { - $invalidProperties[] = "'language' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets hashid - * - * @return string - */ - public function getHashid() - { - return $this->container['hashid']; - } - - /** - * Sets hashid - * - * @param string $hashid A unique code that identifies a search engine. - * - * @return $this - */ - public function setHashid($hashid) - { - $this->container['hashid'] = $hashid; - - return $this; - } - - /** - * Gets inactive - * - * @return bool - */ - public function getInactive() - { - return $this->container['inactive']; - } - - /** - * Sets inactive - * - * @param bool $inactive Indicates if the search engine has been deactivated and therefore it can not receive requests. - * - * @return $this - */ - public function setInactive($inactive) - { - $this->container['inactive'] = $inactive; - - return $this; - } - - /** - * Gets indices - * - * @return \DoofinderManagement\Model\Indices - */ - public function getIndices() - { - return $this->container['indices']; - } - - /** - * Sets indices - * - * @param \DoofinderManagement\Model\Indices $indices indices - * - * @return $this - */ - public function setIndices($indices) - { - $this->container['indices'] = $indices; - - return $this; - } - - /** - * Gets language - * - * @return string - */ - public function getLanguage() - { - return $this->container['language']; - } - - /** - * Sets language - * - * @param string $language An ISO 639-1 language code that determines the language of the search engine. The language affects how the words indexed are tokenized and which stopwords to use. - * - * @return $this - */ - public function setLanguage($language) - { - $this->container['language'] = $language; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name A short name that helps identifying the search engine. - * - * @return $this - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets search_url - * - * @return string - */ - public function getSearchUrl() - { - return $this->container['search_url']; - } - - /** - * Sets search_url - * - * @param string $search_url Indicates the search server domain for this search engine. If you want to do searches to this search engine you should use this domain. - * - * @return $this - */ - public function setSearchUrl($search_url) - { - $this->container['search_url'] = $search_url; - - return $this; - } - - /** - * Gets site_url - * - * @return string - */ - public function getSiteUrl() - { - return $this->container['site_url']; - } - - /** - * Sets site_url - * - * @param string $site_url The URL of the site to be integrated with the search engine. It determines the default allowed domains for requests. - * - * @return $this - */ - public function setSiteUrl($site_url) - { - $this->container['site_url'] = $site_url; - - return $this; - } - - /** - * Gets stopwords - * - * @return bool - */ - public function getStopwords() - { - return $this->container['stopwords']; - } - - /** - * Sets stopwords - * - * @param bool $stopwords Ignores high-frequency terms like \"the\", \"and\", \"is\". These words have a low weight and contribute little to the relevance score. - * - * @return $this - */ - public function setStopwords($stopwords) - { - $this->container['stopwords'] = $stopwords; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/SearchEngines.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/SearchEngines.php deleted file mode 100644 index 37b721b6..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/SearchEngines.php +++ /dev/null @@ -1,267 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsBannersResult.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsBannersResult.php deleted file mode 100644 index 967b4358..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsBannersResult.php +++ /dev/null @@ -1,322 +0,0 @@ - '\DoofinderManagement\Model\StatsBannersResultResults[]', -'total_count' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'results' => null, -'total_count' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'results' => 'results', -'total_count' => 'total_count' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'results' => 'setResults', -'total_count' => 'setTotalCount' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'results' => 'getResults', -'total_count' => 'getTotalCount' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['results'] = isset($data['results']) ? $data['results'] : null; - $this->container['total_count'] = isset($data['total_count']) ? $data['total_count'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets results - * - * @return \DoofinderManagement\Model\StatsBannersResultResults[] - */ - public function getResults() - { - return $this->container['results']; - } - - /** - * Sets results - * - * @param \DoofinderManagement\Model\StatsBannersResultResults[] $results results - * - * @return $this - */ - public function setResults($results) - { - $this->container['results'] = $results; - - return $this; - } - - /** - * Gets total_count - * - * @return int - */ - public function getTotalCount() - { - return $this->container['total_count']; - } - - /** - * Sets total_count - * - * @param int $total_count total_count - * - * @return $this - */ - public function setTotalCount($total_count) - { - $this->container['total_count'] = $total_count; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsBannersResultResults.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsBannersResultResults.php deleted file mode 100644 index d1f322c6..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsBannersResultResults.php +++ /dev/null @@ -1,321 +0,0 @@ - 'int', -'id' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'count' => null, -'id' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'count' => 'count', -'id' => 'id' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'count' => 'setCount', -'id' => 'setId' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'count' => 'getCount', -'id' => 'getId' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['id'] = isset($data['id']) ? $data['id'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets count - * - * @return int - */ - public function getCount() - { - return $this->container['count']; - } - - /** - * Sets count - * - * @param int $count count - * - * @return $this - */ - public function setCount($count) - { - $this->container['count'] = $count; - - return $this; - } - - /** - * Gets id - * - * @return int - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param int $id id - * - * @return $this - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsClicksResult.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsClicksResult.php deleted file mode 100644 index 505a5705..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsClicksResult.php +++ /dev/null @@ -1,267 +0,0 @@ -listInvalidProperties()) === 0; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsClicksResultInner.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsClicksResultInner.php deleted file mode 100644 index 273d0b53..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsClicksResultInner.php +++ /dev/null @@ -1,381 +0,0 @@ - 'int', -'dfid' => 'string', -'link' => 'string', -'title' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'count' => null, -'dfid' => null, -'link' => null, -'title' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'count' => 'count', -'dfid' => 'dfid', -'link' => 'link', -'title' => 'title' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'count' => 'setCount', -'dfid' => 'setDfid', -'link' => 'setLink', -'title' => 'setTitle' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'count' => 'getCount', -'dfid' => 'getDfid', -'link' => 'getLink', -'title' => 'getTitle' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['dfid'] = isset($data['dfid']) ? $data['dfid'] : null; - $this->container['link'] = isset($data['link']) ? $data['link'] : null; - $this->container['title'] = isset($data['title']) ? $data['title'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets count - * - * @return int - */ - public function getCount() - { - return $this->container['count']; - } - - /** - * Sets count - * - * @param int $count count - * - * @return $this - */ - public function setCount($count) - { - $this->container['count'] = $count; - - return $this; - } - - /** - * Gets dfid - * - * @return string - */ - public function getDfid() - { - return $this->container['dfid']; - } - - /** - * Sets dfid - * - * @param string $dfid dfid - * - * @return $this - */ - public function setDfid($dfid) - { - $this->container['dfid'] = $dfid; - - return $this; - } - - /** - * Gets link - * - * @return string - */ - public function getLink() - { - return $this->container['link']; - } - - /** - * Sets link - * - * @param string $link link - * - * @return $this - */ - public function setLink($link) - { - $this->container['link'] = $link; - - return $this; - } - - /** - * Gets title - * - * @return string - */ - public function getTitle() - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string $title title - * - * @return $this - */ - public function setTitle($title) - { - $this->container['title'] = $title; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsRedirectsResult.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsRedirectsResult.php deleted file mode 100644 index 257a82e1..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsRedirectsResult.php +++ /dev/null @@ -1,322 +0,0 @@ - '\DoofinderManagement\Model\StatsRedirectsResultResults[]', -'total_count' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'results' => null, -'total_count' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'results' => 'results', -'total_count' => 'total_count' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'results' => 'setResults', -'total_count' => 'setTotalCount' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'results' => 'getResults', -'total_count' => 'getTotalCount' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['results'] = isset($data['results']) ? $data['results'] : null; - $this->container['total_count'] = isset($data['total_count']) ? $data['total_count'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets results - * - * @return \DoofinderManagement\Model\StatsRedirectsResultResults[] - */ - public function getResults() - { - return $this->container['results']; - } - - /** - * Sets results - * - * @param \DoofinderManagement\Model\StatsRedirectsResultResults[] $results results - * - * @return $this - */ - public function setResults($results) - { - $this->container['results'] = $results; - - return $this; - } - - /** - * Gets total_count - * - * @return int - */ - public function getTotalCount() - { - return $this->container['total_count']; - } - - /** - * Sets total_count - * - * @param int $total_count total_count - * - * @return $this - */ - public function setTotalCount($total_count) - { - $this->container['total_count'] = $total_count; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsRedirectsResultResults.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsRedirectsResultResults.php deleted file mode 100644 index d54dba4a..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsRedirectsResultResults.php +++ /dev/null @@ -1,351 +0,0 @@ - 'int', -'link' => 'string', -'query' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'count' => null, -'link' => null, -'query' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'count' => 'count', -'link' => 'link', -'query' => 'query' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'count' => 'setCount', -'link' => 'setLink', -'query' => 'setQuery' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'count' => 'getCount', -'link' => 'getLink', -'query' => 'getQuery' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['link'] = isset($data['link']) ? $data['link'] : null; - $this->container['query'] = isset($data['query']) ? $data['query'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets count - * - * @return int - */ - public function getCount() - { - return $this->container['count']; - } - - /** - * Sets count - * - * @param int $count count - * - * @return $this - */ - public function setCount($count) - { - $this->container['count'] = $count; - - return $this; - } - - /** - * Gets link - * - * @return string - */ - public function getLink() - { - return $this->container['link']; - } - - /** - * Sets link - * - * @param string $link link - * - * @return $this - */ - public function setLink($link) - { - $this->container['link'] = $link; - - return $this; - } - - /** - * Gets query - * - * @return string - */ - public function getQuery() - { - return $this->container['query']; - } - - /** - * Sets query - * - * @param string $query query - * - * @return $this - */ - public function setQuery($query) - { - $this->container['query'] = $query; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTimeResult.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTimeResult.php deleted file mode 100644 index 70665f85..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTimeResult.php +++ /dev/null @@ -1,322 +0,0 @@ - '\DoofinderManagement\Model\StatsTimeResultResults[]', -'total_count' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'results' => null, -'total_count' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'results' => 'results', -'total_count' => 'total_count' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'results' => 'setResults', -'total_count' => 'setTotalCount' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'results' => 'getResults', -'total_count' => 'getTotalCount' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['results'] = isset($data['results']) ? $data['results'] : null; - $this->container['total_count'] = isset($data['total_count']) ? $data['total_count'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets results - * - * @return \DoofinderManagement\Model\StatsTimeResultResults[] - */ - public function getResults() - { - return $this->container['results']; - } - - /** - * Sets results - * - * @param \DoofinderManagement\Model\StatsTimeResultResults[] $results results - * - * @return $this - */ - public function setResults($results) - { - $this->container['results'] = $results; - - return $this; - } - - /** - * Gets total_count - * - * @return int - */ - public function getTotalCount() - { - return $this->container['total_count']; - } - - /** - * Sets total_count - * - * @param int $total_count total_count - * - * @return $this - */ - public function setTotalCount($total_count) - { - $this->container['total_count'] = $total_count; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTimeResultResults.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTimeResultResults.php deleted file mode 100644 index b19b37ae..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTimeResultResults.php +++ /dev/null @@ -1,321 +0,0 @@ - 'int', -'timestamp' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'count' => null, -'timestamp' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'count' => 'count', -'timestamp' => 'timestamp' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'count' => 'setCount', -'timestamp' => 'setTimestamp' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'count' => 'getCount', -'timestamp' => 'getTimestamp' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets count - * - * @return int - */ - public function getCount() - { - return $this->container['count']; - } - - /** - * Sets count - * - * @param int $count count - * - * @return $this - */ - public function setCount($count) - { - $this->container['count'] = $count; - - return $this; - } - - /** - * Gets timestamp - * - * @return int - */ - public function getTimestamp() - { - return $this->container['timestamp']; - } - - /** - * Sets timestamp - * - * @param int $timestamp timestamp - * - * @return $this - */ - public function setTimestamp($timestamp) - { - $this->container['timestamp'] = $timestamp; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTopSearchesResult.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTopSearchesResult.php deleted file mode 100644 index 13126635..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTopSearchesResult.php +++ /dev/null @@ -1,352 +0,0 @@ - '\DoofinderManagement\Model\StatsTopSearchesResultResults[]', -'total' => 'int', -'total_count' => 'int' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'results' => null, -'total' => null, -'total_count' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'results' => 'results', -'total' => 'total', -'total_count' => 'total_count' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'results' => 'setResults', -'total' => 'setTotal', -'total_count' => 'setTotalCount' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'results' => 'getResults', -'total' => 'getTotal', -'total_count' => 'getTotalCount' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['results'] = isset($data['results']) ? $data['results'] : null; - $this->container['total'] = isset($data['total']) ? $data['total'] : null; - $this->container['total_count'] = isset($data['total_count']) ? $data['total_count'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets results - * - * @return \DoofinderManagement\Model\StatsTopSearchesResultResults[] - */ - public function getResults() - { - return $this->container['results']; - } - - /** - * Sets results - * - * @param \DoofinderManagement\Model\StatsTopSearchesResultResults[] $results results - * - * @return $this - */ - public function setResults($results) - { - $this->container['results'] = $results; - - return $this; - } - - /** - * Gets total - * - * @return int - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param int $total total - * - * @return $this - */ - public function setTotal($total) - { - $this->container['total'] = $total; - - return $this; - } - - /** - * Gets total_count - * - * @return int - */ - public function getTotalCount() - { - return $this->container['total_count']; - } - - /** - * Sets total_count - * - * @param int $total_count total_count - * - * @return $this - */ - public function setTotalCount($total_count) - { - $this->container['total_count'] = $total_count; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTopSearchesResultResults.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTopSearchesResultResults.php deleted file mode 100644 index a2c65e6c..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/Model/StatsTopSearchesResultResults.php +++ /dev/null @@ -1,321 +0,0 @@ - 'int', -'query' => 'string' ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $swaggerFormats = [ - 'count' => null, -'query' => null ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerTypes() - { - return self::$swaggerTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function swaggerFormats() - { - return self::$swaggerFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'count' => 'count', -'query' => 'query' ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'count' => 'setCount', -'query' => 'setQuery' ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'count' => 'getCount', -'query' => 'getQuery' ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$swaggerModelName; - } - - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['count'] = isset($data['count']) ? $data['count'] : null; - $this->container['query'] = isset($data['query']) ? $data['query'] : null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets count - * - * @return int - */ - public function getCount() - { - return $this->container['count']; - } - - /** - * Sets count - * - * @param int $count count - * - * @return $this - */ - public function setCount($count) - { - $this->container['count'] = $count; - - return $this; - } - - /** - * Gets query - * - * @return string - */ - public function getQuery() - { - return $this->container['query']; - } - - /** - * Sets query - * - * @param string $query query - * - * @return $this - */ - public function setQuery($query) - { - $this->container['query'] = $query; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed - */ - public function offsetGet($offset) - { - return isset($this->container[$offset]) ? $this->container[$offset] : null; - } - - /** - * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} diff --git a/doofinder-for-woocommerce/lib/src/Management/PhpClient/ObjectSerializer.php b/doofinder-for-woocommerce/lib/src/Management/PhpClient/ObjectSerializer.php deleted file mode 100644 index e3a19140..00000000 --- a/doofinder-for-woocommerce/lib/src/Management/PhpClient/ObjectSerializer.php +++ /dev/null @@ -1,319 +0,0 @@ -format('Y-m-d') : $data->format(\DateTime::ATOM); - } elseif (is_array($data)) { - foreach ($data as $property => $value) { - $data[$property] = self::sanitizeForSerialization($value); - } - return $data; - } elseif (is_object($data)) { - $values = []; - $formats = $data::swaggerFormats(); - foreach ($data::swaggerTypes() as $property => $swaggerType) { - $getter = $data::getters()[$property]; - $value = $data->$getter(); - if ($value !== null - && !in_array($swaggerType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) - && method_exists($swaggerType, 'getAllowableEnumValues') - && !in_array($value, $swaggerType::getAllowableEnumValues())) { - $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); - } - if ($value !== null) { - $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $swaggerType, $formats[$property]); - } - } - return (object)$values; - } else { - return (string)$data; - } - } - - /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif - * - * @param string $filename filename to be sanitized - * - * @return string the sanitized filename - */ - public static function sanitizeFilename($filename) - { - if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { - return $match[1]; - } else { - return $filename; - } - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the path, by url-encoding. - * - * @param string $value a string which will be part of the path - * - * @return string the serialized object - */ - public static function toPathValue($value) - { - return rawurlencode(self::toString($value)); - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the query, by imploding comma-separated if it's an object. - * If it's a string, pass through unchanged. It will be url-encoded - * later. - * - * @param string[]|string|\DateTime $object an object to be serialized to a string - * - * @return string the serialized object - */ - public static function toQueryValue($object) - { - if (is_array($object)) { - return implode(',', $object); - } else { - return self::toString($object); - } - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the header. If it's a string, pass through unchanged - * If it's a datetime object, format it in ISO8601 - * - * @param string $value a string which will be part of the header - * - * @return string the header string - */ - public static function toHeaderValue($value) - { - return self::toString($value); - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the http body (form parameter). If it's a string, pass through unchanged - * If it's a datetime object, format it in ISO8601 - * - * @param string|\SplFileObject $value the value of the form parameter - * - * @return string the form string - */ - public static function toFormValue($value) - { - if ($value instanceof \SplFileObject) { - return $value->getRealPath(); - } else { - return self::toString($value); - } - } - - /** - * Take value and turn it into a string suitable for inclusion in - * the parameter. If it's a string, pass through unchanged - * If it's a datetime object, format it in ISO8601 - * - * @param string|\DateTime $value the value of the parameter - * - * @return string the header string - */ - public static function toString($value) - { - if ($value instanceof \DateTime) { // datetime in ISO8601 format - return $value->format(\DateTime::ATOM); - } else { - return $value; - } - } - - /** - * Serialize an array to a string. - * - * @param array $collection collection to serialize to a string - * @param string $collectionFormat the format use for serialization (csv, - * ssv, tsv, pipes, multi) - * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array - * - * @return string - */ - public static function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) - { - if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) { - // http_build_query() almost does the job for us. We just - // need to fix the result of multidimensional arrays. - return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); - } - switch ($collectionFormat) { - case 'pipes': - return implode('|', $collection); - - case 'tsv': - return implode("\t", $collection); - - case 'ssv': - return implode(' ', $collection); - - case 'csv': - // Deliberate fall through. CSV is default format. - default: - return implode(',', $collection); - } - } - - /** - * Deserialize a JSON string into an object - * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used - * - * @return object|array|null an single or an array of $class instances - */ - public static function deserialize($data, $class, $httpHeaders = null) - { - if (null === $data) { - return null; - } elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int] - $inner = substr($class, 4, -1); - $deserialized = []; - if (strrpos($inner, ",") !== false) { - $subClass_array = explode(',', $inner, 2); - $subClass = $subClass_array[1]; - foreach ($data as $key => $value) { - $deserialized[$key] = self::deserialize($value, $subClass, null); - } - } - return $deserialized; - } elseif (strcasecmp(substr($class, -2), '[]') === 0) { - $subClass = substr($class, 0, -2); - $values = []; - foreach ($data as $key => $value) { - $values[] = self::deserialize($value, $subClass, null); - } - return $values; - } elseif ($class === 'object' or is_array($data)) { - settype($data, 'array'); - return $data; - } elseif ($class === '\DoofinderManagement\Model\Item') { - $data = (object)$data; - return $data; - } elseif ($class === '\DateTime') { - // Some API's return an invalid, empty string as a - // date-time property. DateTime::__construct() will return - // the current time for empty input which is probably not - // what is meant. The invalid empty string is probably to - // be interpreted as a missing field/value. Let's handle - // this graceful. - if (!empty($data)) { - return new \DateTime($data); - } else { - return null; - } - } elseif (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { - settype($data, $class); - return $data; - } elseif ($class === '\SplFileObject') { - /** @var \Doofinder\Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (array_key_exists('Content-Disposition', $httpHeaders) && - preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); - } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); - } - fclose($file); - - return new \SplFileObject($filename, 'r'); - } elseif (method_exists($class, 'getAllowableEnumValues')) { - if (!in_array($data, $class::getAllowableEnumValues())) { - $imploded = implode("', '", $class::getAllowableEnumValues()); - throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); - } - return $data; - } else { - // If a discriminator is defined and points to a valid subclass, use it. - $discriminator = $class::DISCRIMINATOR; - if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = '{{invokerPackage}}\Model\\' . $data->{$discriminator}; - if (is_subclass_of($subclass, $class)) { - $class = $subclass; - } - } - $instance = new $class(); - foreach ($instance::swaggerTypes() as $property => $type) { - $propertySetter = $instance::setters()[$property]; - - if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) { - continue; - } - - $propertyValue = $data->{$instance::attributeMap()[$property]}; - if (isset($propertyValue)) { - $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); - } - } - return $instance; - } - } -} diff --git a/doofinder-for-woocommerce/lib/src/Search/Client.php b/doofinder-for-woocommerce/lib/src/Search/Client.php deleted file mode 100644 index 7fcc96a3..00000000 --- a/doofinder-for-woocommerce/lib/src/Search/Client.php +++ /dev/null @@ -1,561 +0,0 @@ -). - * Author:: @carlosescri (http://github.com/carlosescri) - * - * All credit goes to Gilles Devaux () - * (https://github.com/flaptor/indextank-php) - * - * License:: Apache License, Version 2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. You may obtain - * a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -namespace Doofinder\Search; - -use Doofinder\Search\Results; -use Doofinder\Search\Error; - -/** - * Doofinder\Search\Client - * - * Basic client to perform requests to Doofinder search servers. - */ -class Client { - const RPP = 10; - const OK = '"OK"'; - - private $_baseUrl = null; - private $_token = null; - - private $_customHeaders = array(); - private $_searchParams = array(); - private $_lastPage = 0; - - /** - * Create instances of this class. - * - * @param string $server - Search server name. - * i.e.: eu1-search.doofinder.com - * @param string $token - API Token. - * i.e: 76d48dfff9b014f3a28da2382a5bd98b7276445d - */ - public function __construct($server, $token) { - if (!preg_match('/^https?:/', $server)) { - $this->_baseUrl = sprintf('https://%s/5', $server); - } else { - $this->_baseUrl = sprintf('%s/5', $server); - } - $this->_token = $token; - } - - /** - * Convert dumped parameters to real parameters. - * - * Available options are: - * - * - prefix: If provided, will be removed from the name of each param. - * - queryParameter: If provided, will detect the query parameter using - * this value instead of the default 'query'. Must be unprefixed. - * - * @param array $params - Search parameters from $_REQUEST, $_GET or $_POST. - * @param array $options - Options array. - * - * @return Array - Array of parameters to be used for search. - */ - public function searchParams($params, $options = array()) { - $serializationOptions = $this->_buildSerializationOptions($options); - $prefix = $serializationOptions['prefix']; - $queryParameter = $serializationOptions['queryParameter']; - - $searchParams = []; - - foreach ($params as $key => $value) { - if ($key === $prefix.$queryParameter) { - $searchParams['query'] = $value; - } else if ($key = $this->_unprefixParam($key, $prefix)) { - $searchParams[$key] = $value; - } - } - - return $searchParams; - } - - /** - * Dump current search params to an assoc array. - * - * Available options are: - * - * - prefix: If provided, will be removed from the name of each param. - * - queryParameter: If provided, will dump the query parameter using - * this value instead of the default 'query'. Must be unprefixed. - * - * @param array $options - Options array. - * - * @return Array - Array of prefixed parameters. - */ - public function dumpParams($options = array()) { - $serializationOptions = $this->_buildSerializationOptions($options); - $prefix = $serializationOptions['prefix']; - $queryParameter = $serializationOptions['queryParameter']; - $params = []; - - foreach ($this->_searchParams as $key => $value) { - if ($key === 'query') { - $params[$prefix.$queryParameter] = $value; - } else { - $params[$prefix . $key] = $value; - } - } - - if (isset($serializationOptions['page'])) { - $params[$prefix . 'page'] = $serializationOptions['page']; - } - - return $params; - } - - /** - * Serialize current search parameters to string. - * - * Available options are: - * - * - prefix: If provided, will be removed from the name of each param. - * - queryParameter: If provided, will dump the query parameter using - * this value instead of the default 'query'. Must be unprefixed. - * - * @param array $options - Options array. - * - * @return string - A string representing the search parameters. - */ - public function qs($options = array()){ - $params = $this->dumpParams($options); - if (isset($options["page"])) { - $params["page"] = $options["page"]; - } - return http_build_query($params, '', '&'); - } - - /** - * Perform a search request. - * - * More information about search parameters here: - * - * https://www.doofinder.com/support/developer/api/search-api - * - * @example - * - * $client->search([ - * 'hashid' => '0123456789abcdef0123456789abcdef', - * 'query' => 'something', - * 'filter' => [ - * 'color' => ['red', 'green'], - * 'price' => [ - * 'gte' => 10, - * 'lte' => 50 - * ] - * ] - * ]); - * - * @param array $params - Search parameters as an associative array. - * - * @return Results - */ - public function search($searchParams = array()) { - $params = array_merge_recursive([], $searchParams); - - if (!isset($params['page'])) { - $params['page'] = 1; - } - - if (!isset($params['query_name']) && (!isset($params['query']) || !$params['query'])) { - $params['query_name'] = 'match_all'; - } - - $results = new Results($this->_request('/search', $params)); - $total = $results->getProperty('total'); - $rpp = $results->getProperty('results_per_page'); - - $this->_searchParams = array_merge($params, [ - 'query_name' => $results->getProperty('query_name') - ]); - $this->_lastPage = ceil($total / $rpp); - - return $results; - } - - /** - * Get the next set of results from the last search. - * - * @return Results - * @return null - */ - public function getNextPage() { - if ($this->_searchParams['page'] < $this->_lastPage) { - $this->_searchParams['page'] += 1; - return $this->search($this->_searchParams); - } else { - return null; - } - } - - /** - * Get the previous set of results from the last search. - * - * @return Results - * @return null - */ - public function getPreviousPage() { - if ($this->_searchParams['page'] > 1) { - $this->_searchParams['page'] -= 1; - return $this->search($this->_searchParams); - } else { - return null; - } - } - - /** - * Get a search parameter value from the client status. - * - * @param string $key - Parameter name. - * @param string $default - Default value if the parameter does not exist. - * @return mixed - */ - public function getSearchParam($key, $default = null) { - return array_key_exists($key, $this->_searchParams) ? $this->_searchParams[$key] : $default; - } - - public function getTotalPages() { - return $this->_lastPage; - } - - /** - * Generate a hash to be used as a session id. - * - * @return string - */ - public function createSessionId() { - $time = time(); - $rand = rand(); - return md5("$time$rand"); - } - - /** - * Register a session id in Doofinder. - * - * @param string $sessionId - * @param string $hashid - * - * @return boolean - */ - public function registerSession($sessionId, $hashid){ - $params = array( - 'session_id' => $sessionId, - 'hashid' => $hashid, - ); - return $this->_request('/stats/init', $params) == self::OK; - } - - /** - * Register a click on a result in Doofinder. - * - * Available options are: - * - * - datatype: If provided, the $id parameter is considered the id of - * the item in your database. - * - query: The search terms used to find the item being registered. - * - custom_results_id: The id of the custom result that matched the - * query. - * - * @param string $sessionId - * @param string $hashid - * @param string $id - The "doofinder id" associated to the item. If a - * datatype is provided via $options, this will - * represent the "id" provided for the item when - * indexed. - * @param array $options - * - * @return boolean - */ - public function registerClick($sessionId, $hashid, $id, $options = []) { - $params = array( - 'session_id' => $sessionId, - 'hashid' => $hashid, - ); - - if (isset($options['datatype'])) { - $params['id'] = $id; - $params['datatype'] = $options['datatype']; - } else { - $params['dfid'] = $id; - } - - $params = array_merge($params, $options); - - return $this->_request('/stats/click', $params) === self::OK; - } - - /** - * Register a checkout for the provided session id and hashid. - * - * @param string $sessionId - * @param string $hashid - * - * @return boolean - */ - public function registerCheckout($sessionId, $hashid) { - $params = array( - 'session_id' => $sessionId, - 'hashid' => $hashid, - ); - return $this->_request('/stats/checkout', $params) == self::OK; - } - - /** - * Register a click on a banner image. - * - * @param string $sessionId - * @param string $hashid - * @param string $img_id - Id of the image (from the search response). - * - * @return boolean - */ - public function registerImageClick($sessionId, $hashid, $imageId){ - $params = array( - 'session_id' => $sessionId, - 'hashid' => $hashid, - 'img_id' => $imageId, - ); - return $this->_request('/stats/img_click', $params) == self::OK; - } - - /** - * Register a redirection. - * - * Available options are: - * - * - query: the search terms that made the redirection match. - * - * @param string $sessionId - * @param string $hashid - * @param string $redirectionId - Id of the redirecton (from search response). - * @param string $link - Target link. - * @param array $options - * - * @return boolean - */ - public function registerRedirection($sessionId, $hashid, $redirectionId, $link, $options = []) { - $params = array_merge([ - 'session_id' => $sessionId, - 'hashid' => $hashid, - 'redirection_id' => $redirectionId, - 'link' => $link, - ], $options); - return $this->_request('/stats/redirect', $params) == self::OK; - } - - /** - * Adds an amount of item to the cart in the current session. - * - * The cart will be automatically stored in stats if there's any call - * to registerCheckout. If the item is already in the cart, the amount - * is automatically added to the current amount. - * - * Available options are: - * - * - datatype: If provided, the $id parameter is considered the id of - * the item in your database. - * - custom_results_id: The id of the custom result that matched the - * query. - * - * @param string $sessionId - * @param string $hashid - * @param string $id - The "doofinder id" associated to the item. If a - * datatype is provided via $options, this will - * represent the "id" provided for the item when - * indexed. - * @param string $amount - number of items to add. - * @param array $options - * - * @return boolean - */ - public function addToCart($sessionId, $hashid, $id, $amount, $options = []) { - $params = array_merge([ - 'session_id' => $sessionId, - 'hashid' => $hashid, - 'item_id' => $id, - 'amount' => $amount - ], $options); - return $this->_request('/stats/add-to-cart', $params) == self::OK; - } - - /** - * Removes an amount of item from the cart in the current session. - * - * The cart will be automatically stored in stats if there's any call - * to registerCheckout. If any of the items' amount drops to zero or - * below, it is automatically removed from the cart - * - * Available options are: - * - * - datatype: If provided, the $id parameter is considered the id of - * the item in your database. - * - custom_results_id: The id of the custom result that matched the - * query. - * - * @param string $sessionId - * @param string $hashid - * @param string $id - The "doofinder id" associated to the item. If a - * datatype is provided via $options, this will - * represent the "id" provided for the item when - * indexed. - * @param string $amount - number of items to remove. - * @param array $options - * - * @return boolean - */ - public function removeFromCart($sessionId, $hashid, $id, $amount, $options = []) { - $params = array_merge([ - 'session_id' => $sessionId, - 'hashid' => $hashid, - 'item_id' => $id, - 'amount' => $amount - ], $options); - return $this->_request('/stats/remove-from-cart', $params) == self::OK; - } - - /** - * Clears the cart in the current session. - * - * @param string $sessionId - * @param string $hashid - * - * @return boolean - */ - public function clearCart($sessionId, $hashid) { - $params = [ - 'session_id' => $sessionId, - 'hashid' => $hashid, - ]; - return $this->_request('/stats/clear-cart', $params) == self::OK; - } - - /** - * setCustomHeaders - * - * adds extra headers to be sent in every request - * @param array $extraHeaders - * @return void - */ - public function setCustomHeaders($headers = array()){ - $this->_customHeaders = $headers; - } - - // - // Private - // - - private function _buildSerializationOptions($options = array()) { - return array_merge( - array( - 'prefix' => '', - 'queryParameter' => 'query', - ), - $options - ); - } - - private function _unprefixParam($name, $prefix = '') { - $unprefixPattern = '/^'.$prefix.'/'; - $doofinderParams = array( - 'hashid', 'query', - 'page', 'rpp', 'timeout', 'types', - 'filter', 'query_name', 'transformer', - 'sort', 'exclude' - ); - $pos = strpos($name, '['); - - if ($pos > 0) { - $key = substr($name, 0, $pos); - } else { - $key = $name; - } - - $key = preg_replace($unprefixPattern, '', $key); - - if (in_array($key, $doofinderParams)) { - return preg_replace($unprefixPattern, '', $name); - } else { - return null; - } - } - - private function _getRequestUrl($entryPoint, $params = array()) { - $url = $this->_baseUrl.$entryPoint; - - if (count($params)) { - $params = http_build_query($this->_sanitize($params), '', '&'); - $url .= "?".$params; - } - - return $url; - } - - private function _getRequestHeaders(){ - $headers = array(); - $headers[] = 'Expect:'; // Fixes HTTP/1.1 "417 Expectation Failed" Error - $headers[] = sprintf("Authorization: Token %s", $this->_token); - - foreach($this->_customHeaders as $name => $value){ - $headers[] = sprintf("%s: %s", $name, $value); - } - return $headers; - } - - private function _request($entryPoint, $params = array()){ - $url = $this->_getRequestUrl($entryPoint, $params); - $headers = $this->_getRequestHeaders(); - - $session = curl_init($url); - // Configure cURL to return response but not headers - curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'GET'); - curl_setopt($session, CURLOPT_HEADER, false); - curl_setopt($session, CURLOPT_RETURNTRANSFER, true); - curl_setopt($session, CURLOPT_HTTPHEADER, $headers); - $response = curl_exec($session); - $statusCode = curl_getinfo($session, CURLINFO_HTTP_CODE); - curl_close($session); - - if (floor($statusCode / 100) == 2) { - return $response; - } else { - throw new Error($statusCode.' - '.$response, $statusCode); - } - } - - private function _sanitize($params) { - $result = array(); - - foreach ($params as $name => $value) { - if (is_array($value)) { - $result[$name] = $this->_sanitize($value); - } else if (trim($value)) { - $result[$name] = $value; - } else if($value === 0) { - $result[$name] = $value; - } - } - - return $result; - } -} diff --git a/doofinder-for-woocommerce/lib/src/Search/Error.php b/doofinder-for-woocommerce/lib/src/Search/Error.php deleted file mode 100644 index a4401ce2..00000000 --- a/doofinder-for-woocommerce/lib/src/Search/Error.php +++ /dev/null @@ -1,10 +0,0 @@ - - * @author carlosescri - * - * Results - * - * Very thin wrapper of the results obtained from the doofinder server - * it holds two accessors: - * - * - getProperty : get single property of the search results (rpp, page, etc..) - * - getResults: get an array with the results - */ -class Results { - - // doofinder status - const SUCCESS = 'success'; // everything ok - const NOTFOUND = 'notfound'; // no account with the provided hashid found - const EXHAUSTED = 'exhausted'; // the account has reached its query limit - - private $properties = array(); - private $results = array(); - private $facets = array(); - private $filter = array(); - - public $status = null; - - /** - * Constructor - * - * @param string $jsonResponse JSON returned by the Doofinder search server - */ - public function __construct($jsonResponse) { - $response = json_decode($jsonResponse, true); - - foreach ($response as $key => $value){ - if (!is_array($value)) { - $this->properties[$key] = $value; - } - } - - // Status - if (isset($this->properties['doofinder_status'])) { - $this->status = $this->properties['doofinder_status']; - } else { - $this->status = self::SUCCESS; - } - - // Results - if (isset($response['results'])) { - $this->results = $response['results']; - } - - // Redirections - if (isset($response['redirection'])) { - $this->properties['redirection'] = $response['redirection']; - } - - // Banner - if(isset($response['banner'])) { - $this->properties['banner'] = $response['banner']; - } - - // Build a "friendly" filters array - if (isset($response['filter'])) { - foreach($response['filter'] as $filterType => $filters) { - foreach($filters as $filterName => $filterProperties) { - $this->filter[$filterName] = $filterProperties; - } - } - } - - // facets - if (isset($response['facets'])) { - $this->facets = $response['facets']; - } - - // mark "selected" true or false according to filters presence - foreach ($this->facets as $name => $properties) { - switch (true) { - case isset($properties['terms']): - foreach($properties['terms']['buckets'] as $idx => $bucket) { - $this->facets[$name]['terms']['buckets'][$idx]['selected'] = isset($this->filter[$name]) && - in_array($bucket['key'], $this->filter[$name]); - } - break; - case isset($properties['range']): - foreach(array_keys($properties['range']['buckets']) as $idx) { - $this->facets[$name]['range']['buckets'][$idx]['selected_from'] = isset($this->filter[$name]['gte']) ? $this->filter[$name]['gte'] : false; - $this->facets[$name]['range']['buckets'][$idx]['selected_to'] = isset($this->filter[$name]['lte']) ? $this->filter[$name]['lte'] : false; - } - break; - } - } - } - - /** - * getProperty - * - * get single property from the results - * @param string $name: 'results_per_page', 'query', 'max_score', 'page', 'total', 'hashid' - * @return mixed the value of the property - */ - public function getProperty($name) { - return array_key_exists($name, $this->properties) ? $this->properties[$name] : null; - } - - /** - * getResults - * - * @return array search results. at the moment, only the 'cooked' version. - * Each result is of the form: - * array('header'=>..., - * 'body' => .., - * 'price' => .., - * 'href' => ..., - * 'image' => ..., - * 'type' => ..., - * 'id' => ..) - */ - public function getResults(){ - return $this->results; - } - - /** - * - * getFacetsNames - * - * @return array facets names. - */ - public function getFacetsNames(){ - return array_keys($this->facets); - } - - /** - * getLegacyFacet - * - * @param string name the facet name whose results are wanted - * - * @return array facet search data raw from the search server - * - * - for terms facets - * array( - * "doc_count" => 1819, // # number of possible terms for this facet - * 'terms'=> array( - * "buckets" => array( - * array( - * "key"=>"France", - * "doc_count"=> 1653, - * "selected" => true // only if this term is selected by user. - * ), - * array("key"=>"Spain", "doc_count"=> 332) - * ), - * .... - * ) - * - * - for range facets - * array( - * "doc_count" => 4482, - * 'range'=> array( - * "buckets" => array( - * array( - * "key"=>"0.0-", - * "from"=> 0, "from_as_string"=> "0,0","doc_count"=> 165, - * "stats" => array( - * "count" => 165, - * "min" => 0, - * "max" => 23.2, - * 'selected_from'=> 34.3 // if present, - * // this value has been used as filter. - * // false otherwise - * 'selected_to'=> 99.3 // if present. - * // this value has been used as filter. - * // false otherwise - * ... - * ) - * ) - * ) - * ) - * - * - */ - public function getLegacyFacet($facetName){ - return $this->facets[$facetName]; - } - - /** - * getFacet - * - * @param string name the facet whose results are wanted - * - * @return array facet inforation - * - * - for term facets - * array( - * 'count' => 232, - * 'terms' => array( - * array( - * 'term' => 'France', - * 'count' => 23, - * 'selected' => false // if previously selected as a filter - * ), - * array('term' => 'Spain', 'count' => 2, 'selected' => true), - * ... - * ) - * - for range facets - * array( - * 'count' => 232, - * 'from' => 23.2, - * 'to' => 443.1, - * 'selected_from' => 44, // if se;ected as filter. false otherwise - * 'selected_to' => 401 // if selected as filter - * ) - */ - public function getFacet($facetName){ - $facetProperties = $this->facets[$facetName]; - switch(true) { - case isset($facetProperties['terms']): - return array( - "count" => $facetProperties['doc_count'], - 'terms' => array_map( - function($el) { - return array( - 'term' => $el['key'], - 'count' => $el['doc_count'], - 'selected' => isset($el['selected']) - ); - }, - $facetProperties['terms']['buckets']) - ); - case isset($facetProperties['range']): - $bucket = $facetProperties['range']['buckets'][0]; - return array( - 'count' => $bucket['stats']['count'], - 'from' => $bucket['stats']['min'], - 'to' => $bucket['stats']['max'], - 'selected_from' => isset($bucket['selected_from']) ? $bucket['selected_from'] : false, - 'selected_to' => isset($bucket['selected_to']) ? $bucket['selected_to'] : false - ); - default: - break; - } - - } - - /** - * getFacets - * - * get the whole facets associative array: - * array('color'=>array(...), 'brand'=>array(...)) - * each array is defined as in getFacet() docstring - * - * @return array facets assoc. array - */ - public function getFacets(){ - return $this->facets; - } - - /** - * getAppliedFilters - * - * get the filters the query has defined - * array('categories' => array( // filter name . same as facet name - * 'Sillas de paseo', // if simple array, it's a terms facet - * 'Sacos sillas de paseo' - * ), - * 'color' => array( - * 'red', - * 'blue' - * ), - * 'price' => array( - * 'include_upper'=>true, // if 'from' , 'to' keys, it's a range facet - * 'from'=>35.19, - * 'to'=>9999 - * ) - * ) - * MEANING OF THE EXAMPLE FILTER: - * "FROM the query results, filter only results that have ('Sillas de paseo' OR 'Sacos sillas de paseo') categories - * AND ('red' OR 'blue') color AND price is BETWEEN 34.3 and 99.3" - - */ - public function getAppliedFilters(){ - return $this->filter; - } - - /** - * isOk - * - * checks if all went well - * @return boolean true if the status is 'success'. - * false if the status is not. - */ - public function isOk() { - return $this->status == self::SUCCESS; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/autoload.php b/doofinder-for-woocommerce/lib/vendor/autoload.php deleted file mode 100644 index 028ca150..00000000 --- a/doofinder-for-woocommerce/lib/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Doofinder\Symfony\Component', __DIR__.'/component'); - * $loader->add('Doofinder\Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Doofinder\Symfony\Component - * namespace or one of its children (Doofinder\Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Doofinder\Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - private $vendorDir; - - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - private static $registeredLoaders = array(); - - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - } - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - /** - * Returns the currently registered loaders indexed by their corresponding vendor directories. - * - * @return self[] - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath . '\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/doofinder-for-woocommerce/lib/vendor/composer/InstalledVersions.php b/doofinder-for-woocommerce/lib/vendor/composer/InstalledVersions.php deleted file mode 100644 index b98e4c7b..00000000 --- a/doofinder-for-woocommerce/lib/vendor/composer/InstalledVersions.php +++ /dev/null @@ -1,364 +0,0 @@ - - array ( - 'pretty_version' => '6.1.4', - 'version' => '6.1.4.0', - 'aliases' => - array ( - ), - 'reference' => NULL, - 'name' => 'doofinder/doofinder', - ), - 'versions' => - array ( - 'doofinder/doofinder' => - array ( - 'pretty_version' => '6.1.4', - 'version' => '6.1.4.0', - 'aliases' => - array ( - ), - 'reference' => NULL, - ), - 'guzzlehttp/guzzle' => - array ( - 'pretty_version' => '6.5.5', - 'version' => '6.5.5.0', - 'aliases' => - array ( - ), - 'reference' => '9d4290de1cfd701f38099ef7e183b64b4b7b0c5e', - ), - 'guzzlehttp/promises' => - array ( - 'pretty_version' => '1.4.1', - 'version' => '1.4.1.0', - 'aliases' => - array ( - ), - 'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d', - ), - 'guzzlehttp/psr7' => - array ( - 'pretty_version' => '1.8.2', - 'version' => '1.8.2.0', - 'aliases' => - array ( - ), - 'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91', - ), - 'psr/http-message' => - array ( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'aliases' => - array ( - ), - 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', - ), - 'psr/http-message-implementation' => - array ( - 'provided' => - array ( - 0 => '1.0', - ), - ), - 'ralouphie/getallheaders' => - array ( - 'pretty_version' => '3.0.3', - 'version' => '3.0.3.0', - 'aliases' => - array ( - ), - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', - ), - 'symfony/polyfill-intl-idn' => - array ( - 'pretty_version' => 'v1.23.0', - 'version' => '1.23.0.0', - 'aliases' => - array ( - ), - 'reference' => '65bd267525e82759e7d8c4e8ceea44f398838e65', - ), - 'symfony/polyfill-intl-normalizer' => - array ( - 'pretty_version' => 'v1.23.0', - 'version' => '1.23.0.0', - 'aliases' => - array ( - ), - 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', - ), - 'symfony/polyfill-php72' => - array ( - 'pretty_version' => 'v1.23.0', - 'version' => '1.23.0.0', - 'aliases' => - array ( - ), - 'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976', - ), - ), -); -private static $canGetVendors; -private static $installedByVendor = array(); - - - - - - - -public static function getInstalledPackages() -{ -$packages = array(); -foreach (self::getInstalled() as $installed) { -$packages[] = array_keys($installed['versions']); -} - -if (1 === \count($packages)) { -return $packages[0]; -} - -return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); -} - - - - - - - - - -public static function isInstalled($packageName) -{ -foreach (self::getInstalled() as $installed) { -if (isset($installed['versions'][$packageName])) { -return true; -} -} - -return false; -} - - - - - - - - - - - - - - -public static function satisfies(VersionParser $parser, $packageName, $constraint) -{ -$constraint = $parser->parseConstraints($constraint); -$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - -return $provided->matches($constraint); -} - - - - - - - - - - -public static function getVersionRanges($packageName) -{ -foreach (self::getInstalled() as $installed) { -if (!isset($installed['versions'][$packageName])) { -continue; -} - -$ranges = array(); -if (isset($installed['versions'][$packageName]['pretty_version'])) { -$ranges[] = $installed['versions'][$packageName]['pretty_version']; -} -if (array_key_exists('aliases', $installed['versions'][$packageName])) { -$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); -} -if (array_key_exists('replaced', $installed['versions'][$packageName])) { -$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); -} -if (array_key_exists('provided', $installed['versions'][$packageName])) { -$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); -} - -return implode(' || ', $ranges); -} - -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - - - - - -public static function getVersion($packageName) -{ -foreach (self::getInstalled() as $installed) { -if (!isset($installed['versions'][$packageName])) { -continue; -} - -if (!isset($installed['versions'][$packageName]['version'])) { -return null; -} - -return $installed['versions'][$packageName]['version']; -} - -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - - - - - -public static function getPrettyVersion($packageName) -{ -foreach (self::getInstalled() as $installed) { -if (!isset($installed['versions'][$packageName])) { -continue; -} - -if (!isset($installed['versions'][$packageName]['pretty_version'])) { -return null; -} - -return $installed['versions'][$packageName]['pretty_version']; -} - -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - - - - - -public static function getReference($packageName) -{ -foreach (self::getInstalled() as $installed) { -if (!isset($installed['versions'][$packageName])) { -continue; -} - -if (!isset($installed['versions'][$packageName]['reference'])) { -return null; -} - -return $installed['versions'][$packageName]['reference']; -} - -throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); -} - - - - - -public static function getRootPackage() -{ -$installed = self::getInstalled(); - -return $installed[0]['root']; -} - - - - - - - -public static function getRawData() -{ -return self::$installed; -} - - - - - - - - - - - - - - - - - - - -public static function reload($data) -{ -self::$installed = $data; -self::$installedByVendor = array(); -} - - - - - -private static function getInstalled() -{ -if (null === self::$canGetVendors) { -self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); -} - -$installed = array(); - -if (self::$canGetVendors) { -foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { -if (isset(self::$installedByVendor[$vendorDir])) { -$installed[] = self::$installedByVendor[$vendorDir]; -} elseif (is_file($vendorDir.'/composer/installed.php')) { -$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; -} -} -} - -$installed[] = self::$installed; - -return $installed; -} -} diff --git a/doofinder-for-woocommerce/lib/vendor/composer/LICENSE b/doofinder-for-woocommerce/lib/vendor/composer/LICENSE deleted file mode 100644 index f27399a0..00000000 --- a/doofinder-for-woocommerce/lib/vendor/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/doofinder-for-woocommerce/lib/vendor/composer/autoload_classmap.php b/doofinder-for-woocommerce/lib/vendor/composer/autoload_classmap.php deleted file mode 100644 index fd407a3a..00000000 --- a/doofinder-for-woocommerce/lib/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,11 +0,0 @@ - $vendorDir . '/composer/InstalledVersions.php', - 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', -); diff --git a/doofinder-for-woocommerce/lib/vendor/composer/autoload_files.php b/doofinder-for-woocommerce/lib/vendor/composer/autoload_files.php deleted file mode 100644 index cb6b596e..00000000 --- a/doofinder-for-woocommerce/lib/vendor/composer/autoload_files.php +++ /dev/null @@ -1,16 +0,0 @@ - $vendorDir . '/symfony/polyfill-php72/bootstrap.php', - 'doofinder-e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', - 'doofinder-7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', - 'doofinder-f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', - 'doofinder-a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', - 'doofinder-c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', - 'doofinder-37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', -); diff --git a/doofinder-for-woocommerce/lib/vendor/composer/autoload_namespaces.php b/doofinder-for-woocommerce/lib/vendor/composer/autoload_namespaces.php deleted file mode 100644 index b7fc0125..00000000 --- a/doofinder-for-woocommerce/lib/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,9 +0,0 @@ - array($vendorDir . '/symfony/polyfill-php72'), - 'Doofinder\\Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'), - 'Doofinder\\Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'), - 'Doofinder\\Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), - 'Doofinder\\GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), - 'Doofinder\\GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), - 'Doofinder\\GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), - 'Doofinder\\Search\\' => array($baseDir . '/src/Search'), - 'Doofinder\\Management\\' => array($baseDir . '/src/Management'), - 'DoofinderManagement\\' => array($baseDir . '/src/Management/PhpClient'), -); diff --git a/doofinder-for-woocommerce/lib/vendor/composer/autoload_real.php b/doofinder-for-woocommerce/lib/vendor/composer/autoload_real.php deleted file mode 100644 index 1ac8e9b2..00000000 --- a/doofinder-for-woocommerce/lib/vendor/composer/autoload_real.php +++ /dev/null @@ -1,75 +0,0 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInite4347481888f85b2a11eb6b99e9e56cd::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInite4347481888f85b2a11eb6b99e9e56cd::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequiree4347481888f85b2a11eb6b99e9e56cd($fileIdentifier, $file); - } - - return $loader; - } -} - -function composerRequiree4347481888f85b2a11eb6b99e9e56cd($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/composer/autoload_static.php b/doofinder-for-woocommerce/lib/vendor/composer/autoload_static.php deleted file mode 100644 index 734f296a..00000000 --- a/doofinder-for-woocommerce/lib/vendor/composer/autoload_static.php +++ /dev/null @@ -1,101 +0,0 @@ - __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', - 'doofinder-e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', - 'doofinder-7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', - 'doofinder-f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', - 'doofinder-a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', - 'doofinder-c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', - 'doofinder-37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', - ); - - public static $prefixLengthsPsr4 = array ( - 'S' => - array ( - 'Doofinder\\Symfony\\Polyfill\\Php72\\' => 23, - 'Doofinder\\Symfony\\Polyfill\\Intl\\Normalizer\\' => 33, - 'Doofinder\\Symfony\\Polyfill\\Intl\\Idn\\' => 26, - ), - 'P' => - array ( - 'Doofinder\\Psr\\Http\\Message\\' => 17, - ), - 'G' => - array ( - 'Doofinder\\GuzzleHttp\\Psr7\\' => 16, - 'Doofinder\\GuzzleHttp\\Promise\\' => 19, - 'Doofinder\\GuzzleHttp\\' => 11, - ), - 'D' => - array ( - 'Doofinder\\Search\\' => 17, - 'Doofinder\\Management\\' => 21, - 'DoofinderManagement\\' => 20, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Doofinder\\Symfony\\Polyfill\\Php72\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-php72', - ), - 'Doofinder\\Symfony\\Polyfill\\Intl\\Normalizer\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', - ), - 'Doofinder\\Symfony\\Polyfill\\Intl\\Idn\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn', - ), - 'Doofinder\\Psr\\Http\\Message\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/http-message/src', - ), - 'Doofinder\\GuzzleHttp\\Psr7\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', - ), - 'Doofinder\\GuzzleHttp\\Promise\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', - ), - 'Doofinder\\GuzzleHttp\\' => - array ( - 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', - ), - 'Doofinder\\Search\\' => - array ( - 0 => __DIR__ . '/../..' . '/src/Search', - ), - 'Doofinder\\Management\\' => - array ( - 0 => __DIR__ . '/../..' . '/src/Management', - ), - 'DoofinderManagement\\' => - array ( - 0 => __DIR__ . '/../..' . '/src/Management/PhpClient', - ), - ); - - public static $classMap = array ( - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInite4347481888f85b2a11eb6b99e9e56cd::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInite4347481888f85b2a11eb6b99e9e56cd::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInite4347481888f85b2a11eb6b99e9e56cd::$classMap; - - }, null, ClassLoader::class); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/composer/installed.php b/doofinder-for-woocommerce/lib/vendor/composer/installed.php deleted file mode 100644 index 42f48742..00000000 --- a/doofinder-for-woocommerce/lib/vendor/composer/installed.php +++ /dev/null @@ -1,103 +0,0 @@ - - array ( - 'pretty_version' => '6.1.4', - 'version' => '6.1.4.0', - 'aliases' => - array ( - ), - 'reference' => NULL, - 'name' => 'doofinder/doofinder', - ), - 'versions' => - array ( - 'doofinder/doofinder' => - array ( - 'pretty_version' => '6.1.4', - 'version' => '6.1.4.0', - 'aliases' => - array ( - ), - 'reference' => NULL, - ), - 'guzzlehttp/guzzle' => - array ( - 'pretty_version' => '6.5.5', - 'version' => '6.5.5.0', - 'aliases' => - array ( - ), - 'reference' => '9d4290de1cfd701f38099ef7e183b64b4b7b0c5e', - ), - 'guzzlehttp/promises' => - array ( - 'pretty_version' => '1.4.1', - 'version' => '1.4.1.0', - 'aliases' => - array ( - ), - 'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d', - ), - 'guzzlehttp/psr7' => - array ( - 'pretty_version' => '1.8.2', - 'version' => '1.8.2.0', - 'aliases' => - array ( - ), - 'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91', - ), - 'psr/http-message' => - array ( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'aliases' => - array ( - ), - 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363', - ), - 'psr/http-message-implementation' => - array ( - 'provided' => - array ( - 0 => '1.0', - ), - ), - 'ralouphie/getallheaders' => - array ( - 'pretty_version' => '3.0.3', - 'version' => '3.0.3.0', - 'aliases' => - array ( - ), - 'reference' => '120b605dfeb996808c31b6477290a714d356e822', - ), - 'symfony/polyfill-intl-idn' => - array ( - 'pretty_version' => 'v1.23.0', - 'version' => '1.23.0.0', - 'aliases' => - array ( - ), - 'reference' => '65bd267525e82759e7d8c4e8ceea44f398838e65', - ), - 'symfony/polyfill-intl-normalizer' => - array ( - 'pretty_version' => 'v1.23.0', - 'version' => '1.23.0.0', - 'aliases' => - array ( - ), - 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', - ), - 'symfony/polyfill-php72' => - array ( - 'pretty_version' => 'v1.23.0', - 'version' => '1.23.0.0', - 'aliases' => - array ( - ), - 'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976', - ), - ), -); diff --git a/doofinder-for-woocommerce/lib/vendor/composer/platform_check.php b/doofinder-for-woocommerce/lib/vendor/composer/platform_check.php deleted file mode 100644 index 6d3407db..00000000 --- a/doofinder-for-woocommerce/lib/vendor/composer/platform_check.php +++ /dev/null @@ -1,26 +0,0 @@ -= 70100)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.'; -} - -if ($issues) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); - } elseif (!headers_sent()) { - echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; - } - } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR - ); -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/LICENSE b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/LICENSE deleted file mode 100644 index 50a177b0..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011-2018 Michael Dowling, https://github.com/mtdowling - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Client.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Client.php deleted file mode 100644 index 5abb0ac4..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Client.php +++ /dev/null @@ -1,501 +0,0 @@ - 'http://www.foo.com/1.0/', - * 'timeout' => 0, - * 'allow_redirects' => false, - * 'proxy' => '192.168.16.1:10' - * ]); - * - * Client configuration settings include the following options: - * - * - handler: (callable) Function that transfers HTTP requests over the - * wire. The function is called with a Psr7\Http\Message\RequestInterface - * and array of transfer options, and must return a - * Doofinder\GuzzleHttp\Promise\PromiseInterface that is fulfilled with a - * Psr7\Http\Message\ResponseInterface on success. - * If no handler is provided, a default handler will be created - * that enables all of the request options below by attaching all of the - * default middleware to the handler. - * - base_uri: (string|UriInterface) Base URI of the client that is merged - * into relative URIs. Can be a string or instance of UriInterface. - * - **: any request option - * - * @param array $config Client configuration settings. - * - * @see \Doofinder\GuzzleHttp\RequestOptions for a list of available request options. - */ - public function __construct(array $config = []) - { - if (!isset($config['handler'])) { - $config['handler'] = HandlerStack::create(); - } elseif (!is_callable($config['handler'])) { - throw new \InvalidArgumentException('handler must be a callable'); - } - - // Convert the base_uri to a UriInterface - if (isset($config['base_uri'])) { - $config['base_uri'] = Psr7\uri_for($config['base_uri']); - } - - $this->configureDefaults($config); - } - - /** - * @param string $method - * @param array $args - * - * @return Promise\PromiseInterface - */ - public function __call($method, $args) - { - if (count($args) < 1) { - throw new \InvalidArgumentException('Magic request methods require a URI and optional options array'); - } - - $uri = $args[0]; - $opts = isset($args[1]) ? $args[1] : []; - - return substr($method, -5) === 'Async' - ? $this->requestAsync(substr($method, 0, -5), $uri, $opts) - : $this->request($method, $uri, $opts); - } - - /** - * Asynchronously send an HTTP request. - * - * @param array $options Request options to apply to the given - * request and to the transfer. See \Doofinder\GuzzleHttp\RequestOptions. - * - * @return Promise\PromiseInterface - */ - public function sendAsync(RequestInterface $request, array $options = []) - { - // Merge the base URI into the request URI if needed. - $options = $this->prepareDefaults($options); - - return $this->transfer( - $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), - $options - ); - } - - /** - * Send an HTTP request. - * - * @param array $options Request options to apply to the given - * request and to the transfer. See \Doofinder\GuzzleHttp\RequestOptions. - * - * @return ResponseInterface - * @throws GuzzleException - */ - public function send(RequestInterface $request, array $options = []) - { - $options[RequestOptions::SYNCHRONOUS] = true; - return $this->sendAsync($request, $options)->wait(); - } - - /** - * Create and send an asynchronous HTTP request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. Use an array to provide a URL - * template and additional variables to use in the URL template expansion. - * - * @param string $method HTTP method - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. See \Doofinder\GuzzleHttp\RequestOptions. - * - * @return Promise\PromiseInterface - */ - public function requestAsync($method, $uri = '', array $options = []) - { - $options = $this->prepareDefaults($options); - // Remove request modifying parameter because it can be done up-front. - $headers = isset($options['headers']) ? $options['headers'] : []; - $body = isset($options['body']) ? $options['body'] : null; - $version = isset($options['version']) ? $options['version'] : '1.1'; - // Merge the URI into the base URI. - $uri = $this->buildUri($uri, $options); - if (is_array($body)) { - $this->invalidBody(); - } - $request = new Psr7\Request($method, $uri, $headers, $body, $version); - // Remove the option so that they are not doubly-applied. - unset($options['headers'], $options['body'], $options['version']); - - return $this->transfer($request, $options); - } - - /** - * Create and send an HTTP request. - * - * Use an absolute path to override the base path of the client, or a - * relative path to append to the base path of the client. The URL can - * contain the query string as well. - * - * @param string $method HTTP method. - * @param string|UriInterface $uri URI object or string. - * @param array $options Request options to apply. See \Doofinder\GuzzleHttp\RequestOptions. - * - * @return ResponseInterface - * @throws GuzzleException - */ - public function request($method, $uri = '', array $options = []) - { - $options[RequestOptions::SYNCHRONOUS] = true; - return $this->requestAsync($method, $uri, $options)->wait(); - } - - /** - * Get a client configuration option. - * - * These options include default request options of the client, a "handler" - * (if utilized by the concrete client), and a "base_uri" if utilized by - * the concrete client. - * - * @param string|null $option The config option to retrieve. - * - * @return mixed - */ - public function getConfig($option = null) - { - return $option === null - ? $this->config - : (isset($this->config[$option]) ? $this->config[$option] : null); - } - - /** - * @param string|null $uri - * - * @return UriInterface - */ - private function buildUri($uri, array $config) - { - // for BC we accept null which would otherwise fail in uri_for - $uri = Psr7\uri_for($uri === null ? '' : $uri); - - if (isset($config['base_uri'])) { - $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri); - } - - if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) { - $idnOptions = ($config['idn_conversion'] === true) ? IDNA_DEFAULT : $config['idn_conversion']; - $uri = Utils::idnUriConvert($uri, $idnOptions); - } - - return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; - } - - /** - * Configures the default options for a client. - * - * @param array $config - * @return void - */ - private function configureDefaults(array $config) - { - $defaults = [ - 'allow_redirects' => RedirectMiddleware::$defaultSettings, - 'http_errors' => true, - 'decode_content' => true, - 'verify' => true, - 'cookies' => false, - 'idn_conversion' => true, - ]; - - // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. - - // We can only trust the HTTP_PROXY environment variable in a CLI - // process due to the fact that PHP has no reliable mechanism to - // get environment variables that start with "HTTP_". - if (php_sapi_name() === 'cli' && getenv('HTTP_PROXY')) { - $defaults['proxy']['http'] = getenv('HTTP_PROXY'); - } - - if ($proxy = getenv('HTTPS_PROXY')) { - $defaults['proxy']['https'] = $proxy; - } - - if ($noProxy = getenv('NO_PROXY')) { - $cleanedNoProxy = str_replace(' ', '', $noProxy); - $defaults['proxy']['no'] = explode(',', $cleanedNoProxy); - } - - $this->config = $config + $defaults; - - if (!empty($config['cookies']) && $config['cookies'] === true) { - $this->config['cookies'] = new CookieJar(); - } - - // Add the default user-agent header. - if (!isset($this->config['headers'])) { - $this->config['headers'] = ['User-Agent' => default_user_agent()]; - } else { - // Add the User-Agent header if one was not already set. - foreach (array_keys($this->config['headers']) as $name) { - if (strtolower($name) === 'user-agent') { - return; - } - } - $this->config['headers']['User-Agent'] = default_user_agent(); - } - } - - /** - * Merges default options into the array. - * - * @param array $options Options to modify by reference - * - * @return array - */ - private function prepareDefaults(array $options) - { - $defaults = $this->config; - - if (!empty($defaults['headers'])) { - // Default headers are only added if they are not present. - $defaults['_conditional'] = $defaults['headers']; - unset($defaults['headers']); - } - - // Special handling for headers is required as they are added as - // conditional headers and as headers passed to a request ctor. - if (array_key_exists('headers', $options)) { - // Allows default headers to be unset. - if ($options['headers'] === null) { - $defaults['_conditional'] = []; - unset($options['headers']); - } elseif (!is_array($options['headers'])) { - throw new \InvalidArgumentException('headers must be an array'); - } - } - - // Shallow merge defaults underneath options. - $result = $options + $defaults; - - // Remove null values. - foreach ($result as $k => $v) { - if ($v === null) { - unset($result[$k]); - } - } - - return $result; - } - - /** - * Transfers the given request and applies request options. - * - * The URI of the request is not modified and the request options are used - * as-is without merging in default options. - * - * @param array $options See \Doofinder\GuzzleHttp\RequestOptions. - * - * @return Promise\PromiseInterface - */ - private function transfer(RequestInterface $request, array $options) - { - // save_to -> sink - if (isset($options['save_to'])) { - $options['sink'] = $options['save_to']; - unset($options['save_to']); - } - - // exceptions -> http_errors - if (isset($options['exceptions'])) { - $options['http_errors'] = $options['exceptions']; - unset($options['exceptions']); - } - - $request = $this->applyOptions($request, $options); - /** @var HandlerStack $handler */ - $handler = $options['handler']; - - try { - return Promise\promise_for($handler($request, $options)); - } catch (\Exception $e) { - return Promise\rejection_for($e); - } - } - - /** - * Applies the array of request options to a request. - * - * @param RequestInterface $request - * @param array $options - * - * @return RequestInterface - */ - private function applyOptions(RequestInterface $request, array &$options) - { - $modify = [ - 'set_headers' => [], - ]; - - if (isset($options['headers'])) { - $modify['set_headers'] = $options['headers']; - unset($options['headers']); - } - - if (isset($options['form_params'])) { - if (isset($options['multipart'])) { - throw new \InvalidArgumentException('You cannot use ' - . 'form_params and multipart at the same time. Use the ' - . 'form_params option if you want to send application/' - . 'x-www-form-urlencoded requests, and the multipart ' - . 'option to send multipart/form-data requests.'); - } - $options['body'] = http_build_query($options['form_params'], '', '&'); - unset($options['form_params']); - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; - } - - if (isset($options['multipart'])) { - $options['body'] = new Psr7\MultipartStream($options['multipart']); - unset($options['multipart']); - } - - if (isset($options['json'])) { - $options['body'] = \Doofinder\GuzzleHttp\json_encode($options['json']); - unset($options['json']); - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'application/json'; - } - - if (!empty($options['decode_content']) - && $options['decode_content'] !== true - ) { - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']); - $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; - } - - if (isset($options['body'])) { - if (is_array($options['body'])) { - $this->invalidBody(); - } - $modify['body'] = Psr7\stream_for($options['body']); - unset($options['body']); - } - - if (!empty($options['auth']) && is_array($options['auth'])) { - $value = $options['auth']; - $type = isset($value[2]) ? strtolower($value[2]) : 'basic'; - switch ($type) { - case 'basic': - // Ensure that we don't have the header in different case and set the new value. - $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']); - $modify['set_headers']['Authorization'] = 'Basic ' - . base64_encode("$value[0]:$value[1]"); - break; - case 'digest': - // @todo: Do not rely on curl - $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST; - $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; - break; - case 'ntlm': - $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM; - $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; - break; - } - } - - if (isset($options['query'])) { - $value = $options['query']; - if (is_array($value)) { - $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986); - } - if (!is_string($value)) { - throw new \InvalidArgumentException('query must be a string or array'); - } - $modify['query'] = $value; - unset($options['query']); - } - - // Ensure that sink is not an invalid value. - if (isset($options['sink'])) { - // TODO: Add more sink validation? - if (is_bool($options['sink'])) { - throw new \InvalidArgumentException('sink must not be a boolean'); - } - } - - $request = Psr7\modify_request($request, $modify); - if ($request->getBody() instanceof Psr7\MultipartStream) { - // Use a multipart/form-data POST if a Content-Type is not set. - // Ensure that we don't have the header in different case and set the new value. - $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); - $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' - . $request->getBody()->getBoundary(); - } - - // Merge in conditional headers if they are not present. - if (isset($options['_conditional'])) { - // Build up the changes so it's in a single clone of the message. - $modify = []; - foreach ($options['_conditional'] as $k => $v) { - if (!$request->hasHeader($k)) { - $modify['set_headers'][$k] = $v; - } - } - $request = Psr7\modify_request($request, $modify); - // Don't pass this internal value along to middleware/handlers. - unset($options['_conditional']); - } - - return $request; - } - - /** - * Throw Exception with pre-set message. - * @return void - * @throws \InvalidArgumentException Invalid body. - */ - private function invalidBody() - { - throw new \InvalidArgumentException('Passing in the "body" request ' - . 'option as an array to send a POST request has been deprecated. ' - . 'Please use the "form_params" request option to send a ' - . 'application/x-www-form-urlencoded request, or the "multipart" ' - . 'request option to send a multipart/form-data request.'); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/ClientInterface.php deleted file mode 100644 index d203cd9e..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/ClientInterface.php +++ /dev/null @@ -1,87 +0,0 @@ -strictMode = $strictMode; - - foreach ($cookieArray as $cookie) { - if (!($cookie instanceof SetCookie)) { - $cookie = new SetCookie($cookie); - } - $this->setCookie($cookie); - } - } - - /** - * Create a new Cookie jar from an associative array and domain. - * - * @param array $cookies Cookies to create the jar from - * @param string $domain Domain to set the cookies to - * - * @return self - */ - public static function fromArray(array $cookies, $domain) - { - $cookieJar = new self(); - foreach ($cookies as $name => $value) { - $cookieJar->setCookie(new SetCookie([ - 'Domain' => $domain, - 'Name' => $name, - 'Value' => $value, - 'Discard' => true - ])); - } - - return $cookieJar; - } - - /** - * @deprecated - */ - public static function getCookieValue($value) - { - return $value; - } - - /** - * Evaluate if this cookie should be persisted to storage - * that survives between requests. - * - * @param SetCookie $cookie Being evaluated. - * @param bool $allowSessionCookies If we should persist session cookies - * @return bool - */ - public static function shouldPersist( - SetCookie $cookie, - $allowSessionCookies = false - ) { - if ($cookie->getExpires() || $allowSessionCookies) { - if (!$cookie->getDiscard()) { - return true; - } - } - - return false; - } - - /** - * Finds and returns the cookie based on the name - * - * @param string $name cookie name to search for - * @return SetCookie|null cookie that was found or null if not found - */ - public function getCookieByName($name) - { - // don't allow a non string name - if ($name === null || !is_scalar($name)) { - return null; - } - foreach ($this->cookies as $cookie) { - if ($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) { - return $cookie; - } - } - - return null; - } - - public function toArray() - { - return array_map(function (SetCookie $cookie) { - return $cookie->toArray(); - }, $this->getIterator()->getArrayCopy()); - } - - public function clear($domain = null, $path = null, $name = null) - { - if (!$domain) { - $this->cookies = []; - return; - } elseif (!$path) { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) use ($domain) { - return !$cookie->matchesDomain($domain); - } - ); - } elseif (!$name) { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) use ($path, $domain) { - return !($cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); - } - ); - } else { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) use ($path, $domain, $name) { - return !($cookie->getName() == $name && - $cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); - } - ); - } - } - - public function clearSessionCookies() - { - $this->cookies = array_filter( - $this->cookies, - function (SetCookie $cookie) { - return !$cookie->getDiscard() && $cookie->getExpires(); - } - ); - } - - public function setCookie(SetCookie $cookie) - { - // If the name string is empty (but not 0), ignore the set-cookie - // string entirely. - $name = $cookie->getName(); - if (!$name && $name !== '0') { - return false; - } - - // Only allow cookies with set and valid domain, name, value - $result = $cookie->validate(); - if ($result !== true) { - if ($this->strictMode) { - throw new \RuntimeException('Invalid cookie: ' . $result); - } else { - $this->removeCookieIfEmpty($cookie); - return false; - } - } - - // Resolve conflicts with previously set cookies - foreach ($this->cookies as $i => $c) { - - // Two cookies are identical, when their path, and domain are - // identical. - if ($c->getPath() != $cookie->getPath() || - $c->getDomain() != $cookie->getDomain() || - $c->getName() != $cookie->getName() - ) { - continue; - } - - // The previously set cookie is a discard cookie and this one is - // not so allow the new cookie to be set - if (!$cookie->getDiscard() && $c->getDiscard()) { - unset($this->cookies[$i]); - continue; - } - - // If the new cookie's expiration is further into the future, then - // replace the old cookie - if ($cookie->getExpires() > $c->getExpires()) { - unset($this->cookies[$i]); - continue; - } - - // If the value has changed, we better change it - if ($cookie->getValue() !== $c->getValue()) { - unset($this->cookies[$i]); - continue; - } - - // The cookie exists, so no need to continue - return false; - } - - $this->cookies[] = $cookie; - - return true; - } - - public function count() - { - return count($this->cookies); - } - - public function getIterator() - { - return new \ArrayIterator(array_values($this->cookies)); - } - - public function extractCookies( - RequestInterface $request, - ResponseInterface $response - ) { - if ($cookieHeader = $response->getHeader('Set-Cookie')) { - foreach ($cookieHeader as $cookie) { - $sc = SetCookie::fromString($cookie); - if (!$sc->getDomain()) { - $sc->setDomain($request->getUri()->getHost()); - } - if (0 !== strpos($sc->getPath(), '/')) { - $sc->setPath($this->getCookiePathFromRequest($request)); - } - $this->setCookie($sc); - } - } - } - - /** - * Computes cookie path following RFC 6265 section 5.1.4 - * - * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 - * - * @param RequestInterface $request - * @return string - */ - private function getCookiePathFromRequest(RequestInterface $request) - { - $uriPath = $request->getUri()->getPath(); - if ('' === $uriPath) { - return '/'; - } - if (0 !== strpos($uriPath, '/')) { - return '/'; - } - if ('/' === $uriPath) { - return '/'; - } - if (0 === $lastSlashPos = strrpos($uriPath, '/')) { - return '/'; - } - - return substr($uriPath, 0, $lastSlashPos); - } - - public function withCookieHeader(RequestInterface $request) - { - $values = []; - $uri = $request->getUri(); - $scheme = $uri->getScheme(); - $host = $uri->getHost(); - $path = $uri->getPath() ?: '/'; - - foreach ($this->cookies as $cookie) { - if ($cookie->matchesPath($path) && - $cookie->matchesDomain($host) && - !$cookie->isExpired() && - (!$cookie->getSecure() || $scheme === 'https') - ) { - $values[] = $cookie->getName() . '=' - . $cookie->getValue(); - } - } - - return $values - ? $request->withHeader('Cookie', implode('; ', $values)) - : $request; - } - - /** - * If a cookie already exists and the server asks to set it again with a - * null value, the cookie must be deleted. - * - * @param SetCookie $cookie - */ - private function removeCookieIfEmpty(SetCookie $cookie) - { - $cookieValue = $cookie->getValue(); - if ($cookieValue === null || $cookieValue === '') { - $this->clear( - $cookie->getDomain(), - $cookie->getPath(), - $cookie->getName() - ); - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php deleted file mode 100644 index 530429f4..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +++ /dev/null @@ -1,84 +0,0 @@ -filename = $cookieFile; - $this->storeSessionCookies = $storeSessionCookies; - - if (file_exists($cookieFile)) { - $this->load($cookieFile); - } - } - - /** - * Saves the file when shutting down - */ - public function __destruct() - { - $this->save($this->filename); - } - - /** - * Saves the cookies to a file. - * - * @param string $filename File to save - * @throws \RuntimeException if the file cannot be found or created - */ - public function save($filename) - { - $json = []; - foreach ($this as $cookie) { - /** @var SetCookie $cookie */ - if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - - $jsonStr = \Doofinder\GuzzleHttp\json_encode($json); - if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) { - throw new \RuntimeException("Unable to save file {$filename}"); - } - } - - /** - * Load cookies from a JSON formatted file. - * - * Old cookies are kept unless overwritten by newly loaded ones. - * - * @param string $filename Cookie file to load. - * @throws \RuntimeException if the file cannot be loaded. - */ - public function load($filename) - { - $json = file_get_contents($filename); - if (false === $json) { - throw new \RuntimeException("Unable to load file {$filename}"); - } elseif ($json === '') { - return; - } - - $data = \Doofinder\GuzzleHttp\json_decode($json, true); - if (is_array($data)) { - foreach (json_decode($json, true) as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (strlen($data)) { - throw new \RuntimeException("Invalid cookie file: {$filename}"); - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php deleted file mode 100644 index 964e55d5..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +++ /dev/null @@ -1,72 +0,0 @@ -sessionKey = $sessionKey; - $this->storeSessionCookies = $storeSessionCookies; - $this->load(); - } - - /** - * Saves cookies to session when shutting down - */ - public function __destruct() - { - $this->save(); - } - - /** - * Save cookies to the client session - */ - public function save() - { - $json = []; - foreach ($this as $cookie) { - /** @var SetCookie $cookie */ - if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - - $_SESSION[$this->sessionKey] = json_encode($json); - } - - /** - * Load the contents of the client session into the data array - */ - protected function load() - { - if (!isset($_SESSION[$this->sessionKey])) { - return; - } - $data = json_decode($_SESSION[$this->sessionKey], true); - if (is_array($data)) { - foreach ($data as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (strlen($data)) { - throw new \RuntimeException("Invalid cookie data"); - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php deleted file mode 100644 index 99721965..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ /dev/null @@ -1,403 +0,0 @@ - null, - 'Value' => null, - 'Domain' => null, - 'Path' => '/', - 'Max-Age' => null, - 'Expires' => null, - 'Secure' => false, - 'Discard' => false, - 'HttpOnly' => false - ]; - - /** @var array Cookie data */ - private $data; - - /** - * Create a new SetCookie object from a string - * - * @param string $cookie Set-Cookie header string - * - * @return self - */ - public static function fromString($cookie) - { - // Create the default return array - $data = self::$defaults; - // Explode the cookie string using a series of semicolons - $pieces = array_filter(array_map('trim', explode(';', $cookie))); - // The name of the cookie (first kvp) must exist and include an equal sign. - if (empty($pieces[0]) || !strpos($pieces[0], '=')) { - return new self($data); - } - - // Add the cookie pieces into the parsed data array - foreach ($pieces as $part) { - $cookieParts = explode('=', $part, 2); - $key = trim($cookieParts[0]); - $value = isset($cookieParts[1]) - ? trim($cookieParts[1], " \n\r\t\0\x0B") - : true; - - // Only check for non-cookies when cookies have been found - if (empty($data['Name'])) { - $data['Name'] = $key; - $data['Value'] = $value; - } else { - foreach (array_keys(self::$defaults) as $search) { - if (!strcasecmp($search, $key)) { - $data[$search] = $value; - continue 2; - } - } - $data[$key] = $value; - } - } - - return new self($data); - } - - /** - * @param array $data Array of cookie data provided by a Cookie parser - */ - public function __construct(array $data = []) - { - $this->data = array_replace(self::$defaults, $data); - // Extract the Expires value and turn it into a UNIX timestamp if needed - if (!$this->getExpires() && $this->getMaxAge()) { - // Calculate the Expires date - $this->setExpires(time() + $this->getMaxAge()); - } elseif ($this->getExpires() && !is_numeric($this->getExpires())) { - $this->setExpires($this->getExpires()); - } - } - - public function __toString() - { - $str = $this->data['Name'] . '=' . $this->data['Value'] . '; '; - foreach ($this->data as $k => $v) { - if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { - if ($k === 'Expires') { - $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; '; - } else { - $str .= ($v === true ? $k : "{$k}={$v}") . '; '; - } - } - } - - return rtrim($str, '; '); - } - - public function toArray() - { - return $this->data; - } - - /** - * Get the cookie name - * - * @return string - */ - public function getName() - { - return $this->data['Name']; - } - - /** - * Set the cookie name - * - * @param string $name Cookie name - */ - public function setName($name) - { - $this->data['Name'] = $name; - } - - /** - * Get the cookie value - * - * @return string - */ - public function getValue() - { - return $this->data['Value']; - } - - /** - * Set the cookie value - * - * @param string $value Cookie value - */ - public function setValue($value) - { - $this->data['Value'] = $value; - } - - /** - * Get the domain - * - * @return string|null - */ - public function getDomain() - { - return $this->data['Domain']; - } - - /** - * Set the domain of the cookie - * - * @param string $domain - */ - public function setDomain($domain) - { - $this->data['Domain'] = $domain; - } - - /** - * Get the path - * - * @return string - */ - public function getPath() - { - return $this->data['Path']; - } - - /** - * Set the path of the cookie - * - * @param string $path Path of the cookie - */ - public function setPath($path) - { - $this->data['Path'] = $path; - } - - /** - * Maximum lifetime of the cookie in seconds - * - * @return int|null - */ - public function getMaxAge() - { - return $this->data['Max-Age']; - } - - /** - * Set the max-age of the cookie - * - * @param int $maxAge Max age of the cookie in seconds - */ - public function setMaxAge($maxAge) - { - $this->data['Max-Age'] = $maxAge; - } - - /** - * The UNIX timestamp when the cookie Expires - * - * @return mixed - */ - public function getExpires() - { - return $this->data['Expires']; - } - - /** - * Set the unix timestamp for which the cookie will expire - * - * @param int $timestamp Unix timestamp - */ - public function setExpires($timestamp) - { - $this->data['Expires'] = is_numeric($timestamp) - ? (int) $timestamp - : strtotime($timestamp); - } - - /** - * Get whether or not this is a secure cookie - * - * @return bool|null - */ - public function getSecure() - { - return $this->data['Secure']; - } - - /** - * Set whether or not the cookie is secure - * - * @param bool $secure Set to true or false if secure - */ - public function setSecure($secure) - { - $this->data['Secure'] = $secure; - } - - /** - * Get whether or not this is a session cookie - * - * @return bool|null - */ - public function getDiscard() - { - return $this->data['Discard']; - } - - /** - * Set whether or not this is a session cookie - * - * @param bool $discard Set to true or false if this is a session cookie - */ - public function setDiscard($discard) - { - $this->data['Discard'] = $discard; - } - - /** - * Get whether or not this is an HTTP only cookie - * - * @return bool - */ - public function getHttpOnly() - { - return $this->data['HttpOnly']; - } - - /** - * Set whether or not this is an HTTP only cookie - * - * @param bool $httpOnly Set to true or false if this is HTTP only - */ - public function setHttpOnly($httpOnly) - { - $this->data['HttpOnly'] = $httpOnly; - } - - /** - * Check if the cookie matches a path value. - * - * A request-path path-matches a given cookie-path if at least one of - * the following conditions holds: - * - * - The cookie-path and the request-path are identical. - * - The cookie-path is a prefix of the request-path, and the last - * character of the cookie-path is %x2F ("/"). - * - The cookie-path is a prefix of the request-path, and the first - * character of the request-path that is not included in the cookie- - * path is a %x2F ("/") character. - * - * @param string $requestPath Path to check against - * - * @return bool - */ - public function matchesPath($requestPath) - { - $cookiePath = $this->getPath(); - - // Match on exact matches or when path is the default empty "/" - if ($cookiePath === '/' || $cookiePath == $requestPath) { - return true; - } - - // Ensure that the cookie-path is a prefix of the request path. - if (0 !== strpos($requestPath, $cookiePath)) { - return false; - } - - // Match if the last character of the cookie-path is "/" - if (substr($cookiePath, -1, 1) === '/') { - return true; - } - - // Match if the first character not included in cookie path is "/" - return substr($requestPath, strlen($cookiePath), 1) === '/'; - } - - /** - * Check if the cookie matches a domain value - * - * @param string $domain Domain to check against - * - * @return bool - */ - public function matchesDomain($domain) - { - // Remove the leading '.' as per spec in RFC 6265. - // http://tools.ietf.org/html/rfc6265#section-5.2.3 - $cookieDomain = ltrim($this->getDomain(), '.'); - - // Domain not set or exact match. - if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) { - return true; - } - - // Matching the subdomain according to RFC 6265. - // http://tools.ietf.org/html/rfc6265#section-5.1.3 - if (filter_var($domain, FILTER_VALIDATE_IP)) { - return false; - } - - return (bool) preg_match('/\.' . preg_quote($cookieDomain, '/') . '$/', $domain); - } - - /** - * Check if the cookie is expired - * - * @return bool - */ - public function isExpired() - { - return $this->getExpires() !== null && time() > $this->getExpires(); - } - - /** - * Check if the cookie is valid according to RFC 6265 - * - * @return bool|string Returns true if valid or an error message if invalid - */ - public function validate() - { - // Names must not be empty, but can be 0 - $name = $this->getName(); - if (empty($name) && !is_numeric($name)) { - return 'The cookie name must not be empty'; - } - - // Check if any of the invalid characters are present in the cookie name - if (preg_match( - '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/', - $name - )) { - return 'Cookie name must not contain invalid characters: ASCII ' - . 'Control characters (0-31;127), space, tab and the ' - . 'following characters: ()<>@,;:\"/?={}'; - } - - // Value must not be empty, but can be 0 - $value = $this->getValue(); - if (empty($value) && !is_numeric($value)) { - return 'The cookie value must not be empty'; - } - - // Domains must not be empty, but can be 0 - // A "0" is not a valid internet domain, but may be used as server name - // in a private network. - $domain = $this->getDomain(); - if (empty($domain) && !is_numeric($domain)) { - return 'The cookie domain must not be empty'; - } - - return true; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php deleted file mode 100644 index 256173fd..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php +++ /dev/null @@ -1,27 +0,0 @@ -getStatusCode() - : 0; - parent::__construct($message, $code, $previous); - $this->request = $request; - $this->response = $response; - $this->handlerContext = $handlerContext; - } - - /** - * Wrap non-RequestExceptions with a RequestException - * - * @param RequestInterface $request - * @param \Exception $e - * - * @return RequestException - */ - public static function wrapException(RequestInterface $request, \Exception $e) - { - return $e instanceof RequestException - ? $e - : new RequestException($e->getMessage(), $request, null, $e); - } - - /** - * Factory method to create a new exception with a normalized error message - * - * @param RequestInterface $request Request - * @param ResponseInterface $response Response received - * @param \Exception $previous Previous exception - * @param array $ctx Optional handler context. - * - * @return self - */ - public static function create( - RequestInterface $request, - ResponseInterface $response = null, - \Exception $previous = null, - array $ctx = [] - ) { - if (!$response) { - return new self( - 'Error completing request', - $request, - null, - $previous, - $ctx - ); - } - - $level = (int) floor($response->getStatusCode() / 100); - if ($level === 4) { - $label = 'Client error'; - $className = ClientException::class; - } elseif ($level === 5) { - $label = 'Server error'; - $className = ServerException::class; - } else { - $label = 'Unsuccessful request'; - $className = __CLASS__; - } - - $uri = $request->getUri(); - $uri = static::obfuscateUri($uri); - - // Client Error: `GET /` resulted in a `404 Not Found` response: - // ... (truncated) - $message = sprintf( - '%s: `%s %s` resulted in a `%s %s` response', - $label, - $request->getMethod(), - $uri, - $response->getStatusCode(), - $response->getReasonPhrase() - ); - - $summary = static::getResponseBodySummary($response); - - if ($summary !== null) { - $message .= ":\n{$summary}\n"; - } - - return new $className($message, $request, $response, $previous, $ctx); - } - - /** - * Get a short summary of the response - * - * Will return `null` if the response is not printable. - * - * @param ResponseInterface $response - * - * @return string|null - */ - public static function getResponseBodySummary(ResponseInterface $response) - { - return \Doofinder\GuzzleHttp\Psr7\get_message_body_summary($response); - } - - /** - * Obfuscates URI if there is a username and a password present - * - * @param UriInterface $uri - * - * @return UriInterface - */ - private static function obfuscateUri(UriInterface $uri) - { - $userInfo = $uri->getUserInfo(); - - if (false !== ($pos = strpos($userInfo, ':'))) { - return $uri->withUserInfo(substr($userInfo, 0, $pos), '***'); - } - - return $uri; - } - - /** - * Get the request that caused the exception - * - * @return RequestInterface - */ - public function getRequest() - { - return $this->request; - } - - /** - * Get the associated response - * - * @return ResponseInterface|null - */ - public function getResponse() - { - return $this->response; - } - - /** - * Check if a response was received - * - * @return bool - */ - public function hasResponse() - { - return $this->response !== null; - } - - /** - * Get contextual information about the error from the underlying handler. - * - * The contents of this array will vary depending on which handler you are - * using. It may also be just an empty array. Relying on this data will - * couple you to a specific handler, but can give more debug information - * when needed. - * - * @return array - */ - public function getHandlerContext() - { - return $this->handlerContext; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php deleted file mode 100644 index a5f153fa..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php +++ /dev/null @@ -1,27 +0,0 @@ -stream = $stream; - $msg = $msg ?: 'Could not seek the stream to position ' . $pos; - parent::__construct($msg); - } - - /** - * @return StreamInterface - */ - public function getStream() - { - return $this->stream; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php deleted file mode 100644 index f6332610..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php +++ /dev/null @@ -1,9 +0,0 @@ -maxHandles = $maxHandles; - } - - public function create(RequestInterface $request, array $options) - { - if (isset($options['curl']['body_as_string'])) { - $options['_body_as_string'] = $options['curl']['body_as_string']; - unset($options['curl']['body_as_string']); - } - - $easy = new EasyHandle; - $easy->request = $request; - $easy->options = $options; - $conf = $this->getDefaultConf($easy); - $this->applyMethod($easy, $conf); - $this->applyHandlerOptions($easy, $conf); - $this->applyHeaders($easy, $conf); - unset($conf['_headers']); - - // Add handler options from the request configuration options - if (isset($options['curl'])) { - $conf = array_replace($conf, $options['curl']); - } - - $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); - $easy->handle = $this->handles - ? array_pop($this->handles) - : curl_init(); - curl_setopt_array($easy->handle, $conf); - - return $easy; - } - - public function release(EasyHandle $easy) - { - $resource = $easy->handle; - unset($easy->handle); - - if (count($this->handles) >= $this->maxHandles) { - curl_close($resource); - } else { - // Remove all callback functions as they can hold onto references - // and are not cleaned up by curl_reset. Using curl_setopt_array - // does not work for some reason, so removing each one - // individually. - curl_setopt($resource, CURLOPT_HEADERFUNCTION, null); - curl_setopt($resource, CURLOPT_READFUNCTION, null); - curl_setopt($resource, CURLOPT_WRITEFUNCTION, null); - curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null); - curl_reset($resource); - $this->handles[] = $resource; - } - } - - /** - * Completes a cURL transaction, either returning a response promise or a - * rejected promise. - * - * @param callable $handler - * @param EasyHandle $easy - * @param CurlFactoryInterface $factory Dictates how the handle is released - * - * @return \Doofinder\GuzzleHttp\Promise\PromiseInterface - */ - public static function finish( - callable $handler, - EasyHandle $easy, - CurlFactoryInterface $factory - ) { - if (isset($easy->options['on_stats'])) { - self::invokeStats($easy); - } - - if (!$easy->response || $easy->errno) { - return self::finishError($handler, $easy, $factory); - } - - // Return the response if it is present and there is no error. - $factory->release($easy); - - // Rewind the body of the response if possible. - $body = $easy->response->getBody(); - if ($body->isSeekable()) { - $body->rewind(); - } - - return new FulfilledPromise($easy->response); - } - - private static function invokeStats(EasyHandle $easy) - { - $curlStats = curl_getinfo($easy->handle); - $curlStats['appconnect_time'] = curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME); - $stats = new TransferStats( - $easy->request, - $easy->response, - $curlStats['total_time'], - $easy->errno, - $curlStats - ); - call_user_func($easy->options['on_stats'], $stats); - } - - private static function finishError( - callable $handler, - EasyHandle $easy, - CurlFactoryInterface $factory - ) { - // Get error information and release the handle to the factory. - $ctx = [ - 'errno' => $easy->errno, - 'error' => curl_error($easy->handle), - 'appconnect_time' => curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME), - ] + curl_getinfo($easy->handle); - $ctx[self::CURL_VERSION_STR] = curl_version()['version']; - $factory->release($easy); - - // Retry when nothing is present or when curl failed to rewind. - if (empty($easy->options['_err_message']) - && (!$easy->errno || $easy->errno == 65) - ) { - return self::retryFailedRewind($handler, $easy, $ctx); - } - - return self::createRejection($easy, $ctx); - } - - private static function createRejection(EasyHandle $easy, array $ctx) - { - static $connectionErrors = [ - CURLE_OPERATION_TIMEOUTED => true, - CURLE_COULDNT_RESOLVE_HOST => true, - CURLE_COULDNT_CONNECT => true, - CURLE_SSL_CONNECT_ERROR => true, - CURLE_GOT_NOTHING => true, - ]; - - // If an exception was encountered during the onHeaders event, then - // return a rejected promise that wraps that exception. - if ($easy->onHeadersException) { - return \Doofinder\GuzzleHttp\Promise\rejection_for( - new RequestException( - 'An error was encountered during the on_headers event', - $easy->request, - $easy->response, - $easy->onHeadersException, - $ctx - ) - ); - } - if (version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) { - $message = sprintf( - 'cURL error %s: %s (%s)', - $ctx['errno'], - $ctx['error'], - 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html' - ); - } else { - $message = sprintf( - 'cURL error %s: %s (%s) for %s', - $ctx['errno'], - $ctx['error'], - 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html', - $easy->request->getUri() - ); - } - - // Create a connection exception if it was a specific error code. - $error = isset($connectionErrors[$easy->errno]) - ? new ConnectException($message, $easy->request, null, $ctx) - : new RequestException($message, $easy->request, $easy->response, null, $ctx); - - return \Doofinder\GuzzleHttp\Promise\rejection_for($error); - } - - private function getDefaultConf(EasyHandle $easy) - { - $conf = [ - '_headers' => $easy->request->getHeaders(), - CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), - CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), - CURLOPT_RETURNTRANSFER => false, - CURLOPT_HEADER => false, - CURLOPT_CONNECTTIMEOUT => 150, - ]; - - if (defined('CURLOPT_PROTOCOLS')) { - $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; - } - - $version = $easy->request->getProtocolVersion(); - if ($version == 1.1) { - $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1; - } elseif ($version == 2.0) { - $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0; - } else { - $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0; - } - - return $conf; - } - - private function applyMethod(EasyHandle $easy, array &$conf) - { - $body = $easy->request->getBody(); - $size = $body->getSize(); - - if ($size === null || $size > 0) { - $this->applyBody($easy->request, $easy->options, $conf); - return; - } - - $method = $easy->request->getMethod(); - if ($method === 'PUT' || $method === 'POST') { - // See http://tools.ietf.org/html/rfc7230#section-3.3.2 - if (!$easy->request->hasHeader('Content-Length')) { - $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; - } - } elseif ($method === 'HEAD') { - $conf[CURLOPT_NOBODY] = true; - unset( - $conf[CURLOPT_WRITEFUNCTION], - $conf[CURLOPT_READFUNCTION], - $conf[CURLOPT_FILE], - $conf[CURLOPT_INFILE] - ); - } - } - - private function applyBody(RequestInterface $request, array $options, array &$conf) - { - $size = $request->hasHeader('Content-Length') - ? (int) $request->getHeaderLine('Content-Length') - : null; - - // Send the body as a string if the size is less than 1MB OR if the - // [curl][body_as_string] request value is set. - if (($size !== null && $size < 1000000) || - !empty($options['_body_as_string']) - ) { - $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody(); - // Don't duplicate the Content-Length header - $this->removeHeader('Content-Length', $conf); - $this->removeHeader('Transfer-Encoding', $conf); - } else { - $conf[CURLOPT_UPLOAD] = true; - if ($size !== null) { - $conf[CURLOPT_INFILESIZE] = $size; - $this->removeHeader('Content-Length', $conf); - } - $body = $request->getBody(); - if ($body->isSeekable()) { - $body->rewind(); - } - $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) { - return $body->read($length); - }; - } - - // If the Expect header is not present, prevent curl from adding it - if (!$request->hasHeader('Expect')) { - $conf[CURLOPT_HTTPHEADER][] = 'Expect:'; - } - - // cURL sometimes adds a content-type by default. Prevent this. - if (!$request->hasHeader('Content-Type')) { - $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:'; - } - } - - private function applyHeaders(EasyHandle $easy, array &$conf) - { - foreach ($conf['_headers'] as $name => $values) { - foreach ($values as $value) { - $value = (string) $value; - if ($value === '') { - // cURL requires a special format for empty headers. - // See https://github.com/guzzle/guzzle/issues/1882 for more details. - $conf[CURLOPT_HTTPHEADER][] = "$name;"; - } else { - $conf[CURLOPT_HTTPHEADER][] = "$name: $value"; - } - } - } - - // Remove the Accept header if one was not set - if (!$easy->request->hasHeader('Accept')) { - $conf[CURLOPT_HTTPHEADER][] = 'Accept:'; - } - } - - /** - * Remove a header from the options array. - * - * @param string $name Case-insensitive header to remove - * @param array $options Array of options to modify - */ - private function removeHeader($name, array &$options) - { - foreach (array_keys($options['_headers']) as $key) { - if (!strcasecmp($key, $name)) { - unset($options['_headers'][$key]); - return; - } - } - } - - private function applyHandlerOptions(EasyHandle $easy, array &$conf) - { - $options = $easy->options; - if (isset($options['verify'])) { - if ($options['verify'] === false) { - unset($conf[CURLOPT_CAINFO]); - $conf[CURLOPT_SSL_VERIFYHOST] = 0; - $conf[CURLOPT_SSL_VERIFYPEER] = false; - } else { - $conf[CURLOPT_SSL_VERIFYHOST] = 2; - $conf[CURLOPT_SSL_VERIFYPEER] = true; - if (is_string($options['verify'])) { - // Throw an error if the file/folder/link path is not valid or doesn't exist. - if (!file_exists($options['verify'])) { - throw new \InvalidArgumentException( - "SSL CA bundle not found: {$options['verify']}" - ); - } - // If it's a directory or a link to a directory use CURLOPT_CAPATH. - // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. - if (is_dir($options['verify']) || - (is_link($options['verify']) && is_dir(readlink($options['verify'])))) { - $conf[CURLOPT_CAPATH] = $options['verify']; - } else { - $conf[CURLOPT_CAINFO] = $options['verify']; - } - } - } - } - - if (!empty($options['decode_content'])) { - $accept = $easy->request->getHeaderLine('Accept-Encoding'); - if ($accept) { - $conf[CURLOPT_ENCODING] = $accept; - } else { - $conf[CURLOPT_ENCODING] = ''; - // Don't let curl send the header over the wire - $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; - } - } - - if (isset($options['sink'])) { - $sink = $options['sink']; - if (!is_string($sink)) { - $sink = \Doofinder\GuzzleHttp\Psr7\stream_for($sink); - } elseif (!is_dir(dirname($sink))) { - // Ensure that the directory exists before failing in curl. - throw new \RuntimeException(sprintf( - 'Directory %s does not exist for sink value of %s', - dirname($sink), - $sink - )); - } else { - $sink = new LazyOpenStream($sink, 'w+'); - } - $easy->sink = $sink; - $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) { - return $sink->write($write); - }; - } else { - // Use a default temp stream if no sink was set. - $conf[CURLOPT_FILE] = fopen('php://temp', 'w+'); - $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]); - } - $timeoutRequiresNoSignal = false; - if (isset($options['timeout'])) { - $timeoutRequiresNoSignal |= $options['timeout'] < 1; - $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; - } - - // CURL default value is CURL_IPRESOLVE_WHATEVER - if (isset($options['force_ip_resolve'])) { - if ('v4' === $options['force_ip_resolve']) { - $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4; - } elseif ('v6' === $options['force_ip_resolve']) { - $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V6; - } - } - - if (isset($options['connect_timeout'])) { - $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; - $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; - } - - if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { - $conf[CURLOPT_NOSIGNAL] = true; - } - - if (isset($options['proxy'])) { - if (!is_array($options['proxy'])) { - $conf[CURLOPT_PROXY] = $options['proxy']; - } else { - $scheme = $easy->request->getUri()->getScheme(); - if (isset($options['proxy'][$scheme])) { - $host = $easy->request->getUri()->getHost(); - if (!isset($options['proxy']['no']) || - !\Doofinder\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no']) - ) { - $conf[CURLOPT_PROXY] = $options['proxy'][$scheme]; - } - } - } - } - - if (isset($options['cert'])) { - $cert = $options['cert']; - if (is_array($cert)) { - $conf[CURLOPT_SSLCERTPASSWD] = $cert[1]; - $cert = $cert[0]; - } - if (!file_exists($cert)) { - throw new \InvalidArgumentException( - "SSL certificate not found: {$cert}" - ); - } - $conf[CURLOPT_SSLCERT] = $cert; - } - - if (isset($options['ssl_key'])) { - if (is_array($options['ssl_key'])) { - if (count($options['ssl_key']) === 2) { - list($sslKey, $conf[CURLOPT_SSLKEYPASSWD]) = $options['ssl_key']; - } else { - list($sslKey) = $options['ssl_key']; - } - } - - $sslKey = isset($sslKey) ? $sslKey: $options['ssl_key']; - - if (!file_exists($sslKey)) { - throw new \InvalidArgumentException( - "SSL private key not found: {$sslKey}" - ); - } - $conf[CURLOPT_SSLKEY] = $sslKey; - } - - if (isset($options['progress'])) { - $progress = $options['progress']; - if (!is_callable($progress)) { - throw new \InvalidArgumentException( - 'progress client option must be callable' - ); - } - $conf[CURLOPT_NOPROGRESS] = false; - $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) { - $args = func_get_args(); - // PHP 5.5 pushed the handle onto the start of the args - if (is_resource($args[0])) { - array_shift($args); - } - call_user_func_array($progress, $args); - }; - } - - if (!empty($options['debug'])) { - $conf[CURLOPT_STDERR] = \Doofinder\GuzzleHttp\debug_resource($options['debug']); - $conf[CURLOPT_VERBOSE] = true; - } - } - - /** - * This function ensures that a response was set on a transaction. If one - * was not set, then the request is retried if possible. This error - * typically means you are sending a payload, curl encountered a - * "Connection died, retrying a fresh connect" error, tried to rewind the - * stream, and then encountered a "necessary data rewind wasn't possible" - * error, causing the request to be sent through curl_multi_info_read() - * without an error status. - */ - private static function retryFailedRewind( - callable $handler, - EasyHandle $easy, - array $ctx - ) { - try { - // Only rewind if the body has been read from. - $body = $easy->request->getBody(); - if ($body->tell() > 0) { - $body->rewind(); - } - } catch (\RuntimeException $e) { - $ctx['error'] = 'The connection unexpectedly failed without ' - . 'providing an error. The request would have been retried, ' - . 'but attempting to rewind the request body failed. ' - . 'Exception: ' . $e; - return self::createRejection($easy, $ctx); - } - - // Retry no more than 3 times before giving up. - if (!isset($easy->options['_curl_retries'])) { - $easy->options['_curl_retries'] = 1; - } elseif ($easy->options['_curl_retries'] == 2) { - $ctx['error'] = 'The cURL request was retried 3 times ' - . 'and did not succeed. The most likely reason for the failure ' - . 'is that cURL was unable to rewind the body of the request ' - . 'and subsequent retries resulted in the same error. Turn on ' - . 'the debug option to see what went wrong. See ' - . 'https://bugs.php.net/bug.php?id=47204 for more information.'; - return self::createRejection($easy, $ctx); - } else { - $easy->options['_curl_retries']++; - } - - return $handler($easy->request, $easy->options); - } - - private function createHeaderFn(EasyHandle $easy) - { - if (isset($easy->options['on_headers'])) { - $onHeaders = $easy->options['on_headers']; - - if (!is_callable($onHeaders)) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - } else { - $onHeaders = null; - } - - return function ($ch, $h) use ( - $onHeaders, - $easy, - &$startingResponse - ) { - $value = trim($h); - if ($value === '') { - $startingResponse = true; - $easy->createResponse(); - if ($onHeaders !== null) { - try { - $onHeaders($easy->response); - } catch (\Exception $e) { - // Associate the exception with the handle and trigger - // a curl header write error by returning 0. - $easy->onHeadersException = $e; - return -1; - } - } - } elseif ($startingResponse) { - $startingResponse = false; - $easy->headers = [$value]; - } else { - $easy->headers[] = $value; - } - return strlen($h); - }; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php deleted file mode 100644 index e671b19d..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +++ /dev/null @@ -1,27 +0,0 @@ -factory = isset($options['handle_factory']) - ? $options['handle_factory'] - : new CurlFactory(3); - } - - public function __invoke(RequestInterface $request, array $options) - { - if (isset($options['delay'])) { - usleep($options['delay'] * 1000); - } - - $easy = $this->factory->create($request, $options); - curl_exec($easy->handle); - $easy->errno = curl_errno($easy->handle); - - return CurlFactory::finish($this, $easy, $this->factory); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php deleted file mode 100644 index 2af5adb0..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +++ /dev/null @@ -1,219 +0,0 @@ -factory = isset($options['handle_factory']) - ? $options['handle_factory'] : new CurlFactory(50); - - if (isset($options['select_timeout'])) { - $this->selectTimeout = $options['select_timeout']; - } elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) { - $this->selectTimeout = $selectTimeout; - } else { - $this->selectTimeout = 1; - } - - $this->options = isset($options['options']) ? $options['options'] : []; - } - - public function __get($name) - { - if ($name === '_mh') { - $this->_mh = curl_multi_init(); - - foreach ($this->options as $option => $value) { - // A warning is raised in case of a wrong option. - curl_multi_setopt($this->_mh, $option, $value); - } - - // Further calls to _mh will return the value directly, without entering the - // __get() method at all. - return $this->_mh; - } - - throw new \BadMethodCallException(); - } - - public function __destruct() - { - if (isset($this->_mh)) { - curl_multi_close($this->_mh); - unset($this->_mh); - } - } - - public function __invoke(RequestInterface $request, array $options) - { - $easy = $this->factory->create($request, $options); - $id = (int) $easy->handle; - - $promise = new Promise( - [$this, 'execute'], - function () use ($id) { - return $this->cancel($id); - } - ); - - $this->addRequest(['easy' => $easy, 'deferred' => $promise]); - - return $promise; - } - - /** - * Ticks the curl event loop. - */ - public function tick() - { - // Add any delayed handles if needed. - if ($this->delays) { - $currentTime = Utils::currentTime(); - foreach ($this->delays as $id => $delay) { - if ($currentTime >= $delay) { - unset($this->delays[$id]); - curl_multi_add_handle( - $this->_mh, - $this->handles[$id]['easy']->handle - ); - } - } - } - - // Step through the task queue which may add additional requests. - P\queue()->run(); - - if ($this->active && - curl_multi_select($this->_mh, $this->selectTimeout) === -1 - ) { - // Perform a usleep if a select returns -1. - // See: https://bugs.php.net/bug.php?id=61141 - usleep(250); - } - - while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM); - - $this->processMessages(); - } - - /** - * Runs until all outstanding connections have completed. - */ - public function execute() - { - $queue = P\queue(); - - while ($this->handles || !$queue->isEmpty()) { - // If there are no transfers, then sleep for the next delay - if (!$this->active && $this->delays) { - usleep($this->timeToNext()); - } - $this->tick(); - } - } - - private function addRequest(array $entry) - { - $easy = $entry['easy']; - $id = (int) $easy->handle; - $this->handles[$id] = $entry; - if (empty($easy->options['delay'])) { - curl_multi_add_handle($this->_mh, $easy->handle); - } else { - $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000); - } - } - - /** - * Cancels a handle from sending and removes references to it. - * - * @param int $id Handle ID to cancel and remove. - * - * @return bool True on success, false on failure. - */ - private function cancel($id) - { - // Cannot cancel if it has been processed. - if (!isset($this->handles[$id])) { - return false; - } - - $handle = $this->handles[$id]['easy']->handle; - unset($this->delays[$id], $this->handles[$id]); - curl_multi_remove_handle($this->_mh, $handle); - curl_close($handle); - - return true; - } - - private function processMessages() - { - while ($done = curl_multi_info_read($this->_mh)) { - $id = (int) $done['handle']; - curl_multi_remove_handle($this->_mh, $done['handle']); - - if (!isset($this->handles[$id])) { - // Probably was cancelled. - continue; - } - - $entry = $this->handles[$id]; - unset($this->handles[$id], $this->delays[$id]); - $entry['easy']->errno = $done['result']; - $entry['deferred']->resolve( - CurlFactory::finish( - $this, - $entry['easy'], - $this->factory - ) - ); - } - } - - private function timeToNext() - { - $currentTime = Utils::currentTime(); - $nextTime = PHP_INT_MAX; - foreach ($this->delays as $time) { - if ($time < $nextTime) { - $nextTime = $time; - } - } - - return max(0, $nextTime - $currentTime) * 1000000; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php deleted file mode 100644 index f6fc4558..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +++ /dev/null @@ -1,92 +0,0 @@ -headers)) { - throw new \RuntimeException('No headers have been received'); - } - - // HTTP-version SP status-code SP reason-phrase - $startLine = explode(' ', array_shift($this->headers), 3); - $headers = \Doofinder\GuzzleHttp\headers_from_lines($this->headers); - $normalizedKeys = \Doofinder\GuzzleHttp\normalize_header_keys($headers); - - if (!empty($this->options['decode_content']) - && isset($normalizedKeys['content-encoding']) - ) { - $headers['x-encoded-content-encoding'] - = $headers[$normalizedKeys['content-encoding']]; - unset($headers[$normalizedKeys['content-encoding']]); - if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] - = $headers[$normalizedKeys['content-length']]; - - $bodyLength = (int) $this->sink->getSize(); - if ($bodyLength) { - $headers[$normalizedKeys['content-length']] = $bodyLength; - } else { - unset($headers[$normalizedKeys['content-length']]); - } - } - } - - // Attach a response to the easy handle with the parsed headers. - $this->response = new Response( - $startLine[1], - $headers, - $this->sink, - substr($startLine[0], 5), - isset($startLine[2]) ? (string) $startLine[2] : null - ); - } - - public function __get($name) - { - $msg = $name === 'handle' - ? 'The EasyHandle has been released' - : 'Invalid property: ' . $name; - throw new \BadMethodCallException($msg); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php deleted file mode 100644 index 10f7e301..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +++ /dev/null @@ -1,195 +0,0 @@ -onFulfilled = $onFulfilled; - $this->onRejected = $onRejected; - - if ($queue) { - call_user_func_array([$this, 'append'], $queue); - } - } - - public function __invoke(RequestInterface $request, array $options) - { - if (!$this->queue) { - throw new \OutOfBoundsException('Mock queue is empty'); - } - - if (isset($options['delay']) && is_numeric($options['delay'])) { - usleep($options['delay'] * 1000); - } - - $this->lastRequest = $request; - $this->lastOptions = $options; - $response = array_shift($this->queue); - - if (isset($options['on_headers'])) { - if (!is_callable($options['on_headers'])) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - try { - $options['on_headers']($response); - } catch (\Exception $e) { - $msg = 'An error was encountered during the on_headers event'; - $response = new RequestException($msg, $request, $response, $e); - } - } - - if (is_callable($response)) { - $response = call_user_func($response, $request, $options); - } - - $response = $response instanceof \Exception - ? \Doofinder\GuzzleHttp\Promise\rejection_for($response) - : \Doofinder\GuzzleHttp\Promise\promise_for($response); - - return $response->then( - function ($value) use ($request, $options) { - $this->invokeStats($request, $options, $value); - if ($this->onFulfilled) { - call_user_func($this->onFulfilled, $value); - } - if (isset($options['sink'])) { - $contents = (string) $value->getBody(); - $sink = $options['sink']; - - if (is_resource($sink)) { - fwrite($sink, $contents); - } elseif (is_string($sink)) { - file_put_contents($sink, $contents); - } elseif ($sink instanceof \Doofinder\Psr\Http\Message\StreamInterface) { - $sink->write($contents); - } - } - - return $value; - }, - function ($reason) use ($request, $options) { - $this->invokeStats($request, $options, null, $reason); - if ($this->onRejected) { - call_user_func($this->onRejected, $reason); - } - return \Doofinder\GuzzleHttp\Promise\rejection_for($reason); - } - ); - } - - /** - * Adds one or more variadic requests, exceptions, callables, or promises - * to the queue. - */ - public function append() - { - foreach (func_get_args() as $value) { - if ($value instanceof ResponseInterface - || $value instanceof \Exception - || $value instanceof PromiseInterface - || is_callable($value) - ) { - $this->queue[] = $value; - } else { - throw new \InvalidArgumentException('Expected a response or ' - . 'exception. Found ' . \Doofinder\GuzzleHttp\describe_type($value)); - } - } - } - - /** - * Get the last received request. - * - * @return RequestInterface - */ - public function getLastRequest() - { - return $this->lastRequest; - } - - /** - * Get the last received request options. - * - * @return array - */ - public function getLastOptions() - { - return $this->lastOptions; - } - - /** - * Returns the number of remaining items in the queue. - * - * @return int - */ - public function count() - { - return count($this->queue); - } - - public function reset() - { - $this->queue = []; - } - - private function invokeStats( - RequestInterface $request, - array $options, - ResponseInterface $response = null, - $reason = null - ) { - if (isset($options['on_stats'])) { - $transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0; - $stats = new TransferStats($request, $response, $transferTime, $reason); - call_user_func($options['on_stats'], $stats); - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php deleted file mode 100644 index 07c16aa8..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php +++ /dev/null @@ -1,55 +0,0 @@ -withoutHeader('Expect'); - - // Append a content-length header if body size is zero to match - // cURL's behavior. - if (0 === $request->getBody()->getSize()) { - $request = $request->withHeader('Content-Length', '0'); - } - - return $this->createResponse( - $request, - $options, - $this->createStream($request, $options), - $startTime - ); - } catch (\InvalidArgumentException $e) { - throw $e; - } catch (\Exception $e) { - // Determine if the error was a networking error. - $message = $e->getMessage(); - // This list can probably get more comprehensive. - if (strpos($message, 'getaddrinfo') // DNS lookup failed - || strpos($message, 'Connection refused') - || strpos($message, "couldn't connect to host") // error on HHVM - || strpos($message, "connection attempt failed") - ) { - $e = new ConnectException($e->getMessage(), $request, $e); - } - $e = RequestException::wrapException($request, $e); - $this->invokeStats($options, $request, $startTime, null, $e); - - return \Doofinder\GuzzleHttp\Promise\rejection_for($e); - } - } - - private function invokeStats( - array $options, - RequestInterface $request, - $startTime, - ResponseInterface $response = null, - $error = null - ) { - if (isset($options['on_stats'])) { - $stats = new TransferStats( - $request, - $response, - Utils::currentTime() - $startTime, - $error, - [] - ); - call_user_func($options['on_stats'], $stats); - } - } - - private function createResponse( - RequestInterface $request, - array $options, - $stream, - $startTime - ) { - $hdrs = $this->lastHeaders; - $this->lastHeaders = []; - $parts = explode(' ', array_shift($hdrs), 3); - $ver = explode('/', $parts[0])[1]; - $status = $parts[1]; - $reason = isset($parts[2]) ? $parts[2] : null; - $headers = \Doofinder\GuzzleHttp\headers_from_lines($hdrs); - list($stream, $headers) = $this->checkDecode($options, $headers, $stream); - $stream = Psr7\stream_for($stream); - $sink = $stream; - - if (strcasecmp('HEAD', $request->getMethod())) { - $sink = $this->createSink($stream, $options); - } - - $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); - - if (isset($options['on_headers'])) { - try { - $options['on_headers']($response); - } catch (\Exception $e) { - $msg = 'An error was encountered during the on_headers event'; - $ex = new RequestException($msg, $request, $response, $e); - return \Doofinder\GuzzleHttp\Promise\rejection_for($ex); - } - } - - // Do not drain when the request is a HEAD request because they have - // no body. - if ($sink !== $stream) { - $this->drain( - $stream, - $sink, - $response->getHeaderLine('Content-Length') - ); - } - - $this->invokeStats($options, $request, $startTime, $response, null); - - return new FulfilledPromise($response); - } - - private function createSink(StreamInterface $stream, array $options) - { - if (!empty($options['stream'])) { - return $stream; - } - - $sink = isset($options['sink']) - ? $options['sink'] - : fopen('php://temp', 'r+'); - - return is_string($sink) - ? new Psr7\LazyOpenStream($sink, 'w+') - : Psr7\stream_for($sink); - } - - private function checkDecode(array $options, array $headers, $stream) - { - // Automatically decode responses when instructed. - if (!empty($options['decode_content'])) { - $normalizedKeys = \Doofinder\GuzzleHttp\normalize_header_keys($headers); - if (isset($normalizedKeys['content-encoding'])) { - $encoding = $headers[$normalizedKeys['content-encoding']]; - if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { - $stream = new Psr7\InflateStream( - Psr7\stream_for($stream) - ); - $headers['x-encoded-content-encoding'] - = $headers[$normalizedKeys['content-encoding']]; - // Remove content-encoding header - unset($headers[$normalizedKeys['content-encoding']]); - // Fix content-length header - if (isset($normalizedKeys['content-length'])) { - $headers['x-encoded-content-length'] - = $headers[$normalizedKeys['content-length']]; - - $length = (int) $stream->getSize(); - if ($length === 0) { - unset($headers[$normalizedKeys['content-length']]); - } else { - $headers[$normalizedKeys['content-length']] = [$length]; - } - } - } - } - } - - return [$stream, $headers]; - } - - /** - * Drains the source stream into the "sink" client option. - * - * @param StreamInterface $source - * @param StreamInterface $sink - * @param string $contentLength Header specifying the amount of - * data to read. - * - * @return StreamInterface - * @throws \RuntimeException when the sink option is invalid. - */ - private function drain( - StreamInterface $source, - StreamInterface $sink, - $contentLength - ) { - // If a content-length header is provided, then stop reading once - // that number of bytes has been read. This can prevent infinitely - // reading from a stream when dealing with servers that do not honor - // Connection: Close headers. - Psr7\copy_to_stream( - $source, - $sink, - (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 - ); - - $sink->seek(0); - $source->close(); - - return $sink; - } - - /** - * Create a resource and check to ensure it was created successfully - * - * @param callable $callback Callable that returns stream resource - * - * @return resource - * @throws \RuntimeException on error - */ - private function createResource(callable $callback) - { - $errors = null; - set_error_handler(function ($_, $msg, $file, $line) use (&$errors) { - $errors[] = [ - 'message' => $msg, - 'file' => $file, - 'line' => $line - ]; - return true; - }); - - $resource = $callback(); - restore_error_handler(); - - if (!$resource) { - $message = 'Error creating resource: '; - foreach ($errors as $err) { - foreach ($err as $key => $value) { - $message .= "[$key] $value" . PHP_EOL; - } - } - throw new \RuntimeException(trim($message)); - } - - return $resource; - } - - private function createStream(RequestInterface $request, array $options) - { - static $methods; - if (!$methods) { - $methods = array_flip(get_class_methods(__CLASS__)); - } - - // HTTP/1.1 streams using the PHP stream wrapper require a - // Connection: close header - if ($request->getProtocolVersion() == '1.1' - && !$request->hasHeader('Connection') - ) { - $request = $request->withHeader('Connection', 'close'); - } - - // Ensure SSL is verified by default - if (!isset($options['verify'])) { - $options['verify'] = true; - } - - $params = []; - $context = $this->getDefaultContext($request); - - if (isset($options['on_headers']) && !is_callable($options['on_headers'])) { - throw new \InvalidArgumentException('on_headers must be callable'); - } - - if (!empty($options)) { - foreach ($options as $key => $value) { - $method = "add_{$key}"; - if (isset($methods[$method])) { - $this->{$method}($request, $context, $value, $params); - } - } - } - - if (isset($options['stream_context'])) { - if (!is_array($options['stream_context'])) { - throw new \InvalidArgumentException('stream_context must be an array'); - } - $context = array_replace_recursive( - $context, - $options['stream_context'] - ); - } - - // Microsoft NTLM authentication only supported with curl handler - if (isset($options['auth']) - && is_array($options['auth']) - && isset($options['auth'][2]) - && 'ntlm' == $options['auth'][2] - ) { - throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); - } - - $uri = $this->resolveHost($request, $options); - - $context = $this->createResource( - function () use ($context, $params) { - return stream_context_create($context, $params); - } - ); - - return $this->createResource( - function () use ($uri, &$http_response_header, $context, $options) { - $resource = fopen((string) $uri, 'r', null, $context); - $this->lastHeaders = $http_response_header; - - if (isset($options['read_timeout'])) { - $readTimeout = $options['read_timeout']; - $sec = (int) $readTimeout; - $usec = ($readTimeout - $sec) * 100000; - stream_set_timeout($resource, $sec, $usec); - } - - return $resource; - } - ); - } - - private function resolveHost(RequestInterface $request, array $options) - { - $uri = $request->getUri(); - - if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) { - if ('v4' === $options['force_ip_resolve']) { - $records = dns_get_record($uri->getHost(), DNS_A); - if (!isset($records[0]['ip'])) { - throw new ConnectException( - sprintf( - "Could not resolve IPv4 address for host '%s'", - $uri->getHost() - ), - $request - ); - } - $uri = $uri->withHost($records[0]['ip']); - } elseif ('v6' === $options['force_ip_resolve']) { - $records = dns_get_record($uri->getHost(), DNS_AAAA); - if (!isset($records[0]['ipv6'])) { - throw new ConnectException( - sprintf( - "Could not resolve IPv6 address for host '%s'", - $uri->getHost() - ), - $request - ); - } - $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']'); - } - } - - return $uri; - } - - private function getDefaultContext(RequestInterface $request) - { - $headers = ''; - foreach ($request->getHeaders() as $name => $value) { - foreach ($value as $val) { - $headers .= "$name: $val\r\n"; - } - } - - $context = [ - 'http' => [ - 'method' => $request->getMethod(), - 'header' => $headers, - 'protocol_version' => $request->getProtocolVersion(), - 'ignore_errors' => true, - 'follow_location' => 0, - ], - ]; - - $body = (string) $request->getBody(); - - if (!empty($body)) { - $context['http']['content'] = $body; - // Prevent the HTTP handler from adding a Content-Type header. - if (!$request->hasHeader('Content-Type')) { - $context['http']['header'] .= "Content-Type:\r\n"; - } - } - - $context['http']['header'] = rtrim($context['http']['header']); - - return $context; - } - - private function add_proxy(RequestInterface $request, &$options, $value, &$params) - { - if (!is_array($value)) { - $options['http']['proxy'] = $value; - } else { - $scheme = $request->getUri()->getScheme(); - if (isset($value[$scheme])) { - if (!isset($value['no']) - || !\Doofinder\GuzzleHttp\is_host_in_noproxy( - $request->getUri()->getHost(), - $value['no'] - ) - ) { - $options['http']['proxy'] = $value[$scheme]; - } - } - } - } - - private function add_timeout(RequestInterface $request, &$options, $value, &$params) - { - if ($value > 0) { - $options['http']['timeout'] = $value; - } - } - - private function add_verify(RequestInterface $request, &$options, $value, &$params) - { - if ($value === true) { - // PHP 5.6 or greater will find the system cert by default. When - // < 5.6, use the Guzzle bundled cacert. - if (PHP_VERSION_ID < 50600) { - $options['ssl']['cafile'] = \Doofinder\GuzzleHttp\default_ca_bundle(); - } - } elseif (is_string($value)) { - $options['ssl']['cafile'] = $value; - if (!file_exists($value)) { - throw new \RuntimeException("SSL CA bundle not found: $value"); - } - } elseif ($value === false) { - $options['ssl']['verify_peer'] = false; - $options['ssl']['verify_peer_name'] = false; - return; - } else { - throw new \InvalidArgumentException('Invalid verify request option'); - } - - $options['ssl']['verify_peer'] = true; - $options['ssl']['verify_peer_name'] = true; - $options['ssl']['allow_self_signed'] = false; - } - - private function add_cert(RequestInterface $request, &$options, $value, &$params) - { - if (is_array($value)) { - $options['ssl']['passphrase'] = $value[1]; - $value = $value[0]; - } - - if (!file_exists($value)) { - throw new \RuntimeException("SSL certificate not found: {$value}"); - } - - $options['ssl']['local_cert'] = $value; - } - - private function add_progress(RequestInterface $request, &$options, $value, &$params) - { - $this->addNotification( - $params, - function ($code, $a, $b, $c, $transferred, $total) use ($value) { - if ($code == STREAM_NOTIFY_PROGRESS) { - $value($total, $transferred, null, null); - } - } - ); - } - - private function add_debug(RequestInterface $request, &$options, $value, &$params) - { - if ($value === false) { - return; - } - - static $map = [ - STREAM_NOTIFY_CONNECT => 'CONNECT', - STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', - STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', - STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', - STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', - STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', - STREAM_NOTIFY_PROGRESS => 'PROGRESS', - STREAM_NOTIFY_FAILURE => 'FAILURE', - STREAM_NOTIFY_COMPLETED => 'COMPLETED', - STREAM_NOTIFY_RESOLVE => 'RESOLVE', - ]; - static $args = ['severity', 'message', 'message_code', - 'bytes_transferred', 'bytes_max']; - - $value = \Doofinder\GuzzleHttp\debug_resource($value); - $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); - $this->addNotification( - $params, - function () use ($ident, $value, $map, $args) { - $passed = func_get_args(); - $code = array_shift($passed); - fprintf($value, '<%s> [%s] ', $ident, $map[$code]); - foreach (array_filter($passed) as $i => $v) { - fwrite($value, $args[$i] . ': "' . $v . '" '); - } - fwrite($value, "\n"); - } - ); - } - - private function addNotification(array &$params, callable $notify) - { - // Wrap the existing function if needed. - if (!isset($params['notification'])) { - $params['notification'] = $notify; - } else { - $params['notification'] = $this->callArray([ - $params['notification'], - $notify - ]); - } - } - - private function callArray(array $functions) - { - return function () use ($functions) { - $args = func_get_args(); - foreach ($functions as $fn) { - call_user_func_array($fn, $args); - } - }; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/HandlerStack.php deleted file mode 100644 index 3c61b775..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/HandlerStack.php +++ /dev/null @@ -1,277 +0,0 @@ -push(Middleware::httpErrors(), 'http_errors'); - $stack->push(Middleware::redirect(), 'allow_redirects'); - $stack->push(Middleware::cookies(), 'cookies'); - $stack->push(Middleware::prepareBody(), 'prepare_body'); - - return $stack; - } - - /** - * @param callable $handler Underlying HTTP handler. - */ - public function __construct(callable $handler = null) - { - $this->handler = $handler; - } - - /** - * Invokes the handler stack as a composed handler - * - * @param RequestInterface $request - * @param array $options - * - * @return ResponseInterface|PromiseInterface - */ - public function __invoke(RequestInterface $request, array $options) - { - $handler = $this->resolve(); - - return $handler($request, $options); - } - - /** - * Dumps a string representation of the stack. - * - * @return string - */ - public function __toString() - { - $depth = 0; - $stack = []; - if ($this->handler) { - $stack[] = "0) Handler: " . $this->debugCallable($this->handler); - } - - $result = ''; - foreach (array_reverse($this->stack) as $tuple) { - $depth++; - $str = "{$depth}) Name: '{$tuple[1]}', "; - $str .= "Function: " . $this->debugCallable($tuple[0]); - $result = "> {$str}\n{$result}"; - $stack[] = $str; - } - - foreach (array_keys($stack) as $k) { - $result .= "< {$stack[$k]}\n"; - } - - return $result; - } - - /** - * Set the HTTP handler that actually returns a promise. - * - * @param callable $handler Accepts a request and array of options and - * returns a Promise. - */ - public function setHandler(callable $handler) - { - $this->handler = $handler; - $this->cached = null; - } - - /** - * Returns true if the builder has a handler. - * - * @return bool - */ - public function hasHandler() - { - return (bool) $this->handler; - } - - /** - * Unshift a middleware to the bottom of the stack. - * - * @param callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function unshift(callable $middleware, $name = null) - { - array_unshift($this->stack, [$middleware, $name]); - $this->cached = null; - } - - /** - * Push a middleware to the top of the stack. - * - * @param callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function push(callable $middleware, $name = '') - { - $this->stack[] = [$middleware, $name]; - $this->cached = null; - } - - /** - * Add a middleware before another middleware by name. - * - * @param string $findName Middleware to find - * @param callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function before($findName, callable $middleware, $withName = '') - { - $this->splice($findName, $withName, $middleware, true); - } - - /** - * Add a middleware after another middleware by name. - * - * @param string $findName Middleware to find - * @param callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function after($findName, callable $middleware, $withName = '') - { - $this->splice($findName, $withName, $middleware, false); - } - - /** - * Remove a middleware by instance or name from the stack. - * - * @param callable|string $remove Middleware to remove by instance or name. - */ - public function remove($remove) - { - $this->cached = null; - $idx = is_callable($remove) ? 0 : 1; - $this->stack = array_values(array_filter( - $this->stack, - function ($tuple) use ($idx, $remove) { - return $tuple[$idx] !== $remove; - } - )); - } - - /** - * Compose the middleware and handler into a single callable function. - * - * @return callable - */ - public function resolve() - { - if (!$this->cached) { - if (!($prev = $this->handler)) { - throw new \LogicException('No handler has been specified'); - } - - foreach (array_reverse($this->stack) as $fn) { - $prev = $fn[0]($prev); - } - - $this->cached = $prev; - } - - return $this->cached; - } - - /** - * @param string $name - * @return int - */ - private function findByName($name) - { - foreach ($this->stack as $k => $v) { - if ($v[1] === $name) { - return $k; - } - } - - throw new \InvalidArgumentException("Middleware not found: $name"); - } - - /** - * Splices a function into the middleware list at a specific position. - * - * @param string $findName - * @param string $withName - * @param callable $middleware - * @param bool $before - */ - private function splice($findName, $withName, callable $middleware, $before) - { - $this->cached = null; - $idx = $this->findByName($findName); - $tuple = [$middleware, $withName]; - - if ($before) { - if ($idx === 0) { - array_unshift($this->stack, $tuple); - } else { - $replacement = [$tuple, $this->stack[$idx]]; - array_splice($this->stack, $idx, 1, $replacement); - } - } elseif ($idx === count($this->stack) - 1) { - $this->stack[] = $tuple; - } else { - $replacement = [$this->stack[$idx], $tuple]; - array_splice($this->stack, $idx, 1, $replacement); - } - } - - /** - * Provides a debug string for a given callable. - * - * @param array|callable $fn Function to write as a string. - * - * @return string - */ - private function debugCallable($fn) - { - if (is_string($fn)) { - return "callable({$fn})"; - } - - if (is_array($fn)) { - return is_string($fn[0]) - ? "callable({$fn[0]}::{$fn[1]})" - : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])"; - } - - return 'callable(' . spl_object_hash($fn) . ')'; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/MessageFormatter.php deleted file mode 100644 index 337f143a..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/MessageFormatter.php +++ /dev/null @@ -1,185 +0,0 @@ ->>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; - const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; - - /** @var string Template used to format log messages */ - private $template; - - /** - * @param string $template Log message template - */ - public function __construct($template = self::CLF) - { - $this->template = $template ?: self::CLF; - } - - /** - * Returns a formatted message string. - * - * @param RequestInterface $request Request that was sent - * @param ResponseInterface $response Response that was received - * @param \Exception $error Exception that was received - * - * @return string - */ - public function format( - RequestInterface $request, - ResponseInterface $response = null, - \Exception $error = null - ) { - $cache = []; - - return preg_replace_callback( - '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', - function (array $matches) use ($request, $response, $error, &$cache) { - if (isset($cache[$matches[1]])) { - return $cache[$matches[1]]; - } - - $result = ''; - switch ($matches[1]) { - case 'request': - $result = Psr7\str($request); - break; - case 'response': - $result = $response ? Psr7\str($response) : ''; - break; - case 'req_headers': - $result = trim($request->getMethod() - . ' ' . $request->getRequestTarget()) - . ' HTTP/' . $request->getProtocolVersion() . "\r\n" - . $this->headers($request); - break; - case 'res_headers': - $result = $response ? - sprintf( - 'HTTP/%s %d %s', - $response->getProtocolVersion(), - $response->getStatusCode(), - $response->getReasonPhrase() - ) . "\r\n" . $this->headers($response) - : 'NULL'; - break; - case 'req_body': - $result = $request->getBody(); - break; - case 'res_body': - $result = $response ? $response->getBody() : 'NULL'; - break; - case 'ts': - case 'date_iso_8601': - $result = gmdate('c'); - break; - case 'date_common_log': - $result = date('d/M/Y:H:i:s O'); - break; - case 'method': - $result = $request->getMethod(); - break; - case 'version': - $result = $request->getProtocolVersion(); - break; - case 'uri': - case 'url': - $result = $request->getUri(); - break; - case 'target': - $result = $request->getRequestTarget(); - break; - case 'req_version': - $result = $request->getProtocolVersion(); - break; - case 'res_version': - $result = $response - ? $response->getProtocolVersion() - : 'NULL'; - break; - case 'host': - $result = $request->getHeaderLine('Host'); - break; - case 'hostname': - $result = gethostname(); - break; - case 'code': - $result = $response ? $response->getStatusCode() : 'NULL'; - break; - case 'phrase': - $result = $response ? $response->getReasonPhrase() : 'NULL'; - break; - case 'error': - $result = $error ? $error->getMessage() : 'NULL'; - break; - default: - // handle prefixed dynamic headers - if (strpos($matches[1], 'req_header_') === 0) { - $result = $request->getHeaderLine(substr($matches[1], 11)); - } elseif (strpos($matches[1], 'res_header_') === 0) { - $result = $response - ? $response->getHeaderLine(substr($matches[1], 11)) - : 'NULL'; - } - } - - $cache[$matches[1]] = $result; - return $result; - }, - $this->template - ); - } - - /** - * Get headers from message as string - * - * @return string - */ - private function headers(MessageInterface $message) - { - $result = ''; - foreach ($message->getHeaders() as $name => $values) { - $result .= $name . ': ' . implode(', ', $values) . "\r\n"; - } - - return trim($result); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Middleware.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Middleware.php deleted file mode 100644 index 3d1805ba..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Middleware.php +++ /dev/null @@ -1,254 +0,0 @@ -withCookieHeader($request); - return $handler($request, $options) - ->then( - function ($response) use ($cookieJar, $request) { - $cookieJar->extractCookies($request, $response); - return $response; - } - ); - }; - }; - } - - /** - * Middleware that throws exceptions for 4xx or 5xx responses when the - * "http_error" request option is set to true. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function httpErrors() - { - return function (callable $handler) { - return function ($request, array $options) use ($handler) { - if (empty($options['http_errors'])) { - return $handler($request, $options); - } - return $handler($request, $options)->then( - function (ResponseInterface $response) use ($request) { - $code = $response->getStatusCode(); - if ($code < 400) { - return $response; - } - throw RequestException::create($request, $response); - } - ); - }; - }; - } - - /** - * Middleware that pushes history data to an ArrayAccess container. - * - * @param array|\ArrayAccess $container Container to hold the history (by reference). - * - * @return callable Returns a function that accepts the next handler. - * @throws \InvalidArgumentException if container is not an array or ArrayAccess. - */ - public static function history(&$container) - { - if (!is_array($container) && !$container instanceof \ArrayAccess) { - throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); - } - - return function (callable $handler) use (&$container) { - return function ($request, array $options) use ($handler, &$container) { - return $handler($request, $options)->then( - function ($value) use ($request, &$container, $options) { - $container[] = [ - 'request' => $request, - 'response' => $value, - 'error' => null, - 'options' => $options - ]; - return $value; - }, - function ($reason) use ($request, &$container, $options) { - $container[] = [ - 'request' => $request, - 'response' => null, - 'error' => $reason, - 'options' => $options - ]; - return \Doofinder\GuzzleHttp\Promise\rejection_for($reason); - } - ); - }; - }; - } - - /** - * Middleware that invokes a callback before and after sending a request. - * - * The provided listener cannot modify or alter the response. It simply - * "taps" into the chain to be notified before returning the promise. The - * before listener accepts a request and options array, and the after - * listener accepts a request, options array, and response promise. - * - * @param callable $before Function to invoke before forwarding the request. - * @param callable $after Function invoked after forwarding. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function tap(callable $before = null, callable $after = null) - { - return function (callable $handler) use ($before, $after) { - return function ($request, array $options) use ($handler, $before, $after) { - if ($before) { - $before($request, $options); - } - $response = $handler($request, $options); - if ($after) { - $after($request, $options, $response); - } - return $response; - }; - }; - } - - /** - * Middleware that handles request redirects. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function redirect() - { - return function (callable $handler) { - return new RedirectMiddleware($handler); - }; - } - - /** - * Middleware that retries requests based on the boolean result of - * invoking the provided "decider" function. - * - * If no delay function is provided, a simple implementation of exponential - * backoff will be utilized. - * - * @param callable $decider Function that accepts the number of retries, - * a request, [response], and [exception] and - * returns true if the request is to be retried. - * @param callable $delay Function that accepts the number of retries and - * returns the number of milliseconds to delay. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function retry(callable $decider, callable $delay = null) - { - return function (callable $handler) use ($decider, $delay) { - return new RetryMiddleware($decider, $handler, $delay); - }; - } - - /** - * Middleware that logs requests, responses, and errors using a message - * formatter. - * - * @param LoggerInterface $logger Logs messages. - * @param MessageFormatter $formatter Formatter used to create message strings. - * @param string $logLevel Level at which to log requests. - * - * @return callable Returns a function that accepts the next handler. - */ - public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = 'info' /* \Psr\Log\LogLevel::INFO */) - { - return function (callable $handler) use ($logger, $formatter, $logLevel) { - return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) { - return $handler($request, $options)->then( - function ($response) use ($logger, $request, $formatter, $logLevel) { - $message = $formatter->format($request, $response); - $logger->log($logLevel, $message); - return $response; - }, - function ($reason) use ($logger, $request, $formatter) { - $response = $reason instanceof RequestException - ? $reason->getResponse() - : null; - $message = $formatter->format($request, $response, $reason); - $logger->notice($message); - return \Doofinder\GuzzleHttp\Promise\rejection_for($reason); - } - ); - }; - }; - } - - /** - * This middleware adds a default content-type if possible, a default - * content-length or transfer-encoding header, and the expect header. - * - * @return callable - */ - public static function prepareBody() - { - return function (callable $handler) { - return new PrepareBodyMiddleware($handler); - }; - } - - /** - * Middleware that applies a map function to the request before passing to - * the next handler. - * - * @param callable $fn Function that accepts a RequestInterface and returns - * a RequestInterface. - * @return callable - */ - public static function mapRequest(callable $fn) - { - return function (callable $handler) use ($fn) { - return function ($request, array $options) use ($handler, $fn) { - return $handler($fn($request), $options); - }; - }; - } - - /** - * Middleware that applies a map function to the resolved promise's - * response. - * - * @param callable $fn Function that accepts a ResponseInterface and - * returns a ResponseInterface. - * @return callable - */ - public static function mapResponse(callable $fn) - { - return function (callable $handler) use ($fn) { - return function ($request, array $options) use ($handler, $fn) { - return $handler($request, $options)->then($fn); - }; - }; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Pool.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Pool.php deleted file mode 100644 index 261728a1..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Pool.php +++ /dev/null @@ -1,134 +0,0 @@ - $rfn) { - if ($rfn instanceof RequestInterface) { - yield $key => $client->sendAsync($rfn, $opts); - } elseif (is_callable($rfn)) { - yield $key => $rfn($opts); - } else { - throw new \InvalidArgumentException('Each value yielded by ' - . 'the iterator must be a Psr7\Http\Message\RequestInterface ' - . 'or a callable that returns a promise that fulfills ' - . 'with a Psr7\Message\Http\ResponseInterface object.'); - } - } - }; - - $this->each = new EachPromise($requests(), $config); - } - - /** - * Get promise - * - * @return PromiseInterface - */ - public function promise() - { - return $this->each->promise(); - } - - /** - * Sends multiple requests concurrently and returns an array of responses - * and exceptions that uses the same ordering as the provided requests. - * - * IMPORTANT: This method keeps every request and response in memory, and - * as such, is NOT recommended when sending a large number or an - * indeterminate number of requests concurrently. - * - * @param ClientInterface $client Client used to send the requests - * @param array|\Iterator $requests Requests to send concurrently. - * @param array $options Passes through the options available in - * {@see Doofinder\GuzzleHttp\Pool::__construct} - * - * @return array Returns an array containing the response or an exception - * in the same order that the requests were sent. - * @throws \InvalidArgumentException if the event format is incorrect. - */ - public static function batch( - ClientInterface $client, - $requests, - array $options = [] - ) { - $res = []; - self::cmpCallback($options, 'fulfilled', $res); - self::cmpCallback($options, 'rejected', $res); - $pool = new static($client, $requests, $options); - $pool->promise()->wait(); - ksort($res); - - return $res; - } - - /** - * Execute callback(s) - * - * @return void - */ - private static function cmpCallback(array &$options, $name, array &$results) - { - if (!isset($options[$name])) { - $options[$name] = function ($v, $k) use (&$results) { - $results[$k] = $v; - }; - } else { - $currentFn = $options[$name]; - $options[$name] = function ($v, $k) use (&$results, $currentFn) { - $currentFn($v, $k); - $results[$k] = $v; - }; - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php deleted file mode 100644 index fd8d5c8e..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +++ /dev/null @@ -1,111 +0,0 @@ -nextHandler = $nextHandler; - } - - /** - * @param RequestInterface $request - * @param array $options - * - * @return PromiseInterface - */ - public function __invoke(RequestInterface $request, array $options) - { - $fn = $this->nextHandler; - - // Don't do anything if the request has no body. - if ($request->getBody()->getSize() === 0) { - return $fn($request, $options); - } - - $modify = []; - - // Add a default content-type if possible. - if (!$request->hasHeader('Content-Type')) { - if ($uri = $request->getBody()->getMetadata('uri')) { - if ($type = Psr7\mimetype_from_filename($uri)) { - $modify['set_headers']['Content-Type'] = $type; - } - } - } - - // Add a default content-length or transfer-encoding header. - if (!$request->hasHeader('Content-Length') - && !$request->hasHeader('Transfer-Encoding') - ) { - $size = $request->getBody()->getSize(); - if ($size !== null) { - $modify['set_headers']['Content-Length'] = $size; - } else { - $modify['set_headers']['Transfer-Encoding'] = 'chunked'; - } - } - - // Add the expect header if needed. - $this->addExpectHeader($request, $options, $modify); - - return $fn(Psr7\modify_request($request, $modify), $options); - } - - /** - * Add expect header - * - * @return void - */ - private function addExpectHeader( - RequestInterface $request, - array $options, - array &$modify - ) { - // Determine if the Expect header should be used - if ($request->hasHeader('Expect')) { - return; - } - - $expect = isset($options['expect']) ? $options['expect'] : null; - - // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0 - if ($expect === false || $request->getProtocolVersion() < 1.1) { - return; - } - - // The expect header is unconditionally enabled - if ($expect === true) { - $modify['set_headers']['Expect'] = '100-Continue'; - return; - } - - // By default, send the expect header when the payload is > 1mb - if ($expect === null) { - $expect = 1048576; - } - - // Always add if the body cannot be rewound, the size cannot be - // determined, or the size is greater than the cutoff threshold - $body = $request->getBody(); - $size = $body->getSize(); - - if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { - $modify['set_headers']['Expect'] = '100-Continue'; - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php deleted file mode 100644 index f4ff48dc..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ /dev/null @@ -1,255 +0,0 @@ - 5, - 'protocols' => ['http', 'https'], - 'strict' => false, - 'referer' => false, - 'track_redirects' => false, - ]; - - /** @var callable */ - private $nextHandler; - - /** - * @param callable $nextHandler Next handler to invoke. - */ - public function __construct(callable $nextHandler) - { - $this->nextHandler = $nextHandler; - } - - /** - * @param RequestInterface $request - * @param array $options - * - * @return PromiseInterface - */ - public function __invoke(RequestInterface $request, array $options) - { - $fn = $this->nextHandler; - - if (empty($options['allow_redirects'])) { - return $fn($request, $options); - } - - if ($options['allow_redirects'] === true) { - $options['allow_redirects'] = self::$defaultSettings; - } elseif (!is_array($options['allow_redirects'])) { - throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); - } else { - // Merge the default settings with the provided settings - $options['allow_redirects'] += self::$defaultSettings; - } - - if (empty($options['allow_redirects']['max'])) { - return $fn($request, $options); - } - - return $fn($request, $options) - ->then(function (ResponseInterface $response) use ($request, $options) { - return $this->checkRedirect($request, $options, $response); - }); - } - - /** - * @param RequestInterface $request - * @param array $options - * @param ResponseInterface $response - * - * @return ResponseInterface|PromiseInterface - */ - public function checkRedirect( - RequestInterface $request, - array $options, - ResponseInterface $response - ) { - if (substr($response->getStatusCode(), 0, 1) != '3' - || !$response->hasHeader('Location') - ) { - return $response; - } - - $this->guardMax($request, $options); - $nextRequest = $this->modifyRequest($request, $options, $response); - - if (isset($options['allow_redirects']['on_redirect'])) { - call_user_func( - $options['allow_redirects']['on_redirect'], - $request, - $response, - $nextRequest->getUri() - ); - } - - /** @var PromiseInterface|ResponseInterface $promise */ - $promise = $this($nextRequest, $options); - - // Add headers to be able to track history of redirects. - if (!empty($options['allow_redirects']['track_redirects'])) { - return $this->withTracking( - $promise, - (string) $nextRequest->getUri(), - $response->getStatusCode() - ); - } - - return $promise; - } - - /** - * Enable tracking on promise. - * - * @return PromiseInterface - */ - private function withTracking(PromiseInterface $promise, $uri, $statusCode) - { - return $promise->then( - function (ResponseInterface $response) use ($uri, $statusCode) { - // Note that we are pushing to the front of the list as this - // would be an earlier response than what is currently present - // in the history header. - $historyHeader = $response->getHeader(self::HISTORY_HEADER); - $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); - array_unshift($historyHeader, $uri); - array_unshift($statusHeader, $statusCode); - return $response->withHeader(self::HISTORY_HEADER, $historyHeader) - ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); - } - ); - } - - /** - * Check for too many redirects - * - * @return void - * - * @throws TooManyRedirectsException Too many redirects. - */ - private function guardMax(RequestInterface $request, array &$options) - { - $current = isset($options['__redirect_count']) - ? $options['__redirect_count'] - : 0; - $options['__redirect_count'] = $current + 1; - $max = $options['allow_redirects']['max']; - - if ($options['__redirect_count'] > $max) { - throw new TooManyRedirectsException( - "Will not follow more than {$max} redirects", - $request - ); - } - } - - /** - * @param RequestInterface $request - * @param array $options - * @param ResponseInterface $response - * - * @return RequestInterface - */ - public function modifyRequest( - RequestInterface $request, - array $options, - ResponseInterface $response - ) { - // Request modifications to apply. - $modify = []; - $protocols = $options['allow_redirects']['protocols']; - - // Use a GET request if this is an entity enclosing request and we are - // not forcing RFC compliance, but rather emulating what all browsers - // would do. - $statusCode = $response->getStatusCode(); - if ($statusCode == 303 || - ($statusCode <= 302 && !$options['allow_redirects']['strict']) - ) { - $modify['method'] = 'GET'; - $modify['body'] = ''; - } - - $uri = $this->redirectUri($request, $response, $protocols); - if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) { - $idnOptions = ($options['idn_conversion'] === true) ? IDNA_DEFAULT : $options['idn_conversion']; - $uri = Utils::idnUriConvert($uri, $idnOptions); - } - - $modify['uri'] = $uri; - Psr7\rewind_body($request); - - // Add the Referer header if it is told to do so and only - // add the header if we are not redirecting from https to http. - if ($options['allow_redirects']['referer'] - && $modify['uri']->getScheme() === $request->getUri()->getScheme() - ) { - $uri = $request->getUri()->withUserInfo(''); - $modify['set_headers']['Referer'] = (string) $uri; - } else { - $modify['remove_headers'][] = 'Referer'; - } - - // Remove Authorization header if host is different. - if ($request->getUri()->getHost() !== $modify['uri']->getHost()) { - $modify['remove_headers'][] = 'Authorization'; - } - - return Psr7\modify_request($request, $modify); - } - - /** - * Set the appropriate URL on the request based on the location header - * - * @param RequestInterface $request - * @param ResponseInterface $response - * @param array $protocols - * - * @return UriInterface - */ - private function redirectUri( - RequestInterface $request, - ResponseInterface $response, - array $protocols - ) { - $location = Psr7\UriResolver::resolve( - $request->getUri(), - new Psr7\Uri($response->getHeaderLine('Location')) - ); - - // Ensure that the redirect URI is allowed based on the protocols. - if (!in_array($location->getScheme(), $protocols)) { - throw new BadResponseException( - sprintf( - 'Redirect URI, %s, does not use one of the allowed redirect protocols: %s', - $location, - implode(', ', $protocols) - ), - $request, - $response - ); - } - - return $location; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/RequestOptions.php deleted file mode 100644 index 67e232d1..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/RequestOptions.php +++ /dev/null @@ -1,263 +0,0 @@ -decider = $decider; - $this->nextHandler = $nextHandler; - $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; - } - - /** - * Default exponential backoff delay function. - * - * @param int $retries - * - * @return int milliseconds. - */ - public static function exponentialDelay($retries) - { - return (int) pow(2, $retries - 1) * 1000; - } - - /** - * @param RequestInterface $request - * @param array $options - * - * @return PromiseInterface - */ - public function __invoke(RequestInterface $request, array $options) - { - if (!isset($options['retries'])) { - $options['retries'] = 0; - } - - $fn = $this->nextHandler; - return $fn($request, $options) - ->then( - $this->onFulfilled($request, $options), - $this->onRejected($request, $options) - ); - } - - /** - * Execute fulfilled closure - * - * @return mixed - */ - private function onFulfilled(RequestInterface $req, array $options) - { - return function ($value) use ($req, $options) { - if (!call_user_func( - $this->decider, - $options['retries'], - $req, - $value, - null - )) { - return $value; - } - return $this->doRetry($req, $options, $value); - }; - } - - /** - * Execute rejected closure - * - * @return callable - */ - private function onRejected(RequestInterface $req, array $options) - { - return function ($reason) use ($req, $options) { - if (!call_user_func( - $this->decider, - $options['retries'], - $req, - null, - $reason - )) { - return \Doofinder\GuzzleHttp\Promise\rejection_for($reason); - } - return $this->doRetry($req, $options); - }; - } - - /** - * @return self - */ - private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null) - { - $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response); - - return $this($request, $options); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/TransferStats.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/TransferStats.php deleted file mode 100644 index 8df7aa0e..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/TransferStats.php +++ /dev/null @@ -1,126 +0,0 @@ -request = $request; - $this->response = $response; - $this->transferTime = $transferTime; - $this->handlerErrorData = $handlerErrorData; - $this->handlerStats = $handlerStats; - } - - /** - * @return RequestInterface - */ - public function getRequest() - { - return $this->request; - } - - /** - * Returns the response that was received (if any). - * - * @return ResponseInterface|null - */ - public function getResponse() - { - return $this->response; - } - - /** - * Returns true if a response was received. - * - * @return bool - */ - public function hasResponse() - { - return $this->response !== null; - } - - /** - * Gets handler specific error data. - * - * This might be an exception, a integer representing an error code, or - * anything else. Relying on this value assumes that you know what handler - * you are using. - * - * @return mixed - */ - public function getHandlerErrorData() - { - return $this->handlerErrorData; - } - - /** - * Get the effective URI the request was sent to. - * - * @return UriInterface - */ - public function getEffectiveUri() - { - return $this->request->getUri(); - } - - /** - * Get the estimated time the request was being transferred by the handler. - * - * @return float|null Time in seconds. - */ - public function getTransferTime() - { - return $this->transferTime; - } - - /** - * Gets an array of all of the handler specific transfer data. - * - * @return array - */ - public function getHandlerStats() - { - return $this->handlerStats; - } - - /** - * Get a specific handler statistic from the handler by name. - * - * @param string $stat Handler specific transfer stat to retrieve. - * - * @return mixed|null - */ - public function getHandlerStat($stat) - { - return isset($this->handlerStats[$stat]) - ? $this->handlerStats[$stat] - : null; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/UriTemplate.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/UriTemplate.php deleted file mode 100644 index 25d2a1a5..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/UriTemplate.php +++ /dev/null @@ -1,237 +0,0 @@ - ['prefix' => '', 'joiner' => ',', 'query' => false], - '+' => ['prefix' => '', 'joiner' => ',', 'query' => false], - '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false], - '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false], - '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false], - ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true], - '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true], - '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true] - ]; - - /** @var array Delimiters */ - private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$', - '&', '\'', '(', ')', '*', '+', ',', ';', '=']; - - /** @var array Percent encoded delimiters */ - private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D', - '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', - '%3B', '%3D']; - - public function expand($template, array $variables) - { - if (false === strpos($template, '{')) { - return $template; - } - - $this->template = $template; - $this->variables = $variables; - - return preg_replace_callback( - '/\{([^\}]+)\}/', - [$this, 'expandMatch'], - $this->template - ); - } - - /** - * Parse an expression into parts - * - * @param string $expression Expression to parse - * - * @return array Returns an associative array of parts - */ - private function parseExpression($expression) - { - $result = []; - - if (isset(self::$operatorHash[$expression[0]])) { - $result['operator'] = $expression[0]; - $expression = substr($expression, 1); - } else { - $result['operator'] = ''; - } - - foreach (explode(',', $expression) as $value) { - $value = trim($value); - $varspec = []; - if ($colonPos = strpos($value, ':')) { - $varspec['value'] = substr($value, 0, $colonPos); - $varspec['modifier'] = ':'; - $varspec['position'] = (int) substr($value, $colonPos + 1); - } elseif (substr($value, -1) === '*') { - $varspec['modifier'] = '*'; - $varspec['value'] = substr($value, 0, -1); - } else { - $varspec['value'] = (string) $value; - $varspec['modifier'] = ''; - } - $result['values'][] = $varspec; - } - - return $result; - } - - /** - * Process an expansion - * - * @param array $matches Matches met in the preg_replace_callback - * - * @return string Returns the replacement string - */ - private function expandMatch(array $matches) - { - static $rfc1738to3986 = ['+' => '%20', '%7e' => '~']; - - $replacements = []; - $parsed = self::parseExpression($matches[1]); - $prefix = self::$operatorHash[$parsed['operator']]['prefix']; - $joiner = self::$operatorHash[$parsed['operator']]['joiner']; - $useQuery = self::$operatorHash[$parsed['operator']]['query']; - - foreach ($parsed['values'] as $value) { - if (!isset($this->variables[$value['value']])) { - continue; - } - - $variable = $this->variables[$value['value']]; - $actuallyUseQuery = $useQuery; - $expanded = ''; - - if (is_array($variable)) { - $isAssoc = $this->isAssoc($variable); - $kvp = []; - foreach ($variable as $key => $var) { - if ($isAssoc) { - $key = rawurlencode($key); - $isNestedArray = is_array($var); - } else { - $isNestedArray = false; - } - - if (!$isNestedArray) { - $var = rawurlencode($var); - if ($parsed['operator'] === '+' || - $parsed['operator'] === '#' - ) { - $var = $this->decodeReserved($var); - } - } - - if ($value['modifier'] === '*') { - if ($isAssoc) { - if ($isNestedArray) { - // Nested arrays must allow for deeply nested - // structures. - $var = strtr( - http_build_query([$key => $var]), - $rfc1738to3986 - ); - } else { - $var = $key . '=' . $var; - } - } elseif ($key > 0 && $actuallyUseQuery) { - $var = $value['value'] . '=' . $var; - } - } - - $kvp[$key] = $var; - } - - if (empty($variable)) { - $actuallyUseQuery = false; - } elseif ($value['modifier'] === '*') { - $expanded = implode($joiner, $kvp); - if ($isAssoc) { - // Don't prepend the value name when using the explode - // modifier with an associative array. - $actuallyUseQuery = false; - } - } else { - if ($isAssoc) { - // When an associative array is encountered and the - // explode modifier is not set, then the result must be - // a comma separated list of keys followed by their - // respective values. - foreach ($kvp as $k => &$v) { - $v = $k . ',' . $v; - } - } - $expanded = implode(',', $kvp); - } - } else { - if ($value['modifier'] === ':') { - $variable = substr($variable, 0, $value['position']); - } - $expanded = rawurlencode($variable); - if ($parsed['operator'] === '+' || $parsed['operator'] === '#') { - $expanded = $this->decodeReserved($expanded); - } - } - - if ($actuallyUseQuery) { - if (!$expanded && $joiner !== '&') { - $expanded = $value['value']; - } else { - $expanded = $value['value'] . '=' . $expanded; - } - } - - $replacements[] = $expanded; - } - - $ret = implode($joiner, $replacements); - if ($ret && $prefix) { - return $prefix . $ret; - } - - return $ret; - } - - /** - * Determines if an array is associative. - * - * This makes the assumption that input arrays are sequences or hashes. - * This assumption is a tradeoff for accuracy in favor of speed, but it - * should work in almost every case where input is supplied for a URI - * template. - * - * @param array $array Array to check - * - * @return bool - */ - private function isAssoc(array $array) - { - return $array && array_keys($array)[0] !== 0; - } - - /** - * Removes percent encoding on reserved characters (used with + and # - * modifiers). - * - * @param string $string String to fix - * - * @return string - */ - private function decodeReserved($string) - { - return str_replace(self::$delimsPct, self::$delims, $string); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Utils.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Utils.php deleted file mode 100644 index 602f12a6..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Utils.php +++ /dev/null @@ -1,92 +0,0 @@ -getHost()) { - $asciiHost = self::idnToAsci($uri->getHost(), $options, $info); - if ($asciiHost === false) { - $errorBitSet = isset($info['errors']) ? $info['errors'] : 0; - - $errorConstants = array_filter(array_keys(get_defined_constants()), function ($name) { - return substr($name, 0, 11) === 'IDNA_ERROR_'; - }); - - $errors = []; - foreach ($errorConstants as $errorConstant) { - if ($errorBitSet & constant($errorConstant)) { - $errors[] = $errorConstant; - } - } - - $errorMessage = 'IDN conversion failed'; - if ($errors) { - $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')'; - } - - throw new InvalidArgumentException($errorMessage); - } else { - if ($uri->getHost() !== $asciiHost) { - // Replace URI only if the ASCII version is different - $uri = $uri->withHost($asciiHost); - } - } - } - - return $uri; - } - - /** - * @param string $domain - * @param int $options - * @param array $info - * - * @return string|false - */ - private static function idnToAsci($domain, $options, &$info = []) - { - if (\preg_match('%^[ -~]+$%', $domain) === 1) { - return $domain; - } - - if (\extension_loaded('intl') && defined('INTL_IDNA_VARIANT_UTS46')) { - return \idn_to_ascii($domain, $options, INTL_IDNA_VARIANT_UTS46, $info); - } - - /* - * The Idn class is marked as @internal. Verify that class and method exists. - */ - if (method_exists(Idn::class, 'idn_to_ascii')) { - return Idn::idn_to_ascii($domain, $options, Idn::INTL_IDNA_VARIANT_UTS46, $info); - } - - throw new \RuntimeException('ext-intl or symfony/polyfill-intl-idn not loaded or too old'); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/functions.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/functions.php deleted file mode 100644 index fd421d73..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/functions.php +++ /dev/null @@ -1,334 +0,0 @@ -expand($template, $variables); -} - -/** - * Debug function used to describe the provided value type and class. - * - * @param mixed $input - * - * @return string Returns a string containing the type of the variable and - * if a class is provided, the class name. - */ -function describe_type($input) -{ - switch (gettype($input)) { - case 'object': - return 'object(' . get_class($input) . ')'; - case 'array': - return 'array(' . count($input) . ')'; - default: - ob_start(); - var_dump($input); - // normalize float vs double - return str_replace('double(', 'float(', rtrim(ob_get_clean())); - } -} - -/** - * Parses an array of header lines into an associative array of headers. - * - * @param iterable $lines Header lines array of strings in the following - * format: "Name: Value" - * @return array - */ -function headers_from_lines($lines) -{ - $headers = []; - - foreach ($lines as $line) { - $parts = explode(':', $line, 2); - $headers[trim($parts[0])][] = isset($parts[1]) - ? trim($parts[1]) - : null; - } - - return $headers; -} - -/** - * Returns a debug stream based on the provided variable. - * - * @param mixed $value Optional value - * - * @return resource - */ -function debug_resource($value = null) -{ - if (is_resource($value)) { - return $value; - } elseif (defined('STDOUT')) { - return STDOUT; - } - - return fopen('php://output', 'w'); -} - -/** - * Chooses and creates a default handler to use based on the environment. - * - * The returned handler is not wrapped by any default middlewares. - * - * @return callable Returns the best handler for the given system. - * @throws \RuntimeException if no viable Handler is available. - */ -function choose_handler() -{ - $handler = null; - if (function_exists('curl_multi_exec') && function_exists('curl_exec')) { - $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); - } elseif (function_exists('curl_exec')) { - $handler = new CurlHandler(); - } elseif (function_exists('curl_multi_exec')) { - $handler = new CurlMultiHandler(); - } - - if (ini_get('allow_url_fopen')) { - $handler = $handler - ? Proxy::wrapStreaming($handler, new StreamHandler()) - : new StreamHandler(); - } elseif (!$handler) { - throw new \RuntimeException('Doofinder\GuzzleHttp requires cURL, the ' - . 'allow_url_fopen ini setting, or a custom HTTP handler.'); - } - - return $handler; -} - -/** - * Get the default User-Agent string to use with Guzzle - * - * @return string - */ -function default_user_agent() -{ - static $defaultAgent = ''; - - if (!$defaultAgent) { - $defaultAgent = 'Doofinder\GuzzleHttp/' . Client::VERSION; - if (extension_loaded('curl') && function_exists('curl_version')) { - $defaultAgent .= ' curl/' . \curl_version()['version']; - } - $defaultAgent .= ' PHP/' . PHP_VERSION; - } - - return $defaultAgent; -} - -/** - * Returns the default cacert bundle for the current system. - * - * First, the openssl.cafile and curl.cainfo php.ini settings are checked. - * If those settings are not configured, then the common locations for - * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X - * and Windows are checked. If any of these file locations are found on - * disk, they will be utilized. - * - * Note: the result of this function is cached for subsequent calls. - * - * @return string - * @throws \RuntimeException if no bundle can be found. - */ -function default_ca_bundle() -{ - static $cached = null; - static $cafiles = [ - // Red Hat, CentOS, Fedora (provided by the ca-certificates package) - '/etc/pki/tls/certs/ca-bundle.crt', - // Ubuntu, Debian (provided by the ca-certificates package) - '/etc/ssl/certs/ca-certificates.crt', - // FreeBSD (provided by the ca_root_nss package) - '/usr/local/share/certs/ca-root-nss.crt', - // SLES 12 (provided by the ca-certificates package) - '/var/lib/ca-certificates/ca-bundle.pem', - // OS X provided by homebrew (using the default path) - '/usr/local/etc/openssl/cert.pem', - // Google app engine - '/etc/ca-certificates.crt', - // Windows? - 'C:\\windows\\system32\\curl-ca-bundle.crt', - 'C:\\windows\\curl-ca-bundle.crt', - ]; - - if ($cached) { - return $cached; - } - - if ($ca = ini_get('openssl.cafile')) { - return $cached = $ca; - } - - if ($ca = ini_get('curl.cainfo')) { - return $cached = $ca; - } - - foreach ($cafiles as $filename) { - if (file_exists($filename)) { - return $cached = $filename; - } - } - - throw new \RuntimeException( - <<< EOT -No system CA bundle could be found in any of the the common system locations. -PHP versions earlier than 5.6 are not properly configured to use the system's -CA bundle by default. In order to verify peer certificates, you will need to -supply the path on disk to a certificate bundle to the 'verify' request -option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not -need a specific certificate bundle, then Mozilla provides a commonly used CA -bundle which can be downloaded here (provided by the maintainer of cURL): -https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once -you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP -ini setting to point to the path to the file, allowing you to omit the 'verify' -request option. See http://curl.haxx.se/docs/sslcerts.html for more -information. -EOT - ); -} - -/** - * Creates an associative array of lowercase header names to the actual - * header casing. - * - * @param array $headers - * - * @return array - */ -function normalize_header_keys(array $headers) -{ - $result = []; - foreach (array_keys($headers) as $key) { - $result[strtolower($key)] = $key; - } - - return $result; -} - -/** - * Returns true if the provided host matches any of the no proxy areas. - * - * This method will strip a port from the host if it is present. Each pattern - * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a - * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == - * "baz.foo.com", but ".foo.com" != "foo.com"). - * - * Areas are matched in the following cases: - * 1. "*" (without quotes) always matches any hosts. - * 2. An exact match. - * 3. The area starts with "." and the area is the last part of the host. e.g. - * '.mit.edu' will match any host that ends with '.mit.edu'. - * - * @param string $host Host to check against the patterns. - * @param array $noProxyArray An array of host patterns. - * - * @return bool - */ -function is_host_in_noproxy($host, array $noProxyArray) -{ - if (strlen($host) === 0) { - throw new \InvalidArgumentException('Empty host provided'); - } - - // Strip port if present. - if (strpos($host, ':')) { - $host = explode($host, ':', 2)[0]; - } - - foreach ($noProxyArray as $area) { - // Always match on wildcards. - if ($area === '*') { - return true; - } elseif (empty($area)) { - // Don't match on empty values. - continue; - } elseif ($area === $host) { - // Exact matches. - return true; - } else { - // Special match if the area when prefixed with ".". Remove any - // existing leading "." and add a new leading ".". - $area = '.' . ltrim($area, '.'); - if (substr($host, -(strlen($area))) === $area) { - return true; - } - } - } - - return false; -} - -/** - * Wrapper for json_decode that throws when an error occurs. - * - * @param string $json JSON data to parse - * @param bool $assoc When true, returned objects will be converted - * into associative arrays. - * @param int $depth User specified recursion depth. - * @param int $options Bitmask of JSON decode options. - * - * @return mixed - * @throws Exception\InvalidArgumentException if the JSON cannot be decoded. - * @link http://www.php.net/manual/en/function.json-decode.php - */ -function json_decode($json, $assoc = false, $depth = 512, $options = 0) -{ - $data = \json_decode($json, $assoc, $depth, $options); - if (JSON_ERROR_NONE !== json_last_error()) { - throw new Exception\InvalidArgumentException( - 'json_decode error: ' . json_last_error_msg() - ); - } - - return $data; -} - -/** - * Wrapper for JSON encoding that throws when an error occurs. - * - * @param mixed $value The value being encoded - * @param int $options JSON encode option bitmask - * @param int $depth Set the maximum depth. Must be greater than zero. - * - * @return string - * @throws Exception\InvalidArgumentException if the JSON cannot be encoded. - * @link http://www.php.net/manual/en/function.json-encode.php - */ -function json_encode($value, $options = 0, $depth = 512) -{ - $json = \json_encode($value, $options, $depth); - if (JSON_ERROR_NONE !== json_last_error()) { - throw new Exception\InvalidArgumentException( - 'json_encode error: ' . json_last_error_msg() - ); - } - - return $json; -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/functions_include.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/functions_include.php deleted file mode 100644 index 0e341cff..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/guzzle/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/AggregateException.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/AggregateException.php deleted file mode 100644 index f31e1d97..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/AggregateException.php +++ /dev/null @@ -1,17 +0,0 @@ -then(function ($v) { echo $v; }); - * - * @param callable $generatorFn Generator function to wrap into a promise. - * - * @return Promise - * - * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration - */ -final class Coroutine implements PromiseInterface -{ - /** - * @var PromiseInterface|null - */ - private $currentPromise; - - /** - * @var Generator - */ - private $generator; - - /** - * @var Promise - */ - private $result; - - public function __construct(callable $generatorFn) - { - $this->generator = $generatorFn(); - $this->result = new Promise(function () { - while (isset($this->currentPromise)) { - $this->currentPromise->wait(); - } - }); - try { - $this->nextCoroutine($this->generator->current()); - } catch (\Exception $exception) { - $this->result->reject($exception); - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } - - /** - * Create a new coroutine. - * - * @return self - */ - public static function of(callable $generatorFn) - { - return new self($generatorFn); - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - return $this->result->then($onFulfilled, $onRejected); - } - - public function otherwise(callable $onRejected) - { - return $this->result->otherwise($onRejected); - } - - public function wait($unwrap = true) - { - return $this->result->wait($unwrap); - } - - public function getState() - { - return $this->result->getState(); - } - - public function resolve($value) - { - $this->result->resolve($value); - } - - public function reject($reason) - { - $this->result->reject($reason); - } - - public function cancel() - { - $this->currentPromise->cancel(); - $this->result->cancel(); - } - - private function nextCoroutine($yielded) - { - $this->currentPromise = Create::promiseFor($yielded) - ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); - } - - /** - * @internal - */ - public function _handleSuccess($value) - { - unset($this->currentPromise); - try { - $next = $this->generator->send($value); - if ($this->generator->valid()) { - $this->nextCoroutine($next); - } else { - $this->result->resolve($value); - } - } catch (Exception $exception) { - $this->result->reject($exception); - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } - - /** - * @internal - */ - public function _handleFailure($reason) - { - unset($this->currentPromise); - try { - $nextYield = $this->generator->throw(Create::exceptionFor($reason)); - // The throw was caught, so keep iterating on the coroutine - $this->nextCoroutine($nextYield); - } catch (Exception $exception) { - $this->result->reject($exception); - } catch (Throwable $throwable) { - $this->result->reject($throwable); - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Create.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Create.php deleted file mode 100644 index f1f9d591..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Create.php +++ /dev/null @@ -1,84 +0,0 @@ -then([$promise, 'resolve'], [$promise, 'reject']); - return $promise; - } - - return new FulfilledPromise($value); - } - - /** - * Creates a rejected promise for a reason if the reason is not a promise. - * If the provided reason is a promise, then it is returned as-is. - * - * @param mixed $reason Promise or reason. - * - * @return PromiseInterface - */ - public static function rejectionFor($reason) - { - if ($reason instanceof PromiseInterface) { - return $reason; - } - - return new RejectedPromise($reason); - } - - /** - * Create an exception for a rejected promise value. - * - * @param mixed $reason - * - * @return \Exception|\Throwable - */ - public static function exceptionFor($reason) - { - if ($reason instanceof \Exception || $reason instanceof \Throwable) { - return $reason; - } - - return new RejectionException($reason); - } - - /** - * Returns an iterator for the given value. - * - * @param mixed $value - * - * @return \Iterator - */ - public static function iterFor($value) - { - if ($value instanceof \Iterator) { - return $value; - } - - if (is_array($value)) { - return new \ArrayIterator($value); - } - - return new \ArrayIterator([$value]); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Each.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Each.php deleted file mode 100644 index d756e7d7..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Each.php +++ /dev/null @@ -1,90 +0,0 @@ - $onFulfilled, - 'rejected' => $onRejected - ]))->promise(); - } - - /** - * Like of, but only allows a certain number of outstanding promises at any - * given time. - * - * $concurrency may be an integer or a function that accepts the number of - * pending promises and returns a numeric concurrency limit value to allow - * for dynamic a concurrency size. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - */ - public static function ofLimit( - $iterable, - $concurrency, - callable $onFulfilled = null, - callable $onRejected = null - ) { - return (new EachPromise($iterable, [ - 'fulfilled' => $onFulfilled, - 'rejected' => $onRejected, - 'concurrency' => $concurrency - ]))->promise(); - } - - /** - * Like limit, but ensures that no promise in the given $iterable argument - * is rejected. If any promise is rejected, then the aggregate promise is - * rejected with the encountered rejection. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * - * @return PromiseInterface - */ - public static function ofLimitAll( - $iterable, - $concurrency, - callable $onFulfilled = null - ) { - return each_limit( - $iterable, - $concurrency, - $onFulfilled, - function ($reason, $idx, PromiseInterface $aggregate) { - $aggregate->reject($reason); - } - ); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/EachPromise.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/EachPromise.php deleted file mode 100644 index 7b6d7d75..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/EachPromise.php +++ /dev/null @@ -1,254 +0,0 @@ -iterable = Create::iterFor($iterable); - - if (isset($config['concurrency'])) { - $this->concurrency = $config['concurrency']; - } - - if (isset($config['fulfilled'])) { - $this->onFulfilled = $config['fulfilled']; - } - - if (isset($config['rejected'])) { - $this->onRejected = $config['rejected']; - } - } - - /** @psalm-suppress InvalidNullableReturnType */ - public function promise() - { - if ($this->aggregate) { - return $this->aggregate; - } - - try { - $this->createPromise(); - /** @psalm-assert Promise $this->aggregate */ - $this->iterable->rewind(); - if (!$this->checkIfFinished()) { - $this->refillPending(); - } - } catch (\Throwable $e) { - /** - * @psalm-suppress NullReference - * @phpstan-ignore-next-line - */ - $this->aggregate->reject($e); - } catch (\Exception $e) { - /** - * @psalm-suppress NullReference - * @phpstan-ignore-next-line - */ - $this->aggregate->reject($e); - } - - /** - * @psalm-suppress NullableReturnStatement - * @phpstan-ignore-next-line - */ - return $this->aggregate; - } - - private function createPromise() - { - $this->mutex = false; - $this->aggregate = new Promise(function () { - reset($this->pending); - // Consume a potentially fluctuating list of promises while - // ensuring that indexes are maintained (precluding array_shift). - while ($promise = current($this->pending)) { - next($this->pending); - $promise->wait(); - if (Is::settled($this->aggregate)) { - return; - } - } - }); - - // Clear the references when the promise is resolved. - $clearFn = function () { - $this->iterable = $this->concurrency = $this->pending = null; - $this->onFulfilled = $this->onRejected = null; - $this->nextPendingIndex = 0; - }; - - $this->aggregate->then($clearFn, $clearFn); - } - - private function refillPending() - { - if (!$this->concurrency) { - // Add all pending promises. - while ($this->addPending() && $this->advanceIterator()); - return; - } - - // Add only up to N pending promises. - $concurrency = is_callable($this->concurrency) - ? call_user_func($this->concurrency, count($this->pending)) - : $this->concurrency; - $concurrency = max($concurrency - count($this->pending), 0); - // Concurrency may be set to 0 to disallow new promises. - if (!$concurrency) { - return; - } - // Add the first pending promise. - $this->addPending(); - // Note this is special handling for concurrency=1 so that we do - // not advance the iterator after adding the first promise. This - // helps work around issues with generators that might not have the - // next value to yield until promise callbacks are called. - while (--$concurrency - && $this->advanceIterator() - && $this->addPending()); - } - - private function addPending() - { - if (!$this->iterable || !$this->iterable->valid()) { - return false; - } - - $promise = Create::promiseFor($this->iterable->current()); - $key = $this->iterable->key(); - - // Iterable keys may not be unique, so we use a counter to - // guarantee uniqueness - $idx = $this->nextPendingIndex++; - - $this->pending[$idx] = $promise->then( - function ($value) use ($idx, $key) { - if ($this->onFulfilled) { - call_user_func( - $this->onFulfilled, - $value, - $key, - $this->aggregate - ); - } - $this->step($idx); - }, - function ($reason) use ($idx, $key) { - if ($this->onRejected) { - call_user_func( - $this->onRejected, - $reason, - $key, - $this->aggregate - ); - } - $this->step($idx); - } - ); - - return true; - } - - private function advanceIterator() - { - // Place a lock on the iterator so that we ensure to not recurse, - // preventing fatal generator errors. - if ($this->mutex) { - return false; - } - - $this->mutex = true; - - try { - $this->iterable->next(); - $this->mutex = false; - return true; - } catch (\Throwable $e) { - $this->aggregate->reject($e); - $this->mutex = false; - return false; - } catch (\Exception $e) { - $this->aggregate->reject($e); - $this->mutex = false; - return false; - } - } - - private function step($idx) - { - // If the promise was already resolved, then ignore this step. - if (Is::settled($this->aggregate)) { - return; - } - - unset($this->pending[$idx]); - - // Only refill pending promises if we are not locked, preventing the - // EachPromise to recursively invoke the provided iterator, which - // cause a fatal error: "Cannot resume an already running generator" - if ($this->advanceIterator() && !$this->checkIfFinished()) { - // Add more pending promises if possible. - $this->refillPending(); - } - } - - private function checkIfFinished() - { - if (!$this->pending && !$this->iterable->valid()) { - // Resolve the promise if there's nothing left to do. - $this->aggregate->resolve(null); - return true; - } - - return false; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/FulfilledPromise.php deleted file mode 100644 index 6cbdddc3..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/FulfilledPromise.php +++ /dev/null @@ -1,84 +0,0 @@ -value = $value; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - // Return itself if there is no onFulfilled function. - if (!$onFulfilled) { - return $this; - } - - $queue = Utils::queue(); - $p = new Promise([$queue, 'run']); - $value = $this->value; - $queue->add(static function () use ($p, $value, $onFulfilled) { - if (Is::pending($p)) { - try { - $p->resolve($onFulfilled($value)); - } catch (\Throwable $e) { - $p->reject($e); - } catch (\Exception $e) { - $p->reject($e); - } - } - }); - - return $p; - } - - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - - public function wait($unwrap = true, $defaultDelivery = null) - { - return $unwrap ? $this->value : null; - } - - public function getState() - { - return self::FULFILLED; - } - - public function resolve($value) - { - if ($value !== $this->value) { - throw new \LogicException("Cannot resolve a fulfilled promise"); - } - } - - public function reject($reason) - { - throw new \LogicException("Cannot reject a fulfilled promise"); - } - - public function cancel() - { - // pass - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Is.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Is.php deleted file mode 100644 index 781f5a28..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Is.php +++ /dev/null @@ -1,46 +0,0 @@ -getState() === PromiseInterface::PENDING; - } - - /** - * Returns true if a promise is fulfilled or rejected. - * - * @return bool - */ - public static function settled(PromiseInterface $promise) - { - return $promise->getState() !== PromiseInterface::PENDING; - } - - /** - * Returns true if a promise is fulfilled. - * - * @return bool - */ - public static function fulfilled(PromiseInterface $promise) - { - return $promise->getState() === PromiseInterface::FULFILLED; - } - - /** - * Returns true if a promise is rejected. - * - * @return bool - */ - public static function rejected(PromiseInterface $promise) - { - return $promise->getState() === PromiseInterface::REJECTED; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Promise.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Promise.php deleted file mode 100644 index e95f36c5..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/Promise.php +++ /dev/null @@ -1,278 +0,0 @@ -waitFn = $waitFn; - $this->cancelFn = $cancelFn; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - if ($this->state === self::PENDING) { - $p = new Promise(null, [$this, 'cancel']); - $this->handlers[] = [$p, $onFulfilled, $onRejected]; - $p->waitList = $this->waitList; - $p->waitList[] = $this; - return $p; - } - - // Return a fulfilled promise and immediately invoke any callbacks. - if ($this->state === self::FULFILLED) { - $promise = Create::promiseFor($this->result); - return $onFulfilled ? $promise->then($onFulfilled) : $promise; - } - - // It's either cancelled or rejected, so return a rejected promise - // and immediately invoke any callbacks. - $rejection = Create::rejectionFor($this->result); - return $onRejected ? $rejection->then(null, $onRejected) : $rejection; - } - - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - - public function wait($unwrap = true) - { - $this->waitIfPending(); - - if ($this->result instanceof PromiseInterface) { - return $this->result->wait($unwrap); - } - if ($unwrap) { - if ($this->state === self::FULFILLED) { - return $this->result; - } - // It's rejected so "unwrap" and throw an exception. - throw Create::exceptionFor($this->result); - } - } - - public function getState() - { - return $this->state; - } - - public function cancel() - { - if ($this->state !== self::PENDING) { - return; - } - - $this->waitFn = $this->waitList = null; - - if ($this->cancelFn) { - $fn = $this->cancelFn; - $this->cancelFn = null; - try { - $fn(); - } catch (\Throwable $e) { - $this->reject($e); - } catch (\Exception $e) { - $this->reject($e); - } - } - - // Reject the promise only if it wasn't rejected in a then callback. - /** @psalm-suppress RedundantCondition */ - if ($this->state === self::PENDING) { - $this->reject(new CancellationException('Promise has been cancelled')); - } - } - - public function resolve($value) - { - $this->settle(self::FULFILLED, $value); - } - - public function reject($reason) - { - $this->settle(self::REJECTED, $reason); - } - - private function settle($state, $value) - { - if ($this->state !== self::PENDING) { - // Ignore calls with the same resolution. - if ($state === $this->state && $value === $this->result) { - return; - } - throw $this->state === $state - ? new \LogicException("The promise is already {$state}.") - : new \LogicException("Cannot change a {$this->state} promise to {$state}"); - } - - if ($value === $this) { - throw new \LogicException('Cannot fulfill or reject a promise with itself'); - } - - // Clear out the state of the promise but stash the handlers. - $this->state = $state; - $this->result = $value; - $handlers = $this->handlers; - $this->handlers = null; - $this->waitList = $this->waitFn = null; - $this->cancelFn = null; - - if (!$handlers) { - return; - } - - // If the value was not a settled promise or a thenable, then resolve - // it in the task queue using the correct ID. - if (!is_object($value) || !method_exists($value, 'then')) { - $id = $state === self::FULFILLED ? 1 : 2; - // It's a success, so resolve the handlers in the queue. - Utils::queue()->add(static function () use ($id, $value, $handlers) { - foreach ($handlers as $handler) { - self::callHandler($id, $value, $handler); - } - }); - } elseif ($value instanceof Promise && Is::pending($value)) { - // We can just merge our handlers onto the next promise. - $value->handlers = array_merge($value->handlers, $handlers); - } else { - // Resolve the handlers when the forwarded promise is resolved. - $value->then( - static function ($value) use ($handlers) { - foreach ($handlers as $handler) { - self::callHandler(1, $value, $handler); - } - }, - static function ($reason) use ($handlers) { - foreach ($handlers as $handler) { - self::callHandler(2, $reason, $handler); - } - } - ); - } - } - - /** - * Call a stack of handlers using a specific callback index and value. - * - * @param int $index 1 (resolve) or 2 (reject). - * @param mixed $value Value to pass to the callback. - * @param array $handler Array of handler data (promise and callbacks). - */ - private static function callHandler($index, $value, array $handler) - { - /** @var PromiseInterface $promise */ - $promise = $handler[0]; - - // The promise may have been cancelled or resolved before placing - // this thunk in the queue. - if (Is::settled($promise)) { - return; - } - - try { - if (isset($handler[$index])) { - /* - * If $f throws an exception, then $handler will be in the exception - * stack trace. Since $handler contains a reference to the callable - * itself we get a circular reference. We clear the $handler - * here to avoid that memory leak. - */ - $f = $handler[$index]; - unset($handler); - $promise->resolve($f($value)); - } elseif ($index === 1) { - // Forward resolution values as-is. - $promise->resolve($value); - } else { - // Forward rejections down the chain. - $promise->reject($value); - } - } catch (\Throwable $reason) { - $promise->reject($reason); - } catch (\Exception $reason) { - $promise->reject($reason); - } - } - - private function waitIfPending() - { - if ($this->state !== self::PENDING) { - return; - } elseif ($this->waitFn) { - $this->invokeWaitFn(); - } elseif ($this->waitList) { - $this->invokeWaitList(); - } else { - // If there's no wait function, then reject the promise. - $this->reject('Cannot wait on a promise that has ' - . 'no internal wait function. You must provide a wait ' - . 'function when constructing the promise to be able to ' - . 'wait on a promise.'); - } - - Utils::queue()->run(); - - /** @psalm-suppress RedundantCondition */ - if ($this->state === self::PENDING) { - $this->reject('Invoking the wait callback did not resolve the promise'); - } - } - - private function invokeWaitFn() - { - try { - $wfn = $this->waitFn; - $this->waitFn = null; - $wfn(true); - } catch (\Exception $reason) { - if ($this->state === self::PENDING) { - // The promise has not been resolved yet, so reject the promise - // with the exception. - $this->reject($reason); - } else { - // The promise was already resolved, so there's a problem in - // the application. - throw $reason; - } - } - } - - private function invokeWaitList() - { - $waitList = $this->waitList; - $this->waitList = null; - - foreach ($waitList as $result) { - do { - $result->waitIfPending(); - $result = $result->result; - } while ($result instanceof Promise); - - if ($result instanceof PromiseInterface) { - $result->wait(false); - } - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/PromiseInterface.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/PromiseInterface.php deleted file mode 100644 index fa6de295..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/PromiseInterface.php +++ /dev/null @@ -1,97 +0,0 @@ -reason = $reason; - } - - public function then( - callable $onFulfilled = null, - callable $onRejected = null - ) { - // If there's no onRejected callback then just return self. - if (!$onRejected) { - return $this; - } - - $queue = Utils::queue(); - $reason = $this->reason; - $p = new Promise([$queue, 'run']); - $queue->add(static function () use ($p, $reason, $onRejected) { - if (Is::pending($p)) { - try { - // Return a resolved promise if onRejected does not throw. - $p->resolve($onRejected($reason)); - } catch (\Throwable $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); - } catch (\Exception $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); - } - } - }); - - return $p; - } - - public function otherwise(callable $onRejected) - { - return $this->then(null, $onRejected); - } - - public function wait($unwrap = true, $defaultDelivery = null) - { - if ($unwrap) { - throw Create::exceptionFor($this->reason); - } - - return null; - } - - public function getState() - { - return self::REJECTED; - } - - public function resolve($value) - { - throw new \LogicException("Cannot resolve a rejected promise"); - } - - public function reject($reason) - { - if ($reason !== $this->reason) { - throw new \LogicException("Cannot reject a rejected promise"); - } - } - - public function cancel() - { - // pass - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/RejectionException.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/RejectionException.php deleted file mode 100644 index f200b90b..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/RejectionException.php +++ /dev/null @@ -1,48 +0,0 @@ -reason = $reason; - - $message = 'The promise was rejected'; - - if ($description) { - $message .= ' with reason: ' . $description; - } elseif (is_string($reason) - || (is_object($reason) && method_exists($reason, '__toString')) - ) { - $message .= ' with reason: ' . $this->reason; - } elseif ($reason instanceof \JsonSerializable) { - $message .= ' with reason: ' - . json_encode($this->reason, JSON_PRETTY_PRINT); - } - - parent::__construct($message); - } - - /** - * Returns the rejection reason. - * - * @return mixed - */ - public function getReason() - { - return $this->reason; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/TaskQueue.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/TaskQueue.php deleted file mode 100644 index cd48debc..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/TaskQueue.php +++ /dev/null @@ -1,67 +0,0 @@ -run(); - */ -class TaskQueue implements TaskQueueInterface -{ - private $enableShutdown = true; - private $queue = []; - - public function __construct($withShutdown = true) - { - if ($withShutdown) { - register_shutdown_function(function () { - if ($this->enableShutdown) { - // Only run the tasks if an E_ERROR didn't occur. - $err = error_get_last(); - if (!$err || ($err['type'] ^ E_ERROR)) { - $this->run(); - } - } - }); - } - } - - public function isEmpty() - { - return !$this->queue; - } - - public function add(callable $task) - { - $this->queue[] = $task; - } - - public function run() - { - while ($task = array_shift($this->queue)) { - /** @var callable $task */ - $task(); - } - } - - /** - * The task queue will be run and exhausted by default when the process - * exits IFF the exit is not the result of a PHP E_ERROR error. - * - * You can disable running the automatic shutdown of the queue by calling - * this function. If you disable the task queue shutdown process, then you - * MUST either run the task queue (as a result of running your event loop - * or manually using the run() method) or wait on each outstanding promise. - * - * Note: This shutdown will occur before any destructors are triggered. - */ - public function disableShutdown() - { - $this->enableShutdown = false; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/TaskQueueInterface.php deleted file mode 100644 index a3fb6e3e..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/TaskQueueInterface.php +++ /dev/null @@ -1,24 +0,0 @@ - - * while ($eventLoop->isRunning()) { - * Doofinder\GuzzleHttp\Promise\Utils::queue()->run(); - * } - * - * - * @param TaskQueueInterface $assign Optionally specify a new queue instance. - * - * @return TaskQueueInterface - */ - public static function queue(TaskQueueInterface $assign = null) - { - static $queue; - - if ($assign) { - $queue = $assign; - } elseif (!$queue) { - $queue = new TaskQueue(); - } - - return $queue; - } - - /** - * Adds a function to run in the task queue when it is next `run()` and - * returns a promise that is fulfilled or rejected with the result. - * - * @param callable $task Task function to run. - * - * @return PromiseInterface - */ - public static function task(callable $task) - { - $queue = self::queue(); - $promise = new Promise([$queue, 'run']); - $queue->add(function () use ($task, $promise) { - try { - $promise->resolve($task()); - } catch (\Throwable $e) { - $promise->reject($e); - } catch (\Exception $e) { - $promise->reject($e); - } - }); - - return $promise; - } - - /** - * Synchronously waits on a promise to resolve and returns an inspection - * state array. - * - * Returns a state associative array containing a "state" key mapping to a - * valid promise state. If the state of the promise is "fulfilled", the - * array will contain a "value" key mapping to the fulfilled value of the - * promise. If the promise is rejected, the array will contain a "reason" - * key mapping to the rejection reason of the promise. - * - * @param PromiseInterface $promise Promise or value. - * - * @return array - */ - public static function inspect(PromiseInterface $promise) - { - try { - return [ - 'state' => PromiseInterface::FULFILLED, - 'value' => $promise->wait() - ]; - } catch (RejectionException $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; - } catch (\Throwable $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; - } catch (\Exception $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; - } - } - - /** - * Waits on all of the provided promises, but does not unwrap rejected - * promises as thrown exception. - * - * Returns an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param PromiseInterface[] $promises Traversable of promises to wait upon. - * - * @return array - */ - public static function inspectAll($promises) - { - $results = []; - foreach ($promises as $key => $promise) { - $results[$key] = inspect($promise); - } - - return $results; - } - - /** - * Waits on all of the provided promises and returns the fulfilled values. - * - * Returns an array that contains the value of each promise (in the same - * order the promises were provided). An exception is thrown if any of the - * promises are rejected. - * - * @param iterable $promises Iterable of PromiseInterface objects to wait on. - * - * @return array - * - * @throws \Exception on error - * @throws \Throwable on error in PHP >=7 - */ - public static function unwrap($promises) - { - $results = []; - foreach ($promises as $key => $promise) { - $results[$key] = $promise->wait(); - } - - return $results; - } - - /** - * Given an array of promises, return a promise that is fulfilled when all - * the items in the array are fulfilled. - * - * The promise's fulfillment value is an array with fulfillment values at - * respective positions to the original array. If any promise in the array - * rejects, the returned promise is rejected with the rejection reason. - * - * @param mixed $promises Promises or values. - * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. - * - * @return PromiseInterface - */ - public static function all($promises, $recursive = false) - { - $results = []; - $promise = Each::of( - $promises, - function ($value, $idx) use (&$results) { - $results[$idx] = $value; - }, - function ($reason, $idx, Promise $aggregate) { - $aggregate->reject($reason); - } - )->then(function () use (&$results) { - ksort($results); - return $results; - }); - - if (true === $recursive) { - $promise = $promise->then(function ($results) use ($recursive, &$promises) { - foreach ($promises as $promise) { - if (Is::pending($promise)) { - return self::all($promises, $recursive); - } - } - return $results; - }); - } - - return $promise; - } - - /** - * Initiate a competitive race between multiple promises or values (values - * will become immediately fulfilled promises). - * - * When count amount of promises have been fulfilled, the returned promise - * is fulfilled with an array that contains the fulfillment values of the - * winners in order of resolution. - * - * This promise is rejected with a {@see AggregateException} if the number - * of fulfilled promises is less than the desired $count. - * - * @param int $count Total number of promises. - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ - public static function some($count, $promises) - { - $results = []; - $rejections = []; - - return Each::of( - $promises, - function ($value, $idx, PromiseInterface $p) use (&$results, $count) { - if (Is::settled($p)) { - return; - } - $results[$idx] = $value; - if (count($results) >= $count) { - $p->resolve(null); - } - }, - function ($reason) use (&$rejections) { - $rejections[] = $reason; - } - )->then( - function () use (&$results, &$rejections, $count) { - if (count($results) !== $count) { - throw new AggregateException( - 'Not enough promises to fulfill count', - $rejections - ); - } - ksort($results); - return array_values($results); - } - ); - } - - /** - * Like some(), with 1 as count. However, if the promise fulfills, the - * fulfillment value is not an array of 1 but the value directly. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ - public static function any($promises) - { - return self::some(1, $promises)->then(function ($values) { - return $values[0]; - }); - } - - /** - * Returns a promise that is fulfilled when all of the provided promises have - * been fulfilled or rejected. - * - * The returned promise is fulfilled with an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - */ - public static function settle($promises) - { - $results = []; - - return Each::of( - $promises, - function ($value, $idx) use (&$results) { - $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; - }, - function ($reason, $idx) use (&$results) { - $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; - } - )->then(function () use (&$results) { - ksort($results); - return $results; - }); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/functions.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/functions.php deleted file mode 100644 index d40d0503..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/functions.php +++ /dev/null @@ -1,363 +0,0 @@ - - * while ($eventLoop->isRunning()) { - * Doofinder\GuzzleHttp\Promise\queue()->run(); - * } - * - * - * @param TaskQueueInterface $assign Optionally specify a new queue instance. - * - * @return TaskQueueInterface - * - * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead. - */ -function queue(TaskQueueInterface $assign = null) -{ - return Utils::queue($assign); -} - -/** - * Adds a function to run in the task queue when it is next `run()` and returns - * a promise that is fulfilled or rejected with the result. - * - * @param callable $task Task function to run. - * - * @return PromiseInterface - * - * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead. - */ -function task(callable $task) -{ - return Utils::task($task); -} - -/** - * Creates a promise for a value if the value is not a promise. - * - * @param mixed $value Promise or value. - * - * @return PromiseInterface - * - * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead. - */ -function promise_for($value) -{ - return Create::promiseFor($value); -} - -/** - * Creates a rejected promise for a reason if the reason is not a promise. If - * the provided reason is a promise, then it is returned as-is. - * - * @param mixed $reason Promise or reason. - * - * @return PromiseInterface - * - * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead. - */ -function rejection_for($reason) -{ - return Create::rejectionFor($reason); -} - -/** - * Create an exception for a rejected promise value. - * - * @param mixed $reason - * - * @return \Exception|\Throwable - * - * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead. - */ -function exception_for($reason) -{ - return Create::exceptionFor($reason); -} - -/** - * Returns an iterator for the given value. - * - * @param mixed $value - * - * @return \Iterator - * - * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead. - */ -function iter_for($value) -{ - return Create::iterFor($value); -} - -/** - * Synchronously waits on a promise to resolve and returns an inspection state - * array. - * - * Returns a state associative array containing a "state" key mapping to a - * valid promise state. If the state of the promise is "fulfilled", the array - * will contain a "value" key mapping to the fulfilled value of the promise. If - * the promise is rejected, the array will contain a "reason" key mapping to - * the rejection reason of the promise. - * - * @param PromiseInterface $promise Promise or value. - * - * @return array - * - * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead. - */ -function inspect(PromiseInterface $promise) -{ - return Utils::inspect($promise); -} - -/** - * Waits on all of the provided promises, but does not unwrap rejected promises - * as thrown exception. - * - * Returns an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param PromiseInterface[] $promises Traversable of promises to wait upon. - * - * @return array - * - * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead. - */ -function inspect_all($promises) -{ - return Utils::inspectAll($promises); -} - -/** - * Waits on all of the provided promises and returns the fulfilled values. - * - * Returns an array that contains the value of each promise (in the same order - * the promises were provided). An exception is thrown if any of the promises - * are rejected. - * - * @param iterable $promises Iterable of PromiseInterface objects to wait on. - * - * @return array - * - * @throws \Exception on error - * @throws \Throwable on error in PHP >=7 - * - * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead. - */ -function unwrap($promises) -{ - return Utils::unwrap($promises); -} - -/** - * Given an array of promises, return a promise that is fulfilled when all the - * items in the array are fulfilled. - * - * The promise's fulfillment value is an array with fulfillment values at - * respective positions to the original array. If any promise in the array - * rejects, the returned promise is rejected with the rejection reason. - * - * @param mixed $promises Promises or values. - * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. - * - * @return PromiseInterface - * - * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead. - */ -function all($promises, $recursive = false) -{ - return Utils::all($promises, $recursive); -} - -/** - * Initiate a competitive race between multiple promises or values (values will - * become immediately fulfilled promises). - * - * When count amount of promises have been fulfilled, the returned promise is - * fulfilled with an array that contains the fulfillment values of the winners - * in order of resolution. - * - * This promise is rejected with a {@see AggregateException} if the number of - * fulfilled promises is less than the desired $count. - * - * @param int $count Total number of promises. - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead. - */ -function some($count, $promises) -{ - return Utils::some($count, $promises); -} - -/** - * Like some(), with 1 as count. However, if the promise fulfills, the - * fulfillment value is not an array of 1 but the value directly. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead. - */ -function any($promises) -{ - return Utils::any($promises); -} - -/** - * Returns a promise that is fulfilled when all of the provided promises have - * been fulfilled or rejected. - * - * The returned promise is fulfilled with an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead. - */ -function settle($promises) -{ - return Utils::settle($promises); -} - -/** - * Given an iterator that yields promises or values, returns a promise that is - * fulfilled with a null value when the iterator has been consumed or the - * aggregate promise has been fulfilled or rejected. - * - * $onFulfilled is a function that accepts the fulfilled value, iterator index, - * and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate if needed. - * - * $onRejected is a function that accepts the rejection reason, iterator index, - * and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate if needed. - * - * @param mixed $iterable Iterator or array to iterate over. - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - * - * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead. - */ -function each( - $iterable, - callable $onFulfilled = null, - callable $onRejected = null -) { - return Each::of($iterable, $onFulfilled, $onRejected); -} - -/** - * Like each, but only allows a certain number of outstanding promises at any - * given time. - * - * $concurrency may be an integer or a function that accepts the number of - * pending promises and returns a numeric concurrency limit value to allow for - * dynamic a concurrency size. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - * - * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead. - */ -function each_limit( - $iterable, - $concurrency, - callable $onFulfilled = null, - callable $onRejected = null -) { - return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected); -} - -/** - * Like each_limit, but ensures that no promise in the given $iterable argument - * is rejected. If any promise is rejected, then the aggregate promise is - * rejected with the encountered rejection. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * - * @return PromiseInterface - * - * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead. - */ -function each_limit_all( - $iterable, - $concurrency, - callable $onFulfilled = null -) { - return Each::ofLimitAll($iterable, $concurrency, $onFulfilled); -} - -/** - * Returns true if a promise is fulfilled. - * - * @return bool - * - * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead. - */ -function is_fulfilled(PromiseInterface $promise) -{ - return Is::fulfilled($promise); -} - -/** - * Returns true if a promise is rejected. - * - * @return bool - * - * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead. - */ -function is_rejected(PromiseInterface $promise) -{ - return Is::rejected($promise); -} - -/** - * Returns true if a promise is fulfilled or rejected. - * - * @return bool - * - * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead. - */ -function is_settled(PromiseInterface $promise) -{ - return Is::settled($promise); -} - -/** - * Create a new coroutine. - * - * @see Coroutine - * - * @return PromiseInterface - * - * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead. - */ -function coroutine(callable $generatorFn) -{ - return Coroutine::of($generatorFn); -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/functions_include.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/functions_include.php deleted file mode 100644 index 0faf6188..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/promises/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/AppendStream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/AppendStream.php deleted file mode 100644 index 9e435902..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/AppendStream.php +++ /dev/null @@ -1,246 +0,0 @@ -addStream($stream); - } - } - - public function __toString() - { - try { - $this->rewind(); - return $this->getContents(); - } catch (\Exception $e) { - return ''; - } - } - - /** - * Add a stream to the AppendStream - * - * @param StreamInterface $stream Stream to append. Must be readable. - * - * @throws \InvalidArgumentException if the stream is not readable - */ - public function addStream(StreamInterface $stream) - { - if (!$stream->isReadable()) { - throw new \InvalidArgumentException('Each stream must be readable'); - } - - // The stream is only seekable if all streams are seekable - if (!$stream->isSeekable()) { - $this->seekable = false; - } - - $this->streams[] = $stream; - } - - public function getContents() - { - return Utils::copyToString($this); - } - - /** - * Closes each attached stream. - * - * {@inheritdoc} - */ - public function close() - { - $this->pos = $this->current = 0; - $this->seekable = true; - - foreach ($this->streams as $stream) { - $stream->close(); - } - - $this->streams = []; - } - - /** - * Detaches each attached stream. - * - * Returns null as it's not clear which underlying stream resource to return. - * - * {@inheritdoc} - */ - public function detach() - { - $this->pos = $this->current = 0; - $this->seekable = true; - - foreach ($this->streams as $stream) { - $stream->detach(); - } - - $this->streams = []; - - return null; - } - - public function tell() - { - return $this->pos; - } - - /** - * Tries to calculate the size by adding the size of each stream. - * - * If any of the streams do not return a valid number, then the size of the - * append stream cannot be determined and null is returned. - * - * {@inheritdoc} - */ - public function getSize() - { - $size = 0; - - foreach ($this->streams as $stream) { - $s = $stream->getSize(); - if ($s === null) { - return null; - } - $size += $s; - } - - return $size; - } - - public function eof() - { - return !$this->streams || - ($this->current >= count($this->streams) - 1 && - $this->streams[$this->current]->eof()); - } - - public function rewind() - { - $this->seek(0); - } - - /** - * Attempts to seek to the given position. Only supports SEEK_SET. - * - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if (!$this->seekable) { - throw new \RuntimeException('This AppendStream is not seekable'); - } elseif ($whence !== SEEK_SET) { - throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); - } - - $this->pos = $this->current = 0; - - // Rewind each stream - foreach ($this->streams as $i => $stream) { - try { - $stream->rewind(); - } catch (\Exception $e) { - throw new \RuntimeException('Unable to seek stream ' - . $i . ' of the AppendStream', 0, $e); - } - } - - // Seek to the actual position by reading from each stream - while ($this->pos < $offset && !$this->eof()) { - $result = $this->read(min(8096, $offset - $this->pos)); - if ($result === '') { - break; - } - } - } - - /** - * Reads from all of the appended streams until the length is met or EOF. - * - * {@inheritdoc} - */ - public function read($length) - { - $buffer = ''; - $total = count($this->streams) - 1; - $remaining = $length; - $progressToNext = false; - - while ($remaining > 0) { - - // Progress to the next stream if needed. - if ($progressToNext || $this->streams[$this->current]->eof()) { - $progressToNext = false; - if ($this->current === $total) { - break; - } - $this->current++; - } - - $result = $this->streams[$this->current]->read($remaining); - - // Using a loose comparison here to match on '', false, and null - if ($result == null) { - $progressToNext = true; - continue; - } - - $buffer .= $result; - $remaining = $length - strlen($buffer); - } - - $this->pos += strlen($buffer); - - return $buffer; - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return false; - } - - public function isSeekable() - { - return $this->seekable; - } - - public function write($string) - { - throw new \RuntimeException('Cannot write to an AppendStream'); - } - - public function getMetadata($key = null) - { - return $key ? null : []; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/BufferStream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/BufferStream.php deleted file mode 100644 index fadaa52c..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/BufferStream.php +++ /dev/null @@ -1,142 +0,0 @@ -hwm = $hwm; - } - - public function __toString() - { - return $this->getContents(); - } - - public function getContents() - { - $buffer = $this->buffer; - $this->buffer = ''; - - return $buffer; - } - - public function close() - { - $this->buffer = ''; - } - - public function detach() - { - $this->close(); - - return null; - } - - public function getSize() - { - return strlen($this->buffer); - } - - public function isReadable() - { - return true; - } - - public function isWritable() - { - return true; - } - - public function isSeekable() - { - return false; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - throw new \RuntimeException('Cannot seek a BufferStream'); - } - - public function eof() - { - return strlen($this->buffer) === 0; - } - - public function tell() - { - throw new \RuntimeException('Cannot determine the position of a BufferStream'); - } - - /** - * Reads data from the buffer. - */ - public function read($length) - { - $currentLength = strlen($this->buffer); - - if ($length >= $currentLength) { - // No need to slice the buffer because we don't have enough data. - $result = $this->buffer; - $this->buffer = ''; - } else { - // Slice up the result to provide a subset of the buffer. - $result = substr($this->buffer, 0, $length); - $this->buffer = substr($this->buffer, $length); - } - - return $result; - } - - /** - * Writes data to the buffer. - */ - public function write($string) - { - $this->buffer .= $string; - - // TODO: What should happen here? - if (strlen($this->buffer) >= $this->hwm) { - return false; - } - - return strlen($string); - } - - public function getMetadata($key = null) - { - if ($key == 'hwm') { - return $this->hwm; - } - - return $key ? null : []; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/CachingStream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/CachingStream.php deleted file mode 100644 index fd2753b6..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/CachingStream.php +++ /dev/null @@ -1,141 +0,0 @@ -remoteStream = $stream; - $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+')); - } - - public function getSize() - { - return max($this->stream->getSize(), $this->remoteStream->getSize()); - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - if ($whence == SEEK_SET) { - $byte = $offset; - } elseif ($whence == SEEK_CUR) { - $byte = $offset + $this->tell(); - } elseif ($whence == SEEK_END) { - $size = $this->remoteStream->getSize(); - if ($size === null) { - $size = $this->cacheEntireStream(); - } - $byte = $size + $offset; - } else { - throw new \InvalidArgumentException('Invalid whence'); - } - - $diff = $byte - $this->stream->getSize(); - - if ($diff > 0) { - // Read the remoteStream until we have read in at least the amount - // of bytes requested, or we reach the end of the file. - while ($diff > 0 && !$this->remoteStream->eof()) { - $this->read($diff); - $diff = $byte - $this->stream->getSize(); - } - } else { - // We can just do a normal seek since we've already seen this byte. - $this->stream->seek($byte); - } - } - - public function read($length) - { - // Perform a regular read on any previously read data from the buffer - $data = $this->stream->read($length); - $remaining = $length - strlen($data); - - // More data was requested so read from the remote stream - if ($remaining) { - // If data was written to the buffer in a position that would have - // been filled from the remote stream, then we must skip bytes on - // the remote stream to emulate overwriting bytes from that - // position. This mimics the behavior of other PHP stream wrappers. - $remoteData = $this->remoteStream->read( - $remaining + $this->skipReadBytes - ); - - if ($this->skipReadBytes) { - $len = strlen($remoteData); - $remoteData = substr($remoteData, $this->skipReadBytes); - $this->skipReadBytes = max(0, $this->skipReadBytes - $len); - } - - $data .= $remoteData; - $this->stream->write($remoteData); - } - - return $data; - } - - public function write($string) - { - // When appending to the end of the currently read stream, you'll want - // to skip bytes from being read from the remote stream to emulate - // other stream wrappers. Basically replacing bytes of data of a fixed - // length. - $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); - if ($overflow > 0) { - $this->skipReadBytes += $overflow; - } - - return $this->stream->write($string); - } - - public function eof() - { - return $this->stream->eof() && $this->remoteStream->eof(); - } - - /** - * Close both the remote stream and buffer stream - */ - public function close() - { - $this->remoteStream->close() && $this->stream->close(); - } - - private function cacheEntireStream() - { - $target = new FnStream(['write' => 'strlen']); - Utils::copyToStream($this, $target); - - return $this->tell(); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/DroppingStream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/DroppingStream.php deleted file mode 100644 index 2a835b4c..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/DroppingStream.php +++ /dev/null @@ -1,45 +0,0 @@ -stream = $stream; - $this->maxLength = $maxLength; - } - - public function write($string) - { - $diff = $this->maxLength - $this->stream->getSize(); - - // Begin returning 0 when the underlying stream is too large. - if ($diff <= 0) { - return 0; - } - - // Write the stream or a subset of the stream if needed. - if (strlen($string) < $diff) { - return $this->stream->write($string); - } - - return $this->stream->write(substr($string, 0, $diff)); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/FnStream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/FnStream.php deleted file mode 100644 index da0027bb..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/FnStream.php +++ /dev/null @@ -1,163 +0,0 @@ -methods = $methods; - - // Create the functions on the class - foreach ($methods as $name => $fn) { - $this->{'_fn_' . $name} = $fn; - } - } - - /** - * Lazily determine which methods are not implemented. - * - * @throws \BadMethodCallException - */ - public function __get($name) - { - throw new \BadMethodCallException(str_replace('_fn_', '', $name) - . '() is not implemented in the FnStream'); - } - - /** - * The close method is called on the underlying stream only if possible. - */ - public function __destruct() - { - if (isset($this->_fn_close)) { - call_user_func($this->_fn_close); - } - } - - /** - * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. - * - * @throws \LogicException - */ - public function __wakeup() - { - throw new \LogicException('FnStream should never be unserialized'); - } - - /** - * Adds custom functionality to an underlying stream by intercepting - * specific method calls. - * - * @param StreamInterface $stream Stream to decorate - * @param array $methods Hash of method name to a closure - * - * @return FnStream - */ - public static function decorate(StreamInterface $stream, array $methods) - { - // If any of the required methods were not provided, then simply - // proxy to the decorated stream. - foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { - $methods[$diff] = [$stream, $diff]; - } - - return new self($methods); - } - - public function __toString() - { - return call_user_func($this->_fn___toString); - } - - public function close() - { - return call_user_func($this->_fn_close); - } - - public function detach() - { - return call_user_func($this->_fn_detach); - } - - public function getSize() - { - return call_user_func($this->_fn_getSize); - } - - public function tell() - { - return call_user_func($this->_fn_tell); - } - - public function eof() - { - return call_user_func($this->_fn_eof); - } - - public function isSeekable() - { - return call_user_func($this->_fn_isSeekable); - } - - public function rewind() - { - call_user_func($this->_fn_rewind); - } - - public function seek($offset, $whence = SEEK_SET) - { - call_user_func($this->_fn_seek, $offset, $whence); - } - - public function isWritable() - { - return call_user_func($this->_fn_isWritable); - } - - public function write($string) - { - return call_user_func($this->_fn_write, $string); - } - - public function isReadable() - { - return call_user_func($this->_fn_isReadable); - } - - public function read($length) - { - return call_user_func($this->_fn_read, $length); - } - - public function getContents() - { - return call_user_func($this->_fn_getContents); - } - - public function getMetadata($key = null) - { - return call_user_func($this->_fn_getMetadata, $key); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Header.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Header.php deleted file mode 100644 index 30ed6f17..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Header.php +++ /dev/null @@ -1,71 +0,0 @@ -]+>|[^=]+/', $kvp, $matches)) { - $m = $matches[0]; - if (isset($m[1])) { - $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); - } else { - $part[] = trim($m[0], $trimmed); - } - } - } - if ($part) { - $params[] = $part; - } - } - - return $params; - } - - /** - * Converts an array of header values that may contain comma separated - * headers into an array of headers with no comma separated values. - * - * @param string|array $header Header to normalize. - * - * @return array Returns the normalized header field values. - */ - public static function normalize($header) - { - if (!is_array($header)) { - return array_map('trim', explode(',', $header)); - } - - $result = []; - foreach ($header as $value) { - foreach ((array) $value as $v) { - if (strpos($v, ',') === false) { - $result[] = $v; - continue; - } - foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { - $result[] = trim($vv); - } - } - } - - return $result; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/InflateStream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/InflateStream.php deleted file mode 100644 index 80dff35a..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/InflateStream.php +++ /dev/null @@ -1,56 +0,0 @@ -read(10); - $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); - // Skip the header, that is 10 + length of filename + 1 (nil) bytes - $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); - $resource = StreamWrapper::getResource($stream); - stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); - $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); - } - - /** - * @param StreamInterface $stream - * @param $header - * - * @return int - */ - private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) - { - $filename_header_length = 0; - - if (substr(bin2hex($header), 6, 2) === '08') { - // we have a filename, read until nil - $filename_header_length = 1; - while ($stream->read(1) !== chr(0)) { - $filename_header_length++; - } - } - - return $filename_header_length; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/LazyOpenStream.php deleted file mode 100644 index a66040ef..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/LazyOpenStream.php +++ /dev/null @@ -1,42 +0,0 @@ -filename = $filename; - $this->mode = $mode; - } - - /** - * Creates the underlying stream lazily when required. - * - * @return StreamInterface - */ - protected function createStream() - { - return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode)); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/LimitStream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/LimitStream.php deleted file mode 100644 index 5cc469be..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/LimitStream.php +++ /dev/null @@ -1,157 +0,0 @@ -stream = $stream; - $this->setLimit($limit); - $this->setOffset($offset); - } - - public function eof() - { - // Always return true if the underlying stream is EOF - if ($this->stream->eof()) { - return true; - } - - // No limit and the underlying stream is not at EOF - if ($this->limit == -1) { - return false; - } - - return $this->stream->tell() >= $this->offset + $this->limit; - } - - /** - * Returns the size of the limited subset of data - * {@inheritdoc} - */ - public function getSize() - { - if (null === ($length = $this->stream->getSize())) { - return null; - } elseif ($this->limit == -1) { - return $length - $this->offset; - } else { - return min($this->limit, $length - $this->offset); - } - } - - /** - * Allow for a bounded seek on the read limited stream - * {@inheritdoc} - */ - public function seek($offset, $whence = SEEK_SET) - { - if ($whence !== SEEK_SET || $offset < 0) { - throw new \RuntimeException(sprintf( - 'Cannot seek to offset %s with whence %s', - $offset, - $whence - )); - } - - $offset += $this->offset; - - if ($this->limit !== -1) { - if ($offset > $this->offset + $this->limit) { - $offset = $this->offset + $this->limit; - } - } - - $this->stream->seek($offset); - } - - /** - * Give a relative tell() - * {@inheritdoc} - */ - public function tell() - { - return $this->stream->tell() - $this->offset; - } - - /** - * Set the offset to start limiting from - * - * @param int $offset Offset to seek to and begin byte limiting from - * - * @throws \RuntimeException if the stream cannot be seeked. - */ - public function setOffset($offset) - { - $current = $this->stream->tell(); - - if ($current !== $offset) { - // If the stream cannot seek to the offset position, then read to it - if ($this->stream->isSeekable()) { - $this->stream->seek($offset); - } elseif ($current > $offset) { - throw new \RuntimeException("Could not seek to stream offset $offset"); - } else { - $this->stream->read($offset - $current); - } - } - - $this->offset = $offset; - } - - /** - * Set the limit of bytes that the decorator allows to be read from the - * stream. - * - * @param int $limit Number of bytes to allow to be read from the stream. - * Use -1 for no limit. - */ - public function setLimit($limit) - { - $this->limit = $limit; - } - - public function read($length) - { - if ($this->limit == -1) { - return $this->stream->read($length); - } - - // Check if the current position is less than the total allowed - // bytes + original offset - $remaining = ($this->offset + $this->limit) - $this->stream->tell(); - if ($remaining > 0) { - // Only return the amount of requested data, ensuring that the byte - // limit is not exceeded - return $this->stream->read(min($remaining, $length)); - } - - return ''; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Message.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Message.php deleted file mode 100644 index df11982b..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Message.php +++ /dev/null @@ -1,252 +0,0 @@ -getMethod() . ' ' - . $message->getRequestTarget()) - . ' HTTP/' . $message->getProtocolVersion(); - if (!$message->hasHeader('host')) { - $msg .= "\r\nHost: " . $message->getUri()->getHost(); - } - } elseif ($message instanceof ResponseInterface) { - $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' - . $message->getStatusCode() . ' ' - . $message->getReasonPhrase(); - } else { - throw new \InvalidArgumentException('Unknown message type'); - } - - foreach ($message->getHeaders() as $name => $values) { - if (strtolower($name) === 'set-cookie') { - foreach ($values as $value) { - $msg .= "\r\n{$name}: " . $value; - } - } else { - $msg .= "\r\n{$name}: " . implode(', ', $values); - } - } - - return "{$msg}\r\n\r\n" . $message->getBody(); - } - - /** - * Get a short summary of the message body. - * - * Will return `null` if the response is not printable. - * - * @param MessageInterface $message The message to get the body summary - * @param int $truncateAt The maximum allowed size of the summary - * - * @return string|null - */ - public static function bodySummary(MessageInterface $message, $truncateAt = 120) - { - $body = $message->getBody(); - - if (!$body->isSeekable() || !$body->isReadable()) { - return null; - } - - $size = $body->getSize(); - - if ($size === 0) { - return null; - } - - $summary = $body->read($truncateAt); - $body->rewind(); - - if ($size > $truncateAt) { - $summary .= ' (truncated...)'; - } - - // Matches any printable character, including unicode characters: - // letters, marks, numbers, punctuation, spacing, and separators. - if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) { - return null; - } - - return $summary; - } - - /** - * Attempts to rewind a message body and throws an exception on failure. - * - * The body of the message will only be rewound if a call to `tell()` - * returns a value other than `0`. - * - * @param MessageInterface $message Message to rewind - * - * @throws \RuntimeException - */ - public static function rewindBody(MessageInterface $message) - { - $body = $message->getBody(); - - if ($body->tell()) { - $body->rewind(); - } - } - - /** - * Parses an HTTP message into an associative array. - * - * The array contains the "start-line" key containing the start line of - * the message, "headers" key containing an associative array of header - * array values, and a "body" key containing the body of the message. - * - * @param string $message HTTP request or response to parse. - * - * @return array - */ - public static function parseMessage($message) - { - if (!$message) { - throw new \InvalidArgumentException('Invalid message'); - } - - $message = ltrim($message, "\r\n"); - - $messageParts = preg_split("/\r?\n\r?\n/", $message, 2); - - if ($messageParts === false || count($messageParts) !== 2) { - throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); - } - - list($rawHeaders, $body) = $messageParts; - $rawHeaders .= "\r\n"; // Put back the delimiter we split previously - $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); - - if ($headerParts === false || count($headerParts) !== 2) { - throw new \InvalidArgumentException('Invalid message: Missing status line'); - } - - list($startLine, $rawHeaders) = $headerParts; - - if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { - // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 - $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); - } - - /** @var array[] $headerLines */ - $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER); - - // If these aren't the same, then one line didn't match and there's an invalid header. - if ($count !== substr_count($rawHeaders, "\n")) { - // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 - if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { - throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); - } - - throw new \InvalidArgumentException('Invalid header syntax'); - } - - $headers = []; - - foreach ($headerLines as $headerLine) { - $headers[$headerLine[1]][] = $headerLine[2]; - } - - return [ - 'start-line' => $startLine, - 'headers' => $headers, - 'body' => $body, - ]; - } - - /** - * Constructs a URI for an HTTP request message. - * - * @param string $path Path from the start-line - * @param array $headers Array of headers (each value an array). - * - * @return string - */ - public static function parseRequestUri($path, array $headers) - { - $hostKey = array_filter(array_keys($headers), function ($k) { - return strtolower($k) === 'host'; - }); - - // If no host is found, then a full URI cannot be constructed. - if (!$hostKey) { - return $path; - } - - $host = $headers[reset($hostKey)][0]; - $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; - - return $scheme . '://' . $host . '/' . ltrim($path, '/'); - } - - /** - * Parses a request message string into a request object. - * - * @param string $message Request message string. - * - * @return Request - */ - public static function parseRequest($message) - { - $data = self::parseMessage($message); - $matches = []; - if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { - throw new \InvalidArgumentException('Invalid request string'); - } - $parts = explode(' ', $data['start-line'], 3); - $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; - - $request = new Request( - $parts[0], - $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1], - $data['headers'], - $data['body'], - $version - ); - - return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); - } - - /** - * Parses a response message string into a response object. - * - * @param string $message Response message string. - * - * @return Response - */ - public static function parseResponse($message) - { - $data = self::parseMessage($message); - // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space - // between status-code and reason-phrase is required. But browsers accept - // responses without space and reason as well. - if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { - throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); - } - $parts = explode(' ', $data['start-line'], 3); - - return new Response( - (int) $parts[1], - $data['headers'], - $data['body'], - explode('/', $parts[0])[1], - isset($parts[2]) ? $parts[2] : null - ); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/MessageTrait.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/MessageTrait.php deleted file mode 100644 index 994576be..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/MessageTrait.php +++ /dev/null @@ -1,214 +0,0 @@ - array of values */ - private $headers = []; - - /** @var array Map of lowercase header name => original name at registration */ - private $headerNames = []; - - /** @var string */ - private $protocol = '1.1'; - - /** @var StreamInterface|null */ - private $stream; - - public function getProtocolVersion() - { - return $this->protocol; - } - - public function withProtocolVersion($version) - { - if ($this->protocol === $version) { - return $this; - } - - $new = clone $this; - $new->protocol = $version; - return $new; - } - - public function getHeaders() - { - return $this->headers; - } - - public function hasHeader($header) - { - return isset($this->headerNames[strtolower($header)]); - } - - public function getHeader($header) - { - $header = strtolower($header); - - if (!isset($this->headerNames[$header])) { - return []; - } - - $header = $this->headerNames[$header]; - - return $this->headers[$header]; - } - - public function getHeaderLine($header) - { - return implode(', ', $this->getHeader($header)); - } - - public function withHeader($header, $value) - { - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - unset($new->headers[$new->headerNames[$normalized]]); - } - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - - return $new; - } - - public function withAddedHeader($header, $value) - { - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - - $new = clone $this; - if (isset($new->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $new->headers[$header] = array_merge($this->headers[$header], $value); - } else { - $new->headerNames[$normalized] = $header; - $new->headers[$header] = $value; - } - - return $new; - } - - public function withoutHeader($header) - { - $normalized = strtolower($header); - - if (!isset($this->headerNames[$normalized])) { - return $this; - } - - $header = $this->headerNames[$normalized]; - - $new = clone $this; - unset($new->headers[$header], $new->headerNames[$normalized]); - - return $new; - } - - public function getBody() - { - if (!$this->stream) { - $this->stream = Utils::streamFor(''); - } - - return $this->stream; - } - - public function withBody(StreamInterface $body) - { - if ($body === $this->stream) { - return $this; - } - - $new = clone $this; - $new->stream = $body; - return $new; - } - - private function setHeaders(array $headers) - { - $this->headerNames = $this->headers = []; - foreach ($headers as $header => $value) { - if (is_int($header)) { - // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec - // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass. - $header = (string) $header; - } - $this->assertHeader($header); - $value = $this->normalizeHeaderValue($value); - $normalized = strtolower($header); - if (isset($this->headerNames[$normalized])) { - $header = $this->headerNames[$normalized]; - $this->headers[$header] = array_merge($this->headers[$header], $value); - } else { - $this->headerNames[$normalized] = $header; - $this->headers[$header] = $value; - } - } - } - - private function normalizeHeaderValue($value) - { - if (!is_array($value)) { - return $this->trimHeaderValues([$value]); - } - - if (count($value) === 0) { - throw new \InvalidArgumentException('Header value can not be an empty array.'); - } - - return $this->trimHeaderValues($value); - } - - /** - * Trims whitespace from the header values. - * - * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. - * - * header-field = field-name ":" OWS field-value OWS - * OWS = *( SP / HTAB ) - * - * @param string[] $values Header values - * - * @return string[] Trimmed header values - * - * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 - */ - private function trimHeaderValues(array $values) - { - return array_map(function ($value) { - if (!is_scalar($value) && null !== $value) { - throw new \InvalidArgumentException(sprintf( - 'Header value must be scalar or null but %s provided.', - is_object($value) ? get_class($value) : gettype($value) - )); - } - - return trim((string) $value, " \t"); - }, array_values($values)); - } - - private function assertHeader($header) - { - if (!is_string($header)) { - throw new \InvalidArgumentException(sprintf( - 'Header name must be a string but %s provided.', - is_object($header) ? get_class($header) : gettype($header) - )); - } - - if ($header === '') { - throw new \InvalidArgumentException('Header name can not be empty.'); - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/MimeType.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/MimeType.php deleted file mode 100644 index f3068992..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/MimeType.php +++ /dev/null @@ -1,140 +0,0 @@ - 'video/3gpp', - '7z' => 'application/x-7z-compressed', - 'aac' => 'audio/x-aac', - 'ai' => 'application/postscript', - 'aif' => 'audio/x-aiff', - 'asc' => 'text/plain', - 'asf' => 'video/x-ms-asf', - 'atom' => 'application/atom+xml', - 'avi' => 'video/x-msvideo', - 'bmp' => 'image/bmp', - 'bz2' => 'application/x-bzip2', - 'cer' => 'application/pkix-cert', - 'crl' => 'application/pkix-crl', - 'crt' => 'application/x-x509-ca-cert', - 'css' => 'text/css', - 'csv' => 'text/csv', - 'cu' => 'application/cu-seeme', - 'deb' => 'application/x-debian-package', - 'doc' => 'application/msword', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'dvi' => 'application/x-dvi', - 'eot' => 'application/vnd.ms-fontobject', - 'eps' => 'application/postscript', - 'epub' => 'application/epub+zip', - 'etx' => 'text/x-setext', - 'flac' => 'audio/flac', - 'flv' => 'video/x-flv', - 'gif' => 'image/gif', - 'gz' => 'application/gzip', - 'htm' => 'text/html', - 'html' => 'text/html', - 'ico' => 'image/x-icon', - 'ics' => 'text/calendar', - 'ini' => 'text/plain', - 'iso' => 'application/x-iso9660-image', - 'jar' => 'application/java-archive', - 'jpe' => 'image/jpeg', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'js' => 'text/javascript', - 'json' => 'application/json', - 'latex' => 'application/x-latex', - 'log' => 'text/plain', - 'm4a' => 'audio/mp4', - 'm4v' => 'video/mp4', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mov' => 'video/quicktime', - 'mkv' => 'video/x-matroska', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mp4a' => 'audio/mp4', - 'mp4v' => 'video/mp4', - 'mpe' => 'video/mpeg', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpg4' => 'video/mp4', - 'oga' => 'audio/ogg', - 'ogg' => 'audio/ogg', - 'ogv' => 'video/ogg', - 'ogx' => 'application/ogg', - 'pbm' => 'image/x-portable-bitmap', - 'pdf' => 'application/pdf', - 'pgm' => 'image/x-portable-graymap', - 'png' => 'image/png', - 'pnm' => 'image/x-portable-anymap', - 'ppm' => 'image/x-portable-pixmap', - 'ppt' => 'application/vnd.ms-powerpoint', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'ps' => 'application/postscript', - 'qt' => 'video/quicktime', - 'rar' => 'application/x-rar-compressed', - 'ras' => 'image/x-cmu-raster', - 'rss' => 'application/rss+xml', - 'rtf' => 'application/rtf', - 'sgm' => 'text/sgml', - 'sgml' => 'text/sgml', - 'svg' => 'image/svg+xml', - 'swf' => 'application/x-shockwave-flash', - 'tar' => 'application/x-tar', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'torrent' => 'application/x-bittorrent', - 'ttf' => 'application/x-font-ttf', - 'txt' => 'text/plain', - 'wav' => 'audio/x-wav', - 'webm' => 'video/webm', - 'webp' => 'image/webp', - 'wma' => 'audio/x-ms-wma', - 'wmv' => 'video/x-ms-wmv', - 'woff' => 'application/x-font-woff', - 'wsdl' => 'application/wsdl+xml', - 'xbm' => 'image/x-xbitmap', - 'xls' => 'application/vnd.ms-excel', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xml' => 'application/xml', - 'xpm' => 'image/x-xpixmap', - 'xwd' => 'image/x-xwindowdump', - 'yaml' => 'text/yaml', - 'yml' => 'text/yaml', - 'zip' => 'application/zip', - ]; - - $extension = strtolower($extension); - - return isset($mimetypes[$extension]) - ? $mimetypes[$extension] - : null; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/MultipartStream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/MultipartStream.php deleted file mode 100644 index a320ae49..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ /dev/null @@ -1,158 +0,0 @@ -boundary = $boundary ?: sha1(uniqid('', true)); - $this->stream = $this->createStream($elements); - } - - /** - * Get the boundary - * - * @return string - */ - public function getBoundary() - { - return $this->boundary; - } - - public function isWritable() - { - return false; - } - - /** - * Get the headers needed before transferring the content of a POST file - */ - private function getHeaders(array $headers) - { - $str = ''; - foreach ($headers as $key => $value) { - $str .= "{$key}: {$value}\r\n"; - } - - return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; - } - - /** - * Create the aggregate stream that will be used to upload the POST data - */ - protected function createStream(array $elements) - { - $stream = new AppendStream(); - - foreach ($elements as $element) { - $this->addElement($stream, $element); - } - - // Add the trailing boundary with CRLF - $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n")); - - return $stream; - } - - private function addElement(AppendStream $stream, array $element) - { - foreach (['contents', 'name'] as $key) { - if (!array_key_exists($key, $element)) { - throw new \InvalidArgumentException("A '{$key}' key is required"); - } - } - - $element['contents'] = Utils::streamFor($element['contents']); - - if (empty($element['filename'])) { - $uri = $element['contents']->getMetadata('uri'); - if (substr($uri, 0, 6) !== 'php://') { - $element['filename'] = $uri; - } - } - - list($body, $headers) = $this->createElement( - $element['name'], - $element['contents'], - isset($element['filename']) ? $element['filename'] : null, - isset($element['headers']) ? $element['headers'] : [] - ); - - $stream->addStream(Utils::streamFor($this->getHeaders($headers))); - $stream->addStream($body); - $stream->addStream(Utils::streamFor("\r\n")); - } - - /** - * @return array - */ - private function createElement($name, StreamInterface $stream, $filename, array $headers) - { - // Set a default content-disposition header if one was no provided - $disposition = $this->getHeader($headers, 'content-disposition'); - if (!$disposition) { - $headers['Content-Disposition'] = ($filename === '0' || $filename) - ? sprintf( - 'form-data; name="%s"; filename="%s"', - $name, - basename($filename) - ) - : "form-data; name=\"{$name}\""; - } - - // Set a default content-length header if one was no provided - $length = $this->getHeader($headers, 'content-length'); - if (!$length) { - if ($length = $stream->getSize()) { - $headers['Content-Length'] = (string) $length; - } - } - - // Set a default Content-Type if one was not supplied - $type = $this->getHeader($headers, 'content-type'); - if (!$type && ($filename === '0' || $filename)) { - if ($type = MimeType::fromFilename($filename)) { - $headers['Content-Type'] = $type; - } - } - - return [$stream, $headers]; - } - - private function getHeader(array $headers, $key) - { - $lowercaseHeader = strtolower($key); - foreach ($headers as $k => $v) { - if (strtolower($k) === $lowercaseHeader) { - return $v; - } - } - - return null; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/NoSeekStream.php deleted file mode 100644 index 9d962e1d..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/NoSeekStream.php +++ /dev/null @@ -1,25 +0,0 @@ -source = $source; - $this->size = isset($options['size']) ? $options['size'] : null; - $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; - $this->buffer = new BufferStream(); - } - - public function __toString() - { - try { - return Utils::copyToString($this); - } catch (\Exception $e) { - return ''; - } - } - - public function close() - { - $this->detach(); - } - - public function detach() - { - $this->tellPos = false; - $this->source = null; - - return null; - } - - public function getSize() - { - return $this->size; - } - - public function tell() - { - return $this->tellPos; - } - - public function eof() - { - return !$this->source; - } - - public function isSeekable() - { - return false; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - throw new \RuntimeException('Cannot seek a PumpStream'); - } - - public function isWritable() - { - return false; - } - - public function write($string) - { - throw new \RuntimeException('Cannot write to a PumpStream'); - } - - public function isReadable() - { - return true; - } - - public function read($length) - { - $data = $this->buffer->read($length); - $readLen = strlen($data); - $this->tellPos += $readLen; - $remaining = $length - $readLen; - - if ($remaining) { - $this->pump($remaining); - $data .= $this->buffer->read($remaining); - $this->tellPos += strlen($data) - $readLen; - } - - return $data; - } - - public function getContents() - { - $result = ''; - while (!$this->eof()) { - $result .= $this->read(1000000); - } - - return $result; - } - - public function getMetadata($key = null) - { - if (!$key) { - return $this->metadata; - } - - return isset($this->metadata[$key]) ? $this->metadata[$key] : null; - } - - private function pump($length) - { - if ($this->source) { - do { - $data = call_user_func($this->source, $length); - if ($data === false || $data === null) { - $this->source = null; - return; - } - $this->buffer->write($data); - $length -= strlen($data); - } while ($length > 0); - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Query.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Query.php deleted file mode 100644 index 586d2ad4..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Query.php +++ /dev/null @@ -1,113 +0,0 @@ - '1', 'foo[b]' => '2'])`. - * - * @param string $str Query string to parse - * @param int|bool $urlEncoding How the query string is encoded - * - * @return array - */ - public static function parse($str, $urlEncoding = true) - { - $result = []; - - if ($str === '') { - return $result; - } - - if ($urlEncoding === true) { - $decoder = function ($value) { - return rawurldecode(str_replace('+', ' ', $value)); - }; - } elseif ($urlEncoding === PHP_QUERY_RFC3986) { - $decoder = 'rawurldecode'; - } elseif ($urlEncoding === PHP_QUERY_RFC1738) { - $decoder = 'urldecode'; - } else { - $decoder = function ($str) { - return $str; - }; - } - - foreach (explode('&', $str) as $kvp) { - $parts = explode('=', $kvp, 2); - $key = $decoder($parts[0]); - $value = isset($parts[1]) ? $decoder($parts[1]) : null; - if (!isset($result[$key])) { - $result[$key] = $value; - } else { - if (!is_array($result[$key])) { - $result[$key] = [$result[$key]]; - } - $result[$key][] = $value; - } - } - - return $result; - } - - /** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of `parse()` to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like `http_build_query()` would). - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - * - * @return string - */ - public static function build(array $params, $encoding = PHP_QUERY_RFC3986) - { - if (!$params) { - return ''; - } - - if ($encoding === false) { - $encoder = function ($str) { - return $str; - }; - } elseif ($encoding === PHP_QUERY_RFC3986) { - $encoder = 'rawurlencode'; - } elseif ($encoding === PHP_QUERY_RFC1738) { - $encoder = 'urlencode'; - } else { - throw new \InvalidArgumentException('Invalid type'); - } - - $qs = ''; - foreach ($params as $k => $v) { - $k = $encoder($k); - if (!is_array($v)) { - $qs .= $k; - if ($v !== null) { - $qs .= '=' . $encoder($v); - } - $qs .= '&'; - } else { - foreach ($v as $vv) { - $qs .= $k; - if ($vv !== null) { - $qs .= '=' . $encoder($vv); - } - $qs .= '&'; - } - } - } - - return $qs ? (string) substr($qs, 0, -1) : ''; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Request.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Request.php deleted file mode 100644 index ffd37be6..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Request.php +++ /dev/null @@ -1,152 +0,0 @@ -assertMethod($method); - if (!($uri instanceof UriInterface)) { - $uri = new Uri($uri); - } - - $this->method = strtoupper($method); - $this->uri = $uri; - $this->setHeaders($headers); - $this->protocol = $version; - - if (!isset($this->headerNames['host'])) { - $this->updateHostFromUri(); - } - - if ($body !== '' && $body !== null) { - $this->stream = Utils::streamFor($body); - } - } - - public function getRequestTarget() - { - if ($this->requestTarget !== null) { - return $this->requestTarget; - } - - $target = $this->uri->getPath(); - if ($target == '') { - $target = '/'; - } - if ($this->uri->getQuery() != '') { - $target .= '?' . $this->uri->getQuery(); - } - - return $target; - } - - public function withRequestTarget($requestTarget) - { - if (preg_match('#\s#', $requestTarget)) { - throw new InvalidArgumentException( - 'Invalid request target provided; cannot contain whitespace' - ); - } - - $new = clone $this; - $new->requestTarget = $requestTarget; - return $new; - } - - public function getMethod() - { - return $this->method; - } - - public function withMethod($method) - { - $this->assertMethod($method); - $new = clone $this; - $new->method = strtoupper($method); - return $new; - } - - public function getUri() - { - return $this->uri; - } - - public function withUri(UriInterface $uri, $preserveHost = false) - { - if ($uri === $this->uri) { - return $this; - } - - $new = clone $this; - $new->uri = $uri; - - if (!$preserveHost || !isset($this->headerNames['host'])) { - $new->updateHostFromUri(); - } - - return $new; - } - - private function updateHostFromUri() - { - $host = $this->uri->getHost(); - - if ($host == '') { - return; - } - - if (($port = $this->uri->getPort()) !== null) { - $host .= ':' . $port; - } - - if (isset($this->headerNames['host'])) { - $header = $this->headerNames['host']; - } else { - $header = 'Host'; - $this->headerNames['host'] = 'Host'; - } - // Ensure Host is the first header. - // See: http://tools.ietf.org/html/rfc7230#section-5.4 - $this->headers = [$header => [$host]] + $this->headers; - } - - private function assertMethod($method) - { - if (!is_string($method) || $method === '') { - throw new \InvalidArgumentException('Method must be a non-empty string.'); - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Response.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Response.php deleted file mode 100644 index 928f72dc..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Response.php +++ /dev/null @@ -1,155 +0,0 @@ - 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-status', - 208 => 'Already Reported', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => 'Switch Proxy', - 307 => 'Temporary Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Time-out', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Large', - 415 => 'Unsupported Media Type', - 416 => 'Requested range not satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', - 422 => 'Unprocessable Entity', - 423 => 'Locked', - 424 => 'Failed Dependency', - 425 => 'Unordered Collection', - 426 => 'Upgrade Required', - 428 => 'Precondition Required', - 429 => 'Too Many Requests', - 431 => 'Request Header Fields Too Large', - 451 => 'Unavailable For Legal Reasons', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Time-out', - 505 => 'HTTP Version not supported', - 506 => 'Variant Also Negotiates', - 507 => 'Insufficient Storage', - 508 => 'Loop Detected', - 511 => 'Network Authentication Required', - ]; - - /** @var string */ - private $reasonPhrase = ''; - - /** @var int */ - private $statusCode = 200; - - /** - * @param int $status Status code - * @param array $headers Response headers - * @param string|resource|StreamInterface|null $body Response body - * @param string $version Protocol version - * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) - */ - public function __construct( - $status = 200, - array $headers = [], - $body = null, - $version = '1.1', - $reason = null - ) { - $this->assertStatusCodeIsInteger($status); - $status = (int) $status; - $this->assertStatusCodeRange($status); - - $this->statusCode = $status; - - if ($body !== '' && $body !== null) { - $this->stream = Utils::streamFor($body); - } - - $this->setHeaders($headers); - if ($reason == '' && isset(self::$phrases[$this->statusCode])) { - $this->reasonPhrase = self::$phrases[$this->statusCode]; - } else { - $this->reasonPhrase = (string) $reason; - } - - $this->protocol = $version; - } - - public function getStatusCode() - { - return $this->statusCode; - } - - public function getReasonPhrase() - { - return $this->reasonPhrase; - } - - public function withStatus($code, $reasonPhrase = '') - { - $this->assertStatusCodeIsInteger($code); - $code = (int) $code; - $this->assertStatusCodeRange($code); - - $new = clone $this; - $new->statusCode = $code; - if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { - $reasonPhrase = self::$phrases[$new->statusCode]; - } - $new->reasonPhrase = (string) $reasonPhrase; - return $new; - } - - private function assertStatusCodeIsInteger($statusCode) - { - if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) { - throw new \InvalidArgumentException('Status code must be an integer value.'); - } - } - - private function assertStatusCodeRange($statusCode) - { - if ($statusCode < 100 || $statusCode >= 600) { - throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Rfc7230.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Rfc7230.php deleted file mode 100644 index 52fdb678..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Rfc7230.php +++ /dev/null @@ -1,19 +0,0 @@ -@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; - const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/ServerRequest.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/ServerRequest.php deleted file mode 100644 index 0712676a..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ /dev/null @@ -1,379 +0,0 @@ -serverParams = $serverParams; - - parent::__construct($method, $uri, $headers, $body, $version); - } - - /** - * Return an UploadedFile instance array. - * - * @param array $files A array which respect $_FILES structure - * - * @return array - * - * @throws InvalidArgumentException for unrecognized values - */ - public static function normalizeFiles(array $files) - { - $normalized = []; - - foreach ($files as $key => $value) { - if ($value instanceof UploadedFileInterface) { - $normalized[$key] = $value; - } elseif (is_array($value) && isset($value['tmp_name'])) { - $normalized[$key] = self::createUploadedFileFromSpec($value); - } elseif (is_array($value)) { - $normalized[$key] = self::normalizeFiles($value); - continue; - } else { - throw new InvalidArgumentException('Invalid value in files specification'); - } - } - - return $normalized; - } - - /** - * Create and return an UploadedFile instance from a $_FILES specification. - * - * If the specification represents an array of values, this method will - * delegate to normalizeNestedFileSpec() and return that return value. - * - * @param array $value $_FILES struct - * - * @return array|UploadedFileInterface - */ - private static function createUploadedFileFromSpec(array $value) - { - if (is_array($value['tmp_name'])) { - return self::normalizeNestedFileSpec($value); - } - - return new UploadedFile( - $value['tmp_name'], - (int) $value['size'], - (int) $value['error'], - $value['name'], - $value['type'] - ); - } - - /** - * Normalize an array of file specifications. - * - * Loops through all nested files and returns a normalized array of - * UploadedFileInterface instances. - * - * @param array $files - * - * @return UploadedFileInterface[] - */ - private static function normalizeNestedFileSpec(array $files = []) - { - $normalizedFiles = []; - - foreach (array_keys($files['tmp_name']) as $key) { - $spec = [ - 'tmp_name' => $files['tmp_name'][$key], - 'size' => $files['size'][$key], - 'error' => $files['error'][$key], - 'name' => $files['name'][$key], - 'type' => $files['type'][$key], - ]; - $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); - } - - return $normalizedFiles; - } - - /** - * Return a ServerRequest populated with superglobals: - * $_GET - * $_POST - * $_COOKIE - * $_FILES - * $_SERVER - * - * @return ServerRequestInterface - */ - public static function fromGlobals() - { - $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; - $headers = getallheaders(); - $uri = self::getUriFromGlobals(); - $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); - $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; - - $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); - - return $serverRequest - ->withCookieParams($_COOKIE) - ->withQueryParams($_GET) - ->withParsedBody($_POST) - ->withUploadedFiles(self::normalizeFiles($_FILES)); - } - - private static function extractHostAndPortFromAuthority($authority) - { - $uri = 'http://' . $authority; - $parts = parse_url($uri); - if (false === $parts) { - return [null, null]; - } - - $host = isset($parts['host']) ? $parts['host'] : null; - $port = isset($parts['port']) ? $parts['port'] : null; - - return [$host, $port]; - } - - /** - * Get a Uri populated with values from $_SERVER. - * - * @return UriInterface - */ - public static function getUriFromGlobals() - { - $uri = new Uri(''); - - $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); - - $hasPort = false; - if (isset($_SERVER['HTTP_HOST'])) { - list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); - if ($host !== null) { - $uri = $uri->withHost($host); - } - - if ($port !== null) { - $hasPort = true; - $uri = $uri->withPort($port); - } - } elseif (isset($_SERVER['SERVER_NAME'])) { - $uri = $uri->withHost($_SERVER['SERVER_NAME']); - } elseif (isset($_SERVER['SERVER_ADDR'])) { - $uri = $uri->withHost($_SERVER['SERVER_ADDR']); - } - - if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { - $uri = $uri->withPort($_SERVER['SERVER_PORT']); - } - - $hasQuery = false; - if (isset($_SERVER['REQUEST_URI'])) { - $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2); - $uri = $uri->withPath($requestUriParts[0]); - if (isset($requestUriParts[1])) { - $hasQuery = true; - $uri = $uri->withQuery($requestUriParts[1]); - } - } - - if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { - $uri = $uri->withQuery($_SERVER['QUERY_STRING']); - } - - return $uri; - } - - /** - * {@inheritdoc} - */ - public function getServerParams() - { - return $this->serverParams; - } - - /** - * {@inheritdoc} - */ - public function getUploadedFiles() - { - return $this->uploadedFiles; - } - - /** - * {@inheritdoc} - */ - public function withUploadedFiles(array $uploadedFiles) - { - $new = clone $this; - $new->uploadedFiles = $uploadedFiles; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getCookieParams() - { - return $this->cookieParams; - } - - /** - * {@inheritdoc} - */ - public function withCookieParams(array $cookies) - { - $new = clone $this; - $new->cookieParams = $cookies; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getQueryParams() - { - return $this->queryParams; - } - - /** - * {@inheritdoc} - */ - public function withQueryParams(array $query) - { - $new = clone $this; - $new->queryParams = $query; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getParsedBody() - { - return $this->parsedBody; - } - - /** - * {@inheritdoc} - */ - public function withParsedBody($data) - { - $new = clone $this; - $new->parsedBody = $data; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * {@inheritdoc} - */ - public function getAttribute($attribute, $default = null) - { - if (false === array_key_exists($attribute, $this->attributes)) { - return $default; - } - - return $this->attributes[$attribute]; - } - - /** - * {@inheritdoc} - */ - public function withAttribute($attribute, $value) - { - $new = clone $this; - $new->attributes[$attribute] = $value; - - return $new; - } - - /** - * {@inheritdoc} - */ - public function withoutAttribute($attribute) - { - if (false === array_key_exists($attribute, $this->attributes)) { - return $this; - } - - $new = clone $this; - unset($new->attributes[$attribute]); - - return $new; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Stream.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Stream.php deleted file mode 100644 index 8720a6e5..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Stream.php +++ /dev/null @@ -1,270 +0,0 @@ -size = $options['size']; - } - - $this->customMetadata = isset($options['metadata']) - ? $options['metadata'] - : []; - - $this->stream = $stream; - $meta = stream_get_meta_data($this->stream); - $this->seekable = $meta['seekable']; - $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']); - $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']); - $this->uri = $this->getMetadata('uri'); - } - - /** - * Closes the stream when the destructed - */ - public function __destruct() - { - $this->close(); - } - - public function __toString() - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - return $this->getContents(); - } catch (\Exception $e) { - return ''; - } - } - - public function getContents() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - $contents = stream_get_contents($this->stream); - - if ($contents === false) { - throw new \RuntimeException('Unable to read stream contents'); - } - - return $contents; - } - - public function close() - { - if (isset($this->stream)) { - if (is_resource($this->stream)) { - fclose($this->stream); - } - $this->detach(); - } - } - - public function detach() - { - if (!isset($this->stream)) { - return null; - } - - $result = $this->stream; - unset($this->stream); - $this->size = $this->uri = null; - $this->readable = $this->writable = $this->seekable = false; - - return $result; - } - - public function getSize() - { - if ($this->size !== null) { - return $this->size; - } - - if (!isset($this->stream)) { - return null; - } - - // Clear the stat cache if the stream has a URI - if ($this->uri) { - clearstatcache(true, $this->uri); - } - - $stats = fstat($this->stream); - if (isset($stats['size'])) { - $this->size = $stats['size']; - return $this->size; - } - - return null; - } - - public function isReadable() - { - return $this->readable; - } - - public function isWritable() - { - return $this->writable; - } - - public function isSeekable() - { - return $this->seekable; - } - - public function eof() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - return feof($this->stream); - } - - public function tell() - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - - $result = ftell($this->stream); - - if ($result === false) { - throw new \RuntimeException('Unable to determine stream position'); - } - - return $result; - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - $whence = (int) $whence; - - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->seekable) { - throw new \RuntimeException('Stream is not seekable'); - } - if (fseek($this->stream, $offset, $whence) === -1) { - throw new \RuntimeException('Unable to seek to stream position ' - . $offset . ' with whence ' . var_export($whence, true)); - } - } - - public function read($length) - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->readable) { - throw new \RuntimeException('Cannot read from non-readable stream'); - } - if ($length < 0) { - throw new \RuntimeException('Length parameter cannot be negative'); - } - - if (0 === $length) { - return ''; - } - - $string = fread($this->stream, $length); - if (false === $string) { - throw new \RuntimeException('Unable to read from stream'); - } - - return $string; - } - - public function write($string) - { - if (!isset($this->stream)) { - throw new \RuntimeException('Stream is detached'); - } - if (!$this->writable) { - throw new \RuntimeException('Cannot write to a non-writable stream'); - } - - // We can't know the size after writing anything - $this->size = null; - $result = fwrite($this->stream, $string); - - if ($result === false) { - throw new \RuntimeException('Unable to write to stream'); - } - - return $result; - } - - public function getMetadata($key = null) - { - if (!isset($this->stream)) { - return $key ? null : []; - } elseif (!$key) { - return $this->customMetadata + stream_get_meta_data($this->stream); - } elseif (isset($this->customMetadata[$key])) { - return $this->customMetadata[$key]; - } - - $meta = stream_get_meta_data($this->stream); - - return isset($meta[$key]) ? $meta[$key] : null; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php deleted file mode 100644 index a0a24eec..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +++ /dev/null @@ -1,152 +0,0 @@ -stream = $stream; - } - - /** - * Magic method used to create a new stream if streams are not added in - * the constructor of a decorator (e.g., LazyOpenStream). - * - * @param string $name Name of the property (allows "stream" only). - * - * @return StreamInterface - */ - public function __get($name) - { - if ($name == 'stream') { - $this->stream = $this->createStream(); - return $this->stream; - } - - throw new \UnexpectedValueException("$name not found on class"); - } - - public function __toString() - { - try { - if ($this->isSeekable()) { - $this->seek(0); - } - return $this->getContents(); - } catch (\Exception $e) { - // Really, PHP? https://bugs.php.net/bug.php?id=53648 - trigger_error('StreamDecorator::__toString exception: ' - . (string) $e, E_USER_ERROR); - return ''; - } - } - - public function getContents() - { - return Utils::copyToString($this); - } - - /** - * Allow decorators to implement custom methods - * - * @param string $method Missing method name - * @param array $args Method arguments - * - * @return mixed - */ - public function __call($method, array $args) - { - $result = call_user_func_array([$this->stream, $method], $args); - - // Always return the wrapped object if the result is a return $this - return $result === $this->stream ? $this : $result; - } - - public function close() - { - $this->stream->close(); - } - - public function getMetadata($key = null) - { - return $this->stream->getMetadata($key); - } - - public function detach() - { - return $this->stream->detach(); - } - - public function getSize() - { - return $this->stream->getSize(); - } - - public function eof() - { - return $this->stream->eof(); - } - - public function tell() - { - return $this->stream->tell(); - } - - public function isReadable() - { - return $this->stream->isReadable(); - } - - public function isWritable() - { - return $this->stream->isWritable(); - } - - public function isSeekable() - { - return $this->stream->isSeekable(); - } - - public function rewind() - { - $this->seek(0); - } - - public function seek($offset, $whence = SEEK_SET) - { - $this->stream->seek($offset, $whence); - } - - public function read($length) - { - return $this->stream->read($length); - } - - public function write($string) - { - return $this->stream->write($string); - } - - /** - * Implement in subclasses to dynamically create streams when requested. - * - * @return StreamInterface - * - * @throws \BadMethodCallException - */ - protected function createStream() - { - throw new \BadMethodCallException('Not implemented'); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/StreamWrapper.php deleted file mode 100644 index 428fb314..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/StreamWrapper.php +++ /dev/null @@ -1,165 +0,0 @@ -isReadable()) { - $mode = $stream->isWritable() ? 'r+' : 'r'; - } elseif ($stream->isWritable()) { - $mode = 'w'; - } else { - throw new \InvalidArgumentException('The stream must be readable, ' - . 'writable, or both.'); - } - - return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream)); - } - - /** - * Creates a stream context that can be used to open a stream as a php stream resource. - * - * @param StreamInterface $stream - * - * @return resource - */ - public static function createStreamContext(StreamInterface $stream) - { - return stream_context_create([ - 'guzzle' => ['stream' => $stream] - ]); - } - - /** - * Registers the stream wrapper if needed - */ - public static function register() - { - if (!in_array('guzzle', stream_get_wrappers())) { - stream_wrapper_register('guzzle', __CLASS__); - } - } - - public function stream_open($path, $mode, $options, &$opened_path) - { - $options = stream_context_get_options($this->context); - - if (!isset($options['guzzle']['stream'])) { - return false; - } - - $this->mode = $mode; - $this->stream = $options['guzzle']['stream']; - - return true; - } - - public function stream_read($count) - { - return $this->stream->read($count); - } - - public function stream_write($data) - { - return (int) $this->stream->write($data); - } - - public function stream_tell() - { - return $this->stream->tell(); - } - - public function stream_eof() - { - return $this->stream->eof(); - } - - public function stream_seek($offset, $whence) - { - $this->stream->seek($offset, $whence); - - return true; - } - - public function stream_cast($cast_as) - { - $stream = clone($this->stream); - - return $stream->detach(); - } - - public function stream_stat() - { - static $modeMap = [ - 'r' => 33060, - 'rb' => 33060, - 'r+' => 33206, - 'w' => 33188, - 'wb' => 33188 - ]; - - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => $modeMap[$this->mode], - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => $this->stream->getSize() ?: 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0 - ]; - } - - public function url_stat($path, $flags) - { - return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => 0, - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, - 'blksize' => 0, - 'blocks' => 0 - ]; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/UploadedFile.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/UploadedFile.php deleted file mode 100644 index d4f6a579..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/UploadedFile.php +++ /dev/null @@ -1,328 +0,0 @@ -setError($errorStatus); - $this->setSize($size); - $this->setClientFilename($clientFilename); - $this->setClientMediaType($clientMediaType); - - if ($this->isOk()) { - $this->setStreamOrFile($streamOrFile); - } - } - - /** - * Depending on the value set file or stream variable - * - * @param mixed $streamOrFile - * - * @throws InvalidArgumentException - */ - private function setStreamOrFile($streamOrFile) - { - if (is_string($streamOrFile)) { - $this->file = $streamOrFile; - } elseif (is_resource($streamOrFile)) { - $this->stream = new Stream($streamOrFile); - } elseif ($streamOrFile instanceof StreamInterface) { - $this->stream = $streamOrFile; - } else { - throw new InvalidArgumentException( - 'Invalid stream or file provided for UploadedFile' - ); - } - } - - /** - * @param int $error - * - * @throws InvalidArgumentException - */ - private function setError($error) - { - if (false === is_int($error)) { - throw new InvalidArgumentException( - 'Upload file error status must be an integer' - ); - } - - if (false === in_array($error, UploadedFile::$errors)) { - throw new InvalidArgumentException( - 'Invalid error status for UploadedFile' - ); - } - - $this->error = $error; - } - - /** - * @param int $size - * - * @throws InvalidArgumentException - */ - private function setSize($size) - { - if (false === is_int($size)) { - throw new InvalidArgumentException( - 'Upload file size must be an integer' - ); - } - - $this->size = $size; - } - - /** - * @param mixed $param - * - * @return bool - */ - private function isStringOrNull($param) - { - return in_array(gettype($param), ['string', 'NULL']); - } - - /** - * @param mixed $param - * - * @return bool - */ - private function isStringNotEmpty($param) - { - return is_string($param) && false === empty($param); - } - - /** - * @param string|null $clientFilename - * - * @throws InvalidArgumentException - */ - private function setClientFilename($clientFilename) - { - if (false === $this->isStringOrNull($clientFilename)) { - throw new InvalidArgumentException( - 'Upload file client filename must be a string or null' - ); - } - - $this->clientFilename = $clientFilename; - } - - /** - * @param string|null $clientMediaType - * - * @throws InvalidArgumentException - */ - private function setClientMediaType($clientMediaType) - { - if (false === $this->isStringOrNull($clientMediaType)) { - throw new InvalidArgumentException( - 'Upload file client media type must be a string or null' - ); - } - - $this->clientMediaType = $clientMediaType; - } - - /** - * Return true if there is no upload error - * - * @return bool - */ - private function isOk() - { - return $this->error === UPLOAD_ERR_OK; - } - - /** - * @return bool - */ - public function isMoved() - { - return $this->moved; - } - - /** - * @throws RuntimeException if is moved or not ok - */ - private function validateActive() - { - if (false === $this->isOk()) { - throw new RuntimeException('Cannot retrieve stream due to upload error'); - } - - if ($this->isMoved()) { - throw new RuntimeException('Cannot retrieve stream after it has already been moved'); - } - } - - /** - * {@inheritdoc} - * - * @throws RuntimeException if the upload was not successful. - */ - public function getStream() - { - $this->validateActive(); - - if ($this->stream instanceof StreamInterface) { - return $this->stream; - } - - return new LazyOpenStream($this->file, 'r+'); - } - - /** - * {@inheritdoc} - * - * @see http://php.net/is_uploaded_file - * @see http://php.net/move_uploaded_file - * - * @param string $targetPath Path to which to move the uploaded file. - * - * @throws RuntimeException if the upload was not successful. - * @throws InvalidArgumentException if the $path specified is invalid. - * @throws RuntimeException on any error during the move operation, or on - * the second or subsequent call to the method. - */ - public function moveTo($targetPath) - { - $this->validateActive(); - - if (false === $this->isStringNotEmpty($targetPath)) { - throw new InvalidArgumentException( - 'Invalid path provided for move operation; must be a non-empty string' - ); - } - - if ($this->file) { - $this->moved = php_sapi_name() == 'cli' - ? rename($this->file, $targetPath) - : move_uploaded_file($this->file, $targetPath); - } else { - Utils::copyToStream( - $this->getStream(), - new LazyOpenStream($targetPath, 'w') - ); - - $this->moved = true; - } - - if (false === $this->moved) { - throw new RuntimeException( - sprintf('Uploaded file could not be moved to %s', $targetPath) - ); - } - } - - /** - * {@inheritdoc} - * - * @return int|null The file size in bytes or null if unknown. - */ - public function getSize() - { - return $this->size; - } - - /** - * {@inheritdoc} - * - * @see http://php.net/manual/en/features.file-upload.errors.php - * - * @return int One of PHP's UPLOAD_ERR_XXX constants. - */ - public function getError() - { - return $this->error; - } - - /** - * {@inheritdoc} - * - * @return string|null The filename sent by the client or null if none - * was provided. - */ - public function getClientFilename() - { - return $this->clientFilename; - } - - /** - * {@inheritdoc} - */ - public function getClientMediaType() - { - return $this->clientMediaType; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Uri.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Uri.php deleted file mode 100644 index 53424d8a..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Uri.php +++ /dev/null @@ -1,810 +0,0 @@ - 80, - 'https' => 443, - 'ftp' => 21, - 'gopher' => 70, - 'nntp' => 119, - 'news' => 119, - 'telnet' => 23, - 'tn3270' => 23, - 'imap' => 143, - 'pop' => 110, - 'ldap' => 389, - ]; - - private static $charUnreserved = 'a-zA-Z0-9_\-\.~'; - private static $charSubDelims = '!\$&\'\(\)\*\+,;='; - private static $replaceQuery = ['=' => '%3D', '&' => '%26']; - - /** @var string Uri scheme. */ - private $scheme = ''; - - /** @var string Uri user info. */ - private $userInfo = ''; - - /** @var string Uri host. */ - private $host = ''; - - /** @var int|null Uri port. */ - private $port; - - /** @var string Uri path. */ - private $path = ''; - - /** @var string Uri query string. */ - private $query = ''; - - /** @var string Uri fragment. */ - private $fragment = ''; - - /** - * @param string $uri URI to parse - */ - public function __construct($uri = '') - { - // weak type check to also accept null until we can add scalar type hints - if ($uri != '') { - $parts = self::parse($uri); - if ($parts === false) { - throw new \InvalidArgumentException("Unable to parse URI: $uri"); - } - $this->applyParts($parts); - } - } - - /** - * UTF-8 aware \parse_url() replacement. - * - * The internal function produces broken output for non ASCII domain names - * (IDN) when used with locales other than "C". - * - * On the other hand, cURL understands IDN correctly only when UTF-8 locale - * is configured ("C.UTF-8", "en_US.UTF-8", etc.). - * - * @see https://bugs.php.net/bug.php?id=52923 - * @see https://www.php.net/manual/en/function.parse-url.php#114817 - * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING - * - * @param string $url - * - * @return array|false - */ - private static function parse($url) - { - // If IPv6 - $prefix = ''; - if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) { - $prefix = $matches[1]; - $url = $matches[2]; - } - - $encodedUrl = preg_replace_callback( - '%[^:/@?&=#]+%usD', - static function ($matches) { - return urlencode($matches[0]); - }, - $url - ); - - $result = parse_url($prefix . $encodedUrl); - - if ($result === false) { - return false; - } - - return array_map('urldecode', $result); - } - - public function __toString() - { - return self::composeComponents( - $this->scheme, - $this->getAuthority(), - $this->path, - $this->query, - $this->fragment - ); - } - - /** - * Composes a URI reference string from its various components. - * - * Usually this method does not need to be called manually but instead is used indirectly via - * `Doofinder\Psr\Http\Message\UriInterface::__toString`. - * - * PSR-7 UriInterface treats an empty component the same as a missing component as - * getQuery(), getFragment() etc. always return a string. This explains the slight - * difference to RFC 3986 Section 5.3. - * - * Another adjustment is that the authority separator is added even when the authority is missing/empty - * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with - * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But - * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to - * that format). - * - * @param string $scheme - * @param string $authority - * @param string $path - * @param string $query - * @param string $fragment - * - * @return string - * - * @link https://tools.ietf.org/html/rfc3986#section-5.3 - */ - public static function composeComponents($scheme, $authority, $path, $query, $fragment) - { - $uri = ''; - - // weak type checks to also accept null until we can add scalar type hints - if ($scheme != '') { - $uri .= $scheme . ':'; - } - - if ($authority != ''|| $scheme === 'file') { - $uri .= '//' . $authority; - } - - $uri .= $path; - - if ($query != '') { - $uri .= '?' . $query; - } - - if ($fragment != '') { - $uri .= '#' . $fragment; - } - - return $uri; - } - - /** - * Whether the URI has the default port of the current scheme. - * - * `Doofinder\Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used - * independently of the implementation. - * - * @param UriInterface $uri - * - * @return bool - */ - public static function isDefaultPort(UriInterface $uri) - { - return $uri->getPort() === null - || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]); - } - - /** - * Whether the URI is absolute, i.e. it has a scheme. - * - * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true - * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative - * to another URI, the base URI. Relative references can be divided into several forms: - * - network-path references, e.g. '//example.com/path' - * - absolute-path references, e.g. '/path' - * - relative-path references, e.g. 'subpath' - * - * @param UriInterface $uri - * - * @return bool - * - * @see Uri::isNetworkPathReference - * @see Uri::isAbsolutePathReference - * @see Uri::isRelativePathReference - * @link https://tools.ietf.org/html/rfc3986#section-4 - */ - public static function isAbsolute(UriInterface $uri) - { - return $uri->getScheme() !== ''; - } - - /** - * Whether the URI is a network-path reference. - * - * A relative reference that begins with two slash characters is termed an network-path reference. - * - * @param UriInterface $uri - * - * @return bool - * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isNetworkPathReference(UriInterface $uri) - { - return $uri->getScheme() === '' && $uri->getAuthority() !== ''; - } - - /** - * Whether the URI is a absolute-path reference. - * - * A relative reference that begins with a single slash character is termed an absolute-path reference. - * - * @param UriInterface $uri - * - * @return bool - * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isAbsolutePathReference(UriInterface $uri) - { - return $uri->getScheme() === '' - && $uri->getAuthority() === '' - && isset($uri->getPath()[0]) - && $uri->getPath()[0] === '/'; - } - - /** - * Whether the URI is a relative-path reference. - * - * A relative reference that does not begin with a slash character is termed a relative-path reference. - * - * @param UriInterface $uri - * - * @return bool - * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 - */ - public static function isRelativePathReference(UriInterface $uri) - { - return $uri->getScheme() === '' - && $uri->getAuthority() === '' - && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); - } - - /** - * Whether the URI is a same-document reference. - * - * A same-document reference refers to a URI that is, aside from its fragment - * component, identical to the base URI. When no base URI is given, only an empty - * URI reference (apart from its fragment) is considered a same-document reference. - * - * @param UriInterface $uri The URI to check - * @param UriInterface|null $base An optional base URI to compare against - * - * @return bool - * - * @link https://tools.ietf.org/html/rfc3986#section-4.4 - */ - public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) - { - if ($base !== null) { - $uri = UriResolver::resolve($base, $uri); - - return ($uri->getScheme() === $base->getScheme()) - && ($uri->getAuthority() === $base->getAuthority()) - && ($uri->getPath() === $base->getPath()) - && ($uri->getQuery() === $base->getQuery()); - } - - return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; - } - - /** - * Removes dot segments from a path and returns the new path. - * - * @param string $path - * - * @return string - * - * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. - * @see UriResolver::removeDotSegments - */ - public static function removeDotSegments($path) - { - return UriResolver::removeDotSegments($path); - } - - /** - * Converts the relative URI into a new URI that is resolved against the base URI. - * - * @param UriInterface $base Base URI - * @param string|UriInterface $rel Relative URI - * - * @return UriInterface - * - * @deprecated since version 1.4. Use UriResolver::resolve instead. - * @see UriResolver::resolve - */ - public static function resolve(UriInterface $base, $rel) - { - if (!($rel instanceof UriInterface)) { - $rel = new self($rel); - } - - return UriResolver::resolve($base, $rel); - } - - /** - * Creates a new URI with a specific query string value removed. - * - * Any existing query string values that exactly match the provided key are - * removed. - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Query string key to remove. - * - * @return UriInterface - */ - public static function withoutQueryValue(UriInterface $uri, $key) - { - $result = self::getFilteredQueryString($uri, [$key]); - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a new URI with a specific query string value. - * - * Any existing query string values that exactly match the provided key are - * removed and replaced with the given key value pair. - * - * A value of null will set the query string key without a value, e.g. "key" - * instead of "key=value". - * - * @param UriInterface $uri URI to use as a base. - * @param string $key Key to set. - * @param string|null $value Value to set - * - * @return UriInterface - */ - public static function withQueryValue(UriInterface $uri, $key, $value) - { - $result = self::getFilteredQueryString($uri, [$key]); - - $result[] = self::generateQueryString($key, $value); - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a new URI with multiple specific query string values. - * - * It has the same behavior as withQueryValue() but for an associative array of key => value. - * - * @param UriInterface $uri URI to use as a base. - * @param array $keyValueArray Associative array of key and values - * - * @return UriInterface - */ - public static function withQueryValues(UriInterface $uri, array $keyValueArray) - { - $result = self::getFilteredQueryString($uri, array_keys($keyValueArray)); - - foreach ($keyValueArray as $key => $value) { - $result[] = self::generateQueryString($key, $value); - } - - return $uri->withQuery(implode('&', $result)); - } - - /** - * Creates a URI from a hash of `parse_url` components. - * - * @param array $parts - * - * @return UriInterface - * - * @link http://php.net/manual/en/function.parse-url.php - * - * @throws \InvalidArgumentException If the components do not form a valid URI. - */ - public static function fromParts(array $parts) - { - $uri = new self(); - $uri->applyParts($parts); - $uri->validateState(); - - return $uri; - } - - public function getScheme() - { - return $this->scheme; - } - - public function getAuthority() - { - $authority = $this->host; - if ($this->userInfo !== '') { - $authority = $this->userInfo . '@' . $authority; - } - - if ($this->port !== null) { - $authority .= ':' . $this->port; - } - - return $authority; - } - - public function getUserInfo() - { - return $this->userInfo; - } - - public function getHost() - { - return $this->host; - } - - public function getPort() - { - return $this->port; - } - - public function getPath() - { - return $this->path; - } - - public function getQuery() - { - return $this->query; - } - - public function getFragment() - { - return $this->fragment; - } - - public function withScheme($scheme) - { - $scheme = $this->filterScheme($scheme); - - if ($this->scheme === $scheme) { - return $this; - } - - $new = clone $this; - $new->scheme = $scheme; - $new->removeDefaultPort(); - $new->validateState(); - - return $new; - } - - public function withUserInfo($user, $password = null) - { - $info = $this->filterUserInfoComponent($user); - if ($password !== null) { - $info .= ':' . $this->filterUserInfoComponent($password); - } - - if ($this->userInfo === $info) { - return $this; - } - - $new = clone $this; - $new->userInfo = $info; - $new->validateState(); - - return $new; - } - - public function withHost($host) - { - $host = $this->filterHost($host); - - if ($this->host === $host) { - return $this; - } - - $new = clone $this; - $new->host = $host; - $new->validateState(); - - return $new; - } - - public function withPort($port) - { - $port = $this->filterPort($port); - - if ($this->port === $port) { - return $this; - } - - $new = clone $this; - $new->port = $port; - $new->removeDefaultPort(); - $new->validateState(); - - return $new; - } - - public function withPath($path) - { - $path = $this->filterPath($path); - - if ($this->path === $path) { - return $this; - } - - $new = clone $this; - $new->path = $path; - $new->validateState(); - - return $new; - } - - public function withQuery($query) - { - $query = $this->filterQueryAndFragment($query); - - if ($this->query === $query) { - return $this; - } - - $new = clone $this; - $new->query = $query; - - return $new; - } - - public function withFragment($fragment) - { - $fragment = $this->filterQueryAndFragment($fragment); - - if ($this->fragment === $fragment) { - return $this; - } - - $new = clone $this; - $new->fragment = $fragment; - - return $new; - } - - /** - * Apply parse_url parts to a URI. - * - * @param array $parts Array of parse_url parts to apply. - */ - private function applyParts(array $parts) - { - $this->scheme = isset($parts['scheme']) - ? $this->filterScheme($parts['scheme']) - : ''; - $this->userInfo = isset($parts['user']) - ? $this->filterUserInfoComponent($parts['user']) - : ''; - $this->host = isset($parts['host']) - ? $this->filterHost($parts['host']) - : ''; - $this->port = isset($parts['port']) - ? $this->filterPort($parts['port']) - : null; - $this->path = isset($parts['path']) - ? $this->filterPath($parts['path']) - : ''; - $this->query = isset($parts['query']) - ? $this->filterQueryAndFragment($parts['query']) - : ''; - $this->fragment = isset($parts['fragment']) - ? $this->filterQueryAndFragment($parts['fragment']) - : ''; - if (isset($parts['pass'])) { - $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); - } - - $this->removeDefaultPort(); - } - - /** - * @param string $scheme - * - * @return string - * - * @throws \InvalidArgumentException If the scheme is invalid. - */ - private function filterScheme($scheme) - { - if (!is_string($scheme)) { - throw new \InvalidArgumentException('Scheme must be a string'); - } - - return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - } - - /** - * @param string $component - * - * @return string - * - * @throws \InvalidArgumentException If the user info is invalid. - */ - private function filterUserInfoComponent($component) - { - if (!is_string($component)) { - throw new \InvalidArgumentException('User info must be a string'); - } - - return preg_replace_callback( - '/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $component - ); - } - - /** - * @param string $host - * - * @return string - * - * @throws \InvalidArgumentException If the host is invalid. - */ - private function filterHost($host) - { - if (!is_string($host)) { - throw new \InvalidArgumentException('Host must be a string'); - } - - return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); - } - - /** - * @param int|null $port - * - * @return int|null - * - * @throws \InvalidArgumentException If the port is invalid. - */ - private function filterPort($port) - { - if ($port === null) { - return null; - } - - $port = (int) $port; - if (0 > $port || 0xffff < $port) { - throw new \InvalidArgumentException( - sprintf('Invalid port: %d. Must be between 0 and 65535', $port) - ); - } - - return $port; - } - - /** - * @param UriInterface $uri - * @param array $keys - * - * @return array - */ - private static function getFilteredQueryString(UriInterface $uri, array $keys) - { - $current = $uri->getQuery(); - - if ($current === '') { - return []; - } - - $decodedKeys = array_map('rawurldecode', $keys); - - return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { - return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); - }); - } - - /** - * @param string $key - * @param string|null $value - * - * @return string - */ - private static function generateQueryString($key, $value) - { - // Query string separators ("=", "&") within the key or value need to be encoded - // (while preventing double-encoding) before setting the query string. All other - // chars that need percent-encoding will be encoded by withQuery(). - $queryString = strtr($key, self::$replaceQuery); - - if ($value !== null) { - $queryString .= '=' . strtr($value, self::$replaceQuery); - } - - return $queryString; - } - - private function removeDefaultPort() - { - if ($this->port !== null && self::isDefaultPort($this)) { - $this->port = null; - } - } - - /** - * Filters the path of a URI - * - * @param string $path - * - * @return string - * - * @throws \InvalidArgumentException If the path is invalid. - */ - private function filterPath($path) - { - if (!is_string($path)) { - throw new \InvalidArgumentException('Path must be a string'); - } - - return preg_replace_callback( - '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $path - ); - } - - /** - * Filters the query string or fragment of a URI. - * - * @param string $str - * - * @return string - * - * @throws \InvalidArgumentException If the query or fragment is invalid. - */ - private function filterQueryAndFragment($str) - { - if (!is_string($str)) { - throw new \InvalidArgumentException('Query and fragment must be a string'); - } - - return preg_replace_callback( - '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', - [$this, 'rawurlencodeMatchZero'], - $str - ); - } - - private function rawurlencodeMatchZero(array $match) - { - return rawurlencode($match[0]); - } - - private function validateState() - { - if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { - $this->host = self::HTTP_DEFAULT_HOST; - } - - if ($this->getAuthority() === '') { - if (0 === strpos($this->path, '//')) { - throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); - } - if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { - throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); - } - } elseif (isset($this->path[0]) && $this->path[0] !== '/') { - @trigger_error( - 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . - 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', - E_USER_DEPRECATED - ); - $this->path = '/' . $this->path; - //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); - } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/UriNormalizer.php deleted file mode 100644 index 3a9cf667..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/UriNormalizer.php +++ /dev/null @@ -1,219 +0,0 @@ -getPath() === '' && - ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') - ) { - $uri = $uri->withPath('/'); - } - - if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { - $uri = $uri->withHost(''); - } - - if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { - $uri = $uri->withPort(null); - } - - if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { - $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); - } - - if ($flags & self::REMOVE_DUPLICATE_SLASHES) { - $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); - } - - if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { - $queryKeyValues = explode('&', $uri->getQuery()); - sort($queryKeyValues); - $uri = $uri->withQuery(implode('&', $queryKeyValues)); - } - - return $uri; - } - - /** - * Whether two URIs can be considered equivalent. - * - * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also - * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be - * resolved against the same base URI. If this is not the case, determination of equivalence or difference of - * relative references does not mean anything. - * - * @param UriInterface $uri1 An URI to compare - * @param UriInterface $uri2 An URI to compare - * @param int $normalizations A bitmask of normalizations to apply, see constants - * - * @return bool - * - * @link https://tools.ietf.org/html/rfc3986#section-6.1 - */ - public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) - { - return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); - } - - private static function capitalizePercentEncoding(UriInterface $uri) - { - $regex = '/(?:%[A-Fa-f0-9]{2})++/'; - - $callback = function (array $match) { - return strtoupper($match[0]); - }; - - return - $uri->withPath( - preg_replace_callback($regex, $callback, $uri->getPath()) - )->withQuery( - preg_replace_callback($regex, $callback, $uri->getQuery()) - ); - } - - private static function decodeUnreservedCharacters(UriInterface $uri) - { - $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; - - $callback = function (array $match) { - return rawurldecode($match[0]); - }; - - return - $uri->withPath( - preg_replace_callback($regex, $callback, $uri->getPath()) - )->withQuery( - preg_replace_callback($regex, $callback, $uri->getQuery()) - ); - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/UriResolver.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/UriResolver.php deleted file mode 100644 index a1979cbd..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/UriResolver.php +++ /dev/null @@ -1,222 +0,0 @@ -getScheme() != '') { - return $rel->withPath(self::removeDotSegments($rel->getPath())); - } - - if ($rel->getAuthority() != '') { - $targetAuthority = $rel->getAuthority(); - $targetPath = self::removeDotSegments($rel->getPath()); - $targetQuery = $rel->getQuery(); - } else { - $targetAuthority = $base->getAuthority(); - if ($rel->getPath() === '') { - $targetPath = $base->getPath(); - $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); - } else { - if ($rel->getPath()[0] === '/') { - $targetPath = $rel->getPath(); - } else { - if ($targetAuthority != '' && $base->getPath() === '') { - $targetPath = '/' . $rel->getPath(); - } else { - $lastSlashPos = strrpos($base->getPath(), '/'); - if ($lastSlashPos === false) { - $targetPath = $rel->getPath(); - } else { - $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); - } - } - } - $targetPath = self::removeDotSegments($targetPath); - $targetQuery = $rel->getQuery(); - } - } - - return new Uri(Uri::composeComponents( - $base->getScheme(), - $targetAuthority, - $targetPath, - $targetQuery, - $rel->getFragment() - )); - } - - /** - * Returns the target URI as a relative reference from the base URI. - * - * This method is the counterpart to resolve(): - * - * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) - * - * One use-case is to use the current request URI as base URI and then generate relative links in your documents - * to reduce the document size or offer self-contained downloadable document archives. - * - * $base = new Uri('http://example.com/a/b/'); - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. - * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. - * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. - * - * This method also accepts a target that is already relative and will try to relativize it further. Only a - * relative-path reference will be returned as-is. - * - * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well - * - * @param UriInterface $base Base URI - * @param UriInterface $target Target URI - * - * @return UriInterface The relative URI reference - */ - public static function relativize(UriInterface $base, UriInterface $target) - { - if ($target->getScheme() !== '' && - ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') - ) { - return $target; - } - - if (Uri::isRelativePathReference($target)) { - // As the target is already highly relative we return it as-is. It would be possible to resolve - // the target with `$target = self::resolve($base, $target);` and then try make it more relative - // by removing a duplicate query. But let's not do that automatically. - return $target; - } - - if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { - return $target->withScheme(''); - } - - // We must remove the path before removing the authority because if the path starts with two slashes, the URI - // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also - // invalid. - $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); - - if ($base->getPath() !== $target->getPath()) { - return $emptyPathUri->withPath(self::getRelativePath($base, $target)); - } - - if ($base->getQuery() === $target->getQuery()) { - // Only the target fragment is left. And it must be returned even if base and target fragment are the same. - return $emptyPathUri->withQuery(''); - } - - // If the base URI has a query but the target has none, we cannot return an empty path reference as it would - // inherit the base query component when resolving. - if ($target->getQuery() === '') { - $segments = explode('/', $target->getPath()); - $lastSegment = end($segments); - - return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); - } - - return $emptyPathUri; - } - - private static function getRelativePath(UriInterface $base, UriInterface $target) - { - $sourceSegments = explode('/', $base->getPath()); - $targetSegments = explode('/', $target->getPath()); - array_pop($sourceSegments); - $targetLastSegment = array_pop($targetSegments); - foreach ($sourceSegments as $i => $segment) { - if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { - unset($sourceSegments[$i], $targetSegments[$i]); - } else { - break; - } - } - $targetSegments[] = $targetLastSegment; - $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); - - // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. - if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { - $relativePath = "./$relativePath"; - } elseif ('/' === $relativePath[0]) { - if ($base->getAuthority() != '' && $base->getPath() === '') { - // In this case an extra slash is added by resolve() automatically. So we must not add one here. - $relativePath = ".$relativePath"; - } else { - $relativePath = "./$relativePath"; - } - } - - return $relativePath; - } - - private function __construct() - { - // cannot be instantiated - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Utils.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Utils.php deleted file mode 100644 index e375dce2..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/Utils.php +++ /dev/null @@ -1,428 +0,0 @@ - $keys - * - * @return array - */ - public static function caselessRemove($keys, array $data) - { - $result = []; - - foreach ($keys as &$key) { - $key = strtolower($key); - } - - foreach ($data as $k => $v) { - if (!in_array(strtolower($k), $keys)) { - $result[$k] = $v; - } - } - - return $result; - } - - /** - * Copy the contents of a stream into another stream until the given number - * of bytes have been read. - * - * @param StreamInterface $source Stream to read from - * @param StreamInterface $dest Stream to write to - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * - * @throws \RuntimeException on error. - */ - public static function copyToStream(StreamInterface $source, StreamInterface $dest, $maxLen = -1) - { - $bufferSize = 8192; - - if ($maxLen === -1) { - while (!$source->eof()) { - if (!$dest->write($source->read($bufferSize))) { - break; - } - } - } else { - $remaining = $maxLen; - while ($remaining > 0 && !$source->eof()) { - $buf = $source->read(min($bufferSize, $remaining)); - $len = strlen($buf); - if (!$len) { - break; - } - $remaining -= $len; - $dest->write($buf); - } - } - } - - /** - * Copy the contents of a stream into a string until the given number of - * bytes have been read. - * - * @param StreamInterface $stream Stream to read - * @param int $maxLen Maximum number of bytes to read. Pass -1 - * to read the entire stream. - * - * @return string - * - * @throws \RuntimeException on error. - */ - public static function copyToString(StreamInterface $stream, $maxLen = -1) - { - $buffer = ''; - - if ($maxLen === -1) { - while (!$stream->eof()) { - $buf = $stream->read(1048576); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - $buffer .= $buf; - } - return $buffer; - } - - $len = 0; - while (!$stream->eof() && $len < $maxLen) { - $buf = $stream->read($maxLen - $len); - // Using a loose equality here to match on '' and false. - if ($buf == null) { - break; - } - $buffer .= $buf; - $len = strlen($buffer); - } - - return $buffer; - } - - /** - * Calculate a hash of a stream. - * - * This method reads the entire stream to calculate a rolling hash, based - * on PHP's `hash_init` functions. - * - * @param StreamInterface $stream Stream to calculate the hash for - * @param string $algo Hash algorithm (e.g. md5, crc32, etc) - * @param bool $rawOutput Whether or not to use raw output - * - * @return string Returns the hash of the stream - * - * @throws \RuntimeException on error. - */ - public static function hash(StreamInterface $stream, $algo, $rawOutput = false) - { - $pos = $stream->tell(); - - if ($pos > 0) { - $stream->rewind(); - } - - $ctx = hash_init($algo); - while (!$stream->eof()) { - hash_update($ctx, $stream->read(1048576)); - } - - $out = hash_final($ctx, (bool) $rawOutput); - $stream->seek($pos); - - return $out; - } - - /** - * Clone and modify a request with the given changes. - * - * This method is useful for reducing the number of clones needed to mutate - * a message. - * - * The changes can be one of: - * - method: (string) Changes the HTTP method. - * - set_headers: (array) Sets the given headers. - * - remove_headers: (array) Remove the given headers. - * - body: (mixed) Sets the given body. - * - uri: (UriInterface) Set the URI. - * - query: (string) Set the query string value of the URI. - * - version: (string) Set the protocol version. - * - * @param RequestInterface $request Request to clone and modify. - * @param array $changes Changes to apply. - * - * @return RequestInterface - */ - public static function modifyRequest(RequestInterface $request, array $changes) - { - if (!$changes) { - return $request; - } - - $headers = $request->getHeaders(); - - if (!isset($changes['uri'])) { - $uri = $request->getUri(); - } else { - // Remove the host header if one is on the URI - if ($host = $changes['uri']->getHost()) { - $changes['set_headers']['Host'] = $host; - - if ($port = $changes['uri']->getPort()) { - $standardPorts = ['http' => 80, 'https' => 443]; - $scheme = $changes['uri']->getScheme(); - if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':' . $port; - } - } - } - $uri = $changes['uri']; - } - - if (!empty($changes['remove_headers'])) { - $headers = self::caselessRemove($changes['remove_headers'], $headers); - } - - if (!empty($changes['set_headers'])) { - $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers); - $headers = $changes['set_headers'] + $headers; - } - - if (isset($changes['query'])) { - $uri = $uri->withQuery($changes['query']); - } - - if ($request instanceof ServerRequestInterface) { - $new = (new ServerRequest( - isset($changes['method']) ? $changes['method'] : $request->getMethod(), - $uri, - $headers, - isset($changes['body']) ? $changes['body'] : $request->getBody(), - isset($changes['version']) - ? $changes['version'] - : $request->getProtocolVersion(), - $request->getServerParams() - )) - ->withParsedBody($request->getParsedBody()) - ->withQueryParams($request->getQueryParams()) - ->withCookieParams($request->getCookieParams()) - ->withUploadedFiles($request->getUploadedFiles()); - - foreach ($request->getAttributes() as $key => $value) { - $new = $new->withAttribute($key, $value); - } - - return $new; - } - - return new Request( - isset($changes['method']) ? $changes['method'] : $request->getMethod(), - $uri, - $headers, - isset($changes['body']) ? $changes['body'] : $request->getBody(), - isset($changes['version']) - ? $changes['version'] - : $request->getProtocolVersion() - ); - } - - /** - * Read a line from the stream up to the maximum allowed buffer length. - * - * @param StreamInterface $stream Stream to read from - * @param int|null $maxLength Maximum buffer length - * - * @return string - */ - public static function readLine(StreamInterface $stream, $maxLength = null) - { - $buffer = ''; - $size = 0; - - while (!$stream->eof()) { - // Using a loose equality here to match on '' and false. - if (null == ($byte = $stream->read(1))) { - return $buffer; - } - $buffer .= $byte; - // Break when a new line is found or the max length - 1 is reached - if ($byte === "\n" || ++$size === $maxLength - 1) { - break; - } - } - - return $buffer; - } - - /** - * Create a new stream based on the input type. - * - * Options is an associative array that can contain the following keys: - * - metadata: Array of custom metadata. - * - size: Size of the stream. - * - * This method accepts the following `$resource` types: - * - `Doofinder\Psr\Http\Message\StreamInterface`: Returns the value as-is. - * - `string`: Creates a stream object that uses the given string as the contents. - * - `resource`: Creates a stream object that wraps the given PHP stream resource. - * - `Iterator`: If the provided value implements `Iterator`, then a read-only - * stream object will be created that wraps the given iterable. Each time the - * stream is read from, data from the iterator will fill a buffer and will be - * continuously called until the buffer is equal to the requested read size. - * Subsequent read calls will first read from the buffer and then call `next` - * on the underlying iterator until it is exhausted. - * - `object` with `__toString()`: If the object has the `__toString()` method, - * the object will be cast to a string and then a stream will be returned that - * uses the string value. - * - `NULL`: When `null` is passed, an empty stream object is returned. - * - `callable` When a callable is passed, a read-only stream object will be - * created that invokes the given callable. The callable is invoked with the - * number of suggested bytes to read. The callable can return any number of - * bytes, but MUST return `false` when there is no more data to return. The - * stream object that wraps the callable will invoke the callable until the - * number of requested bytes are available. Any additional bytes will be - * buffered and used in subsequent reads. - * - * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data - * @param array $options Additional options - * - * @return StreamInterface - * - * @throws \InvalidArgumentException if the $resource arg is not valid. - */ - public static function streamFor($resource = '', array $options = []) - { - if (is_scalar($resource)) { - $stream = self::tryFopen('php://temp', 'r+'); - if ($resource !== '') { - fwrite($stream, $resource); - fseek($stream, 0); - } - return new Stream($stream, $options); - } - - switch (gettype($resource)) { - case 'resource': - /* - * The 'php://input' is a special stream with quirks and inconsistencies. - * We avoid using that stream by reading it into php://temp - */ - $metaData = \stream_get_meta_data($resource); - if (isset($metaData['uri']) && $metaData['uri'] === 'php://input') { - $stream = self::tryFopen('php://temp', 'w+'); - fwrite($stream, stream_get_contents($resource)); - fseek($stream, 0); - $resource = $stream; - } - return new Stream($resource, $options); - case 'object': - if ($resource instanceof StreamInterface) { - return $resource; - } elseif ($resource instanceof \Iterator) { - return new PumpStream(function () use ($resource) { - if (!$resource->valid()) { - return false; - } - $result = $resource->current(); - $resource->next(); - return $result; - }, $options); - } elseif (method_exists($resource, '__toString')) { - return Utils::streamFor((string) $resource, $options); - } - break; - case 'NULL': - return new Stream(self::tryFopen('php://temp', 'r+'), $options); - } - - if (is_callable($resource)) { - return new PumpStream($resource, $options); - } - - throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); - } - - /** - * Safely opens a PHP stream resource using a filename. - * - * When fopen fails, PHP normally raises a warning. This function adds an - * error handler that checks for errors and throws an exception instead. - * - * @param string $filename File to open - * @param string $mode Mode used to open the file - * - * @return resource - * - * @throws \RuntimeException if the file cannot be opened - */ - public static function tryFopen($filename, $mode) - { - $ex = null; - set_error_handler(function () use ($filename, $mode, &$ex) { - $ex = new \RuntimeException(sprintf( - 'Unable to open "%s" using mode "%s": %s', - $filename, - $mode, - func_get_args()[1] - )); - - return true; - }); - - try { - $handle = fopen($filename, $mode); - } catch (\Throwable $e) { - $ex = new \RuntimeException(sprintf( - 'Unable to open "%s" using mode "%s": %s', - $filename, - $mode, - $e->getMessage() - ), 0, $e); - } - - restore_error_handler(); - - if ($ex) { - /** @var $ex \RuntimeException */ - throw $ex; - } - - return $handle; - } - - /** - * Returns a UriInterface for the given value. - * - * This function accepts a string or UriInterface and returns a - * UriInterface for the given value. If the value is already a - * UriInterface, it is returned as-is. - * - * @param string|UriInterface $uri - * - * @return UriInterface - * - * @throws \InvalidArgumentException - */ - public static function uriFor($uri) - { - if ($uri instanceof UriInterface) { - return $uri; - } - - if (is_string($uri)) { - return new Uri($uri); - } - - throw new \InvalidArgumentException('URI must be a string or UriInterface'); - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/functions.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/functions.php deleted file mode 100644 index cc24a3d1..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/functions.php +++ /dev/null @@ -1,422 +0,0 @@ - '1', 'foo[b]' => '2'])`. - * - * @param string $str Query string to parse - * @param int|bool $urlEncoding How the query string is encoded - * - * @return array - * - * @deprecated parse_query will be removed in guzzlehttp/psr7:2.0. Use Query::parse instead. - */ -function parse_query($str, $urlEncoding = true) -{ - return Query::parse($str, $urlEncoding); -} - -/** - * Build a query string from an array of key value pairs. - * - * This function can use the return value of `parse_query()` to build a query - * string. This function does not modify the provided keys when an array is - * encountered (like `http_build_query()` would). - * - * @param array $params Query string parameters. - * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 - * to encode using RFC3986, or PHP_QUERY_RFC1738 - * to encode using RFC1738. - * - * @return string - * - * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead. - */ -function build_query(array $params, $encoding = PHP_QUERY_RFC3986) -{ - return Query::build($params, $encoding); -} - -/** - * Determines the mimetype of a file by looking at its extension. - * - * @param string $filename - * - * @return string|null - * - * @deprecated mimetype_from_filename will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromFilename instead. - */ -function mimetype_from_filename($filename) -{ - return MimeType::fromFilename($filename); -} - -/** - * Maps a file extensions to a mimetype. - * - * @param $extension string The file extension. - * - * @return string|null - * - * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types - * @deprecated mimetype_from_extension will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromExtension instead. - */ -function mimetype_from_extension($extension) -{ - return MimeType::fromExtension($extension); -} - -/** - * Parses an HTTP message into an associative array. - * - * The array contains the "start-line" key containing the start line of - * the message, "headers" key containing an associative array of header - * array values, and a "body" key containing the body of the message. - * - * @param string $message HTTP request or response to parse. - * - * @return array - * - * @internal - * - * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead. - */ -function _parse_message($message) -{ - return Message::parseMessage($message); -} - -/** - * Constructs a URI for an HTTP request message. - * - * @param string $path Path from the start-line - * @param array $headers Array of headers (each value an array). - * - * @return string - * - * @internal - * - * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead. - */ -function _parse_request_uri($path, array $headers) -{ - return Message::parseRequestUri($path, $headers); -} - -/** - * Get a short summary of the message body. - * - * Will return `null` if the response is not printable. - * - * @param MessageInterface $message The message to get the body summary - * @param int $truncateAt The maximum allowed size of the summary - * - * @return string|null - * - * @deprecated get_message_body_summary will be removed in guzzlehttp/psr7:2.0. Use Message::bodySummary instead. - */ -function get_message_body_summary(MessageInterface $message, $truncateAt = 120) -{ - return Message::bodySummary($message, $truncateAt); -} - -/** - * Remove the items given by the keys, case insensitively from the data. - * - * @param iterable $keys - * - * @return array - * - * @internal - * - * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead. - */ -function _caseless_remove($keys, array $data) -{ - return Utils::caselessRemove($keys, $data); -} diff --git a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/functions_include.php b/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/functions_include.php deleted file mode 100644 index 4783fa83..00000000 --- a/doofinder-for-woocommerce/lib/vendor/guzzlehttp/psr7/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ -getHeaders() as $name => $values) { - * echo $name . ": " . implode(", ", $values); - * } - * - * // Emit headers iteratively: - * foreach ($message->getHeaders() as $name => $values) { - * foreach ($values as $value) { - * header(sprintf('%s: %s', $name, $value), false); - * } - * } - * - * While header names are not case-sensitive, getHeaders() will preserve the - * exact case in which headers were originally specified. - * - * @return string[][] Returns an associative array of the message's headers. Each - * key MUST be a header name, and each value MUST be an array of strings - * for that header. - */ - public function getHeaders(); - - /** - * Checks if a header exists by the given case-insensitive name. - * - * @param string $name Case-insensitive header field name. - * @return bool Returns true if any header names match the given header - * name using a case-insensitive string comparison. Returns false if - * no matching header name is found in the message. - */ - public function hasHeader($name); - - /** - * Retrieves a message header value by the given case-insensitive name. - * - * This method returns an array of all the header values of the given - * case-insensitive header name. - * - * If the header does not appear in the message, this method MUST return an - * empty array. - * - * @param string $name Case-insensitive header field name. - * @return string[] An array of string values as provided for the given - * header. If the header does not appear in the message, this method MUST - * return an empty array. - */ - public function getHeader($name); - - /** - * Retrieves a comma-separated string of the values for a single header. - * - * This method returns all of the header values of the given - * case-insensitive header name as a string concatenated together using - * a comma. - * - * NOTE: Not all header values may be appropriately represented using - * comma concatenation. For such headers, use getHeader() instead - * and supply your own delimiter when concatenating. - * - * If the header does not appear in the message, this method MUST return - * an empty string. - * - * @param string $name Case-insensitive header field name. - * @return string A string of values as provided for the given header - * concatenated together using a comma. If the header does not appear in - * the message, this method MUST return an empty string. - */ - public function getHeaderLine($name); - - /** - * Return an instance with the provided value replacing the specified header. - * - * While header names are case-insensitive, the casing of the header will - * be preserved by this function, and returned from getHeaders(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new and/or updated header and value. - * - * @param string $name Case-insensitive header field name. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withHeader($name, $value); - - /** - * Return an instance with the specified header appended with the given value. - * - * Existing values for the specified header will be maintained. The new - * value(s) will be appended to the existing list. If the header did not - * exist previously, it will be added. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new header and/or value. - * - * @param string $name Case-insensitive header field name to add. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withAddedHeader($name, $value); - - /** - * Return an instance without the specified header. - * - * Header resolution MUST be done without case-sensitivity. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the named header. - * - * @param string $name Case-insensitive header field name to remove. - * @return static - */ - public function withoutHeader($name); - - /** - * Gets the body of the message. - * - * @return StreamInterface Returns the body as a stream. - */ - public function getBody(); - - /** - * Return an instance with the specified message body. - * - * The body MUST be a StreamInterface object. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return a new instance that has the - * new body stream. - * - * @param StreamInterface $body Body. - * @return static - * @throws \InvalidArgumentException When the body is not valid. - */ - public function withBody(StreamInterface $body); -} diff --git a/doofinder-for-woocommerce/lib/vendor/psr/http-message/src/RequestInterface.php b/doofinder-for-woocommerce/lib/vendor/psr/http-message/src/RequestInterface.php deleted file mode 100644 index 5a9bf445..00000000 --- a/doofinder-for-woocommerce/lib/vendor/psr/http-message/src/RequestInterface.php +++ /dev/null @@ -1,129 +0,0 @@ -getQuery()` - * or from the `QUERY_STRING` server param. - * - * @return array - */ - public function getQueryParams(); - - /** - * Return an instance with the specified query string arguments. - * - * These values SHOULD remain immutable over the course of the incoming - * request. They MAY be injected during instantiation, such as from PHP's - * $_GET superglobal, or MAY be derived from some other value such as the - * URI. In cases where the arguments are parsed from the URI, the data - * MUST be compatible with what PHP's parse_str() would return for - * purposes of how duplicate query parameters are handled, and how nested - * sets are handled. - * - * Setting query string arguments MUST NOT change the URI stored by the - * request, nor the values in the server params. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated query string arguments. - * - * @param array $query Array of query string arguments, typically from - * $_GET. - * @return static - */ - public function withQueryParams(array $query); - - /** - * Retrieve normalized file upload data. - * - * This method returns upload metadata in a normalized tree, with each leaf - * an instance of Doofinder\Psr\Http\Message\UploadedFileInterface. - * - * These values MAY be prepared from $_FILES or the message body during - * instantiation, or MAY be injected via withUploadedFiles(). - * - * @return array An array tree of UploadedFileInterface instances; an empty - * array MUST be returned if no data is present. - */ - public function getUploadedFiles(); - - /** - * Create a new instance with the specified uploaded files. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param array $uploadedFiles An array tree of UploadedFileInterface instances. - * @return static - * @throws \InvalidArgumentException if an invalid structure is provided. - */ - public function withUploadedFiles(array $uploadedFiles); - - /** - * Retrieve any parameters provided in the request body. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, this method MUST - * return the contents of $_POST. - * - * Otherwise, this method may return any results of deserializing - * the request body content; as parsing returns structured content, the - * potential types MUST be arrays or objects only. A null value indicates - * the absence of body content. - * - * @return null|array|object The deserialized body parameters, if any. - * These will typically be an array or object. - */ - public function getParsedBody(); - - /** - * Return an instance with the specified body parameters. - * - * These MAY be injected during instantiation. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, use this method - * ONLY to inject the contents of $_POST. - * - * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of - * deserializing the request body content. Deserialization/parsing returns - * structured data, and, as such, this method ONLY accepts arrays or objects, - * or a null value if nothing was available to parse. - * - * As an example, if content negotiation determines that the request data - * is a JSON payload, this method could be used to create a request - * instance with the deserialized parameters. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param null|array|object $data The deserialized body data. This will - * typically be in an array or object. - * @return static - * @throws \InvalidArgumentException if an unsupported argument type is - * provided. - */ - public function withParsedBody($data); - - /** - * Retrieve attributes derived from the request. - * - * The request "attributes" may be used to allow injection of any - * parameters derived from the request: e.g., the results of path - * match operations; the results of decrypting cookies; the results of - * deserializing non-form-encoded message bodies; etc. Attributes - * will be application and request specific, and CAN be mutable. - * - * @return array Attributes derived from the request. - */ - public function getAttributes(); - - /** - * Retrieve a single derived request attribute. - * - * Retrieves a single derived request attribute as described in - * getAttributes(). If the attribute has not been previously set, returns - * the default value as provided. - * - * This method obviates the need for a hasAttribute() method, as it allows - * specifying a default value to return if the attribute is not found. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $default Default value to return if the attribute does not exist. - * @return mixed - */ - public function getAttribute($name, $default = null); - - /** - * Return an instance with the specified derived request attribute. - * - * This method allows setting a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $value The value of the attribute. - * @return static - */ - public function withAttribute($name, $value); - - /** - * Return an instance that removes the specified derived request attribute. - * - * This method allows removing a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @return static - */ - public function withoutAttribute($name); -} diff --git a/doofinder-for-woocommerce/lib/vendor/psr/http-message/src/StreamInterface.php b/doofinder-for-woocommerce/lib/vendor/psr/http-message/src/StreamInterface.php deleted file mode 100644 index 153fef08..00000000 --- a/doofinder-for-woocommerce/lib/vendor/psr/http-message/src/StreamInterface.php +++ /dev/null @@ -1,158 +0,0 @@ - - * [user-info@]host[:port] - * - * - * If the port component is not set or is the standard port for the current - * scheme, it SHOULD NOT be included. - * - * @see https://tools.ietf.org/html/rfc3986#section-3.2 - * @return string The URI authority, in "[user-info@]host[:port]" format. - */ - public function getAuthority(); - - /** - * Retrieve the user information component of the URI. - * - * If no user information is present, this method MUST return an empty - * string. - * - * If a user is present in the URI, this will return that value; - * additionally, if the password is also present, it will be appended to the - * user value, with a colon (":") separating the values. - * - * The trailing "@" character is not part of the user information and MUST - * NOT be added. - * - * @return string The URI user information, in "username[:password]" format. - */ - public function getUserInfo(); - - /** - * Retrieve the host component of the URI. - * - * If no host is present, this method MUST return an empty string. - * - * The value returned MUST be normalized to lowercase, per RFC 3986 - * Section 3.2.2. - * - * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 - * @return string The URI host. - */ - public function getHost(); - - /** - * Retrieve the port component of the URI. - * - * If a port is present, and it is non-standard for the current scheme, - * this method MUST return it as an integer. If the port is the standard port - * used with the current scheme, this method SHOULD return null. - * - * If no port is present, and no scheme is present, this method MUST return - * a null value. - * - * If no port is present, but a scheme is present, this method MAY return - * the standard port for that scheme, but SHOULD return null. - * - * @return null|int The URI port. - */ - public function getPort(); - - /** - * Retrieve the path component of the URI. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * Normally, the empty path "" and absolute path "/" are considered equal as - * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically - * do this normalization because in contexts with a trimmed base path, e.g. - * the front controller, this difference becomes significant. It's the task - * of the user to handle both "" and "/". - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.3. - * - * As an example, if the value should include a slash ("/") not intended as - * delimiter between path segments, that value MUST be passed in encoded - * form (e.g., "%2F") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.3 - * @return string The URI path. - */ - public function getPath(); - - /** - * Retrieve the query string of the URI. - * - * If no query string is present, this method MUST return an empty string. - * - * The leading "?" character is not part of the query and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.4. - * - * As an example, if a value in a key/value pair of the query string should - * include an ampersand ("&") not intended as a delimiter between values, - * that value MUST be passed in encoded form (e.g., "%26") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.4 - * @return string The URI query string. - */ - public function getQuery(); - - /** - * Retrieve the fragment component of the URI. - * - * If no fragment is present, this method MUST return an empty string. - * - * The leading "#" character is not part of the fragment and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.5. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.5 - * @return string The URI fragment. - */ - public function getFragment(); - - /** - * Return an instance with the specified scheme. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified scheme. - * - * Implementations MUST support the schemes "http" and "https" case - * insensitively, and MAY accommodate other schemes if required. - * - * An empty scheme is equivalent to removing the scheme. - * - * @param string $scheme The scheme to use with the new instance. - * @return static A new instance with the specified scheme. - * @throws \InvalidArgumentException for invalid or unsupported schemes. - */ - public function withScheme($scheme); - - /** - * Return an instance with the specified user information. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified user information. - * - * Password is optional, but the user information MUST include the - * user; an empty string for the user is equivalent to removing user - * information. - * - * @param string $user The user name to use for authority. - * @param null|string $password The password associated with $user. - * @return static A new instance with the specified user information. - */ - public function withUserInfo($user, $password = null); - - /** - * Return an instance with the specified host. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified host. - * - * An empty host value is equivalent to removing the host. - * - * @param string $host The hostname to use with the new instance. - * @return static A new instance with the specified host. - * @throws \InvalidArgumentException for invalid hostnames. - */ - public function withHost($host); - - /** - * Return an instance with the specified port. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified port. - * - * Implementations MUST raise an exception for ports outside the - * established TCP and UDP port ranges. - * - * A null value provided for the port is equivalent to removing the port - * information. - * - * @param null|int $port The port to use with the new instance; a null value - * removes the port information. - * @return static A new instance with the specified port. - * @throws \InvalidArgumentException for invalid ports. - */ - public function withPort($port); - - /** - * Return an instance with the specified path. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified path. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * If the path is intended to be domain-relative rather than path relative then - * it must begin with a slash ("/"). Paths not starting with a slash ("/") - * are assumed to be relative to some base path known to the application or - * consumer. - * - * Users can provide both encoded and decoded path characters. - * Implementations ensure the correct encoding as outlined in getPath(). - * - * @param string $path The path to use with the new instance. - * @return static A new instance with the specified path. - * @throws \InvalidArgumentException for invalid paths. - */ - public function withPath($path); - - /** - * Return an instance with the specified query string. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified query string. - * - * Users can provide both encoded and decoded query characters. - * Implementations ensure the correct encoding as outlined in getQuery(). - * - * An empty query string value is equivalent to removing the query string. - * - * @param string $query The query string to use with the new instance. - * @return static A new instance with the specified query string. - * @throws \InvalidArgumentException for invalid query strings. - */ - public function withQuery($query); - - /** - * Return an instance with the specified URI fragment. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified URI fragment. - * - * Users can provide both encoded and decoded fragment characters. - * Implementations ensure the correct encoding as outlined in getFragment(). - * - * An empty fragment value is equivalent to removing the fragment. - * - * @param string $fragment The fragment to use with the new instance. - * @return static A new instance with the specified fragment. - */ - public function withFragment($fragment); - - /** - * Return the string representation as a URI reference. - * - * Depending on which components of the URI are present, the resulting - * string is either a full URI or relative reference according to RFC 3986, - * Section 4.1. The method concatenates the various components of the URI, - * using the appropriate delimiters: - * - * - If a scheme is present, it MUST be suffixed by ":". - * - If an authority is present, it MUST be prefixed by "//". - * - The path can be concatenated without delimiters. But there are two - * cases where the path has to be adjusted to make the URI reference - * valid as PHP does not allow to throw an exception in __toString(): - * - If the path is rootless and an authority is present, the path MUST - * be prefixed by "/". - * - If the path is starting with more than one "/" and no authority is - * present, the starting slashes MUST be reduced to one. - * - If a query is present, it MUST be prefixed by "?". - * - If a fragment is present, it MUST be prefixed by "#". - * - * @see http://tools.ietf.org/html/rfc3986#section-4.1 - * @return string - */ - public function __toString(); -} diff --git a/doofinder-for-woocommerce/lib/vendor/ralouphie/getallheaders/LICENSE b/doofinder-for-woocommerce/lib/vendor/ralouphie/getallheaders/LICENSE deleted file mode 100644 index be5540c2..00000000 --- a/doofinder-for-woocommerce/lib/vendor/ralouphie/getallheaders/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Ralph Khattar - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/doofinder-for-woocommerce/lib/vendor/ralouphie/getallheaders/src/getallheaders.php b/doofinder-for-woocommerce/lib/vendor/ralouphie/getallheaders/src/getallheaders.php deleted file mode 100644 index c7285a5b..00000000 --- a/doofinder-for-woocommerce/lib/vendor/ralouphie/getallheaders/src/getallheaders.php +++ /dev/null @@ -1,46 +0,0 @@ - 'Content-Type', - 'CONTENT_LENGTH' => 'Content-Length', - 'CONTENT_MD5' => 'Content-Md5', - ); - - foreach ($_SERVER as $key => $value) { - if (substr($key, 0, 5) === 'HTTP_') { - $key = substr($key, 5); - if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { - $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); - $headers[$key] = $value; - } - } elseif (isset($copy_server[$key])) { - $headers[$copy_server[$key]] = $value; - } - } - - if (!isset($headers['Authorization'])) { - if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { - $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; - } elseif (isset($_SERVER['PHP_AUTH_USER'])) { - $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; - $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); - } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { - $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; - } - } - - return $headers; - } - -} diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Idn.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Idn.php deleted file mode 100644 index 93514c74..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Idn.php +++ /dev/null @@ -1,925 +0,0 @@ - and Trevor Rowbotham - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Doofinder\Symfony\Polyfill\Intl\Idn; - -use Exception; -use Normalizer; -use Doofinder\Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges; -use Doofinder\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex; - -/** - * @see https://www.unicode.org/reports/tr46/ - * - * @internal - */ -final class Idn -{ - public const ERROR_EMPTY_LABEL = 1; - public const ERROR_LABEL_TOO_LONG = 2; - public const ERROR_DOMAIN_NAME_TOO_LONG = 4; - public const ERROR_LEADING_HYPHEN = 8; - public const ERROR_TRAILING_HYPHEN = 0x10; - public const ERROR_HYPHEN_3_4 = 0x20; - public const ERROR_LEADING_COMBINING_MARK = 0x40; - public const ERROR_DISALLOWED = 0x80; - public const ERROR_PUNYCODE = 0x100; - public const ERROR_LABEL_HAS_DOT = 0x200; - public const ERROR_INVALID_ACE_LABEL = 0x400; - public const ERROR_BIDI = 0x800; - public const ERROR_CONTEXTJ = 0x1000; - public const ERROR_CONTEXTO_PUNCTUATION = 0x2000; - public const ERROR_CONTEXTO_DIGITS = 0x4000; - - public const INTL_IDNA_VARIANT_2003 = 0; - public const INTL_IDNA_VARIANT_UTS46 = 1; - - public const IDNA_DEFAULT = 0; - public const IDNA_ALLOW_UNASSIGNED = 1; - public const IDNA_USE_STD3_RULES = 2; - public const IDNA_CHECK_BIDI = 4; - public const IDNA_CHECK_CONTEXTJ = 8; - public const IDNA_NONTRANSITIONAL_TO_ASCII = 16; - public const IDNA_NONTRANSITIONAL_TO_UNICODE = 32; - - public const MAX_DOMAIN_SIZE = 253; - public const MAX_LABEL_SIZE = 63; - - public const BASE = 36; - public const TMIN = 1; - public const TMAX = 26; - public const SKEW = 38; - public const DAMP = 700; - public const INITIAL_BIAS = 72; - public const INITIAL_N = 128; - public const DELIMITER = '-'; - public const MAX_INT = 2147483647; - - /** - * Contains the numeric value of a basic code point (for use in representing integers) in the - * range 0 to BASE-1, or -1 if b is does not represent a value. - * - * @var array - */ - private static $basicToDigit = [ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, - - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, - - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - ]; - - /** - * @var array - */ - private static $virama; - - /** - * @var array - */ - private static $mapped; - - /** - * @var array - */ - private static $ignored; - - /** - * @var array - */ - private static $deviation; - - /** - * @var array - */ - private static $disallowed; - - /** - * @var array - */ - private static $disallowed_STD3_mapped; - - /** - * @var array - */ - private static $disallowed_STD3_valid; - - /** - * @var bool - */ - private static $mappingTableLoaded = false; - - /** - * @see https://www.unicode.org/reports/tr46/#ToASCII - * - * @param string $domainName - * @param int $options - * @param int $variant - * @param array $idna_info - * - * @return string|false - */ - public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) - { - if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { - @trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); - } - - $options = [ - 'CheckHyphens' => true, - 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), - 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), - 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), - 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_ASCII), - 'VerifyDnsLength' => true, - ]; - $info = new Info(); - $labels = self::process((string) $domainName, $options, $info); - - foreach ($labels as $i => $label) { - // Only convert labels to punycode that contain non-ASCII code points - if (1 === preg_match('/[^\x00-\x7F]/', $label)) { - try { - $label = 'xn--'.self::punycodeEncode($label); - } catch (Exception $e) { - $info->errors |= self::ERROR_PUNYCODE; - } - - $labels[$i] = $label; - } - } - - if ($options['VerifyDnsLength']) { - self::validateDomainAndLabelLength($labels, $info); - } - - $idna_info = [ - 'result' => implode('.', $labels), - 'isTransitionalDifferent' => $info->transitionalDifferent, - 'errors' => $info->errors, - ]; - - return 0 === $info->errors ? $idna_info['result'] : false; - } - - /** - * @see https://www.unicode.org/reports/tr46/#ToUnicode - * - * @param string $domainName - * @param int $options - * @param int $variant - * @param array $idna_info - * - * @return string|false - */ - public static function idn_to_utf8($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) - { - if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { - @trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); - } - - $info = new Info(); - $labels = self::process((string) $domainName, [ - 'CheckHyphens' => true, - 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), - 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), - 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), - 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_UNICODE), - ], $info); - $idna_info = [ - 'result' => implode('.', $labels), - 'isTransitionalDifferent' => $info->transitionalDifferent, - 'errors' => $info->errors, - ]; - - return 0 === $info->errors ? $idna_info['result'] : false; - } - - /** - * @param string $label - * - * @return bool - */ - private static function isValidContextJ(array $codePoints, $label) - { - if (!isset(self::$virama)) { - self::$virama = require __DIR__.\DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'unidata'.\DIRECTORY_SEPARATOR.'virama.php'; - } - - $offset = 0; - - foreach ($codePoints as $i => $codePoint) { - if (0x200C !== $codePoint && 0x200D !== $codePoint) { - continue; - } - - if (!isset($codePoints[$i - 1])) { - return false; - } - - // If Canonical_Combining_Class(Before(cp)) .eq. Virama Then True; - if (isset(self::$virama[$codePoints[$i - 1]])) { - continue; - } - - // If RegExpMatch((Joining_Type:{L,D})(Joining_Type:T)*\u200C(Joining_Type:T)*(Joining_Type:{R,D})) Then - // True; - // Generated RegExp = ([Joining_Type:{L,D}][Joining_Type:T]*\u200C[Joining_Type:T]*)[Joining_Type:{R,D}] - if (0x200C === $codePoint && 1 === preg_match(Regex::ZWNJ, $label, $matches, \PREG_OFFSET_CAPTURE, $offset)) { - $offset += \strlen($matches[1][0]); - - continue; - } - - return false; - } - - return true; - } - - /** - * @see https://www.unicode.org/reports/tr46/#ProcessingStepMap - * - * @param string $input - * @param array $options - * - * @return string - */ - private static function mapCodePoints($input, array $options, Info $info) - { - $str = ''; - $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; - $transitional = $options['Transitional_Processing']; - - foreach (self::utf8Decode($input) as $codePoint) { - $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); - - switch ($data['status']) { - case 'disallowed': - $info->errors |= self::ERROR_DISALLOWED; - - // no break. - - case 'valid': - $str .= mb_chr($codePoint, 'utf-8'); - - break; - - case 'ignored': - // Do nothing. - break; - - case 'mapped': - $str .= $data['mapping']; - - break; - - case 'deviation': - $info->transitionalDifferent = true; - $str .= ($transitional ? $data['mapping'] : mb_chr($codePoint, 'utf-8')); - - break; - } - } - - return $str; - } - - /** - * @see https://www.unicode.org/reports/tr46/#Processing - * - * @param string $domain - * @param array $options - * - * @return array - */ - private static function process($domain, array $options, Info $info) - { - // If VerifyDnsLength is not set, we are doing ToUnicode otherwise we are doing ToASCII and - // we need to respect the VerifyDnsLength option. - $checkForEmptyLabels = !isset($options['VerifyDnsLength']) || $options['VerifyDnsLength']; - - if ($checkForEmptyLabels && '' === $domain) { - $info->errors |= self::ERROR_EMPTY_LABEL; - - return [$domain]; - } - - // Step 1. Map each code point in the domain name string - $domain = self::mapCodePoints($domain, $options, $info); - - // Step 2. Normalize the domain name string to Unicode Normalization Form C. - if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) { - $domain = Normalizer::normalize($domain, Normalizer::FORM_C); - } - - // Step 3. Break the string into labels at U+002E (.) FULL STOP. - $labels = explode('.', $domain); - $lastLabelIndex = \count($labels) - 1; - - // Step 4. Convert and validate each label in the domain name string. - foreach ($labels as $i => $label) { - $validationOptions = $options; - - if ('xn--' === substr($label, 0, 4)) { - try { - $label = self::punycodeDecode(substr($label, 4)); - } catch (Exception $e) { - $info->errors |= self::ERROR_PUNYCODE; - - continue; - } - - $validationOptions['Transitional_Processing'] = false; - $labels[$i] = $label; - } - - self::validateLabel($label, $info, $validationOptions, $i > 0 && $i === $lastLabelIndex); - } - - if ($info->bidiDomain && !$info->validBidiDomain) { - $info->errors |= self::ERROR_BIDI; - } - - // Any input domain name string that does not record an error has been successfully - // processed according to this specification. Conversely, if an input domain_name string - // causes an error, then the processing of the input domain_name string fails. Determining - // what to do with error input is up to the caller, and not in the scope of this document. - return $labels; - } - - /** - * @see https://tools.ietf.org/html/rfc5893#section-2 - * - * @param string $label - */ - private static function validateBidiLabel($label, Info $info) - { - if (1 === preg_match(Regex::RTL_LABEL, $label)) { - $info->bidiDomain = true; - - // Step 1. The first character must be a character with Bidi property L, R, or AL. - // If it has the R or AL property, it is an RTL label - if (1 !== preg_match(Regex::BIDI_STEP_1_RTL, $label)) { - $info->validBidiDomain = false; - - return; - } - - // Step 2. In an RTL label, only characters with the Bidi properties R, AL, AN, EN, ES, - // CS, ET, ON, BN, or NSM are allowed. - if (1 === preg_match(Regex::BIDI_STEP_2, $label)) { - $info->validBidiDomain = false; - - return; - } - - // Step 3. In an RTL label, the end of the label must be a character with Bidi property - // R, AL, EN, or AN, followed by zero or more characters with Bidi property NSM. - if (1 !== preg_match(Regex::BIDI_STEP_3, $label)) { - $info->validBidiDomain = false; - - return; - } - - // Step 4. In an RTL label, if an EN is present, no AN may be present, and vice versa. - if (1 === preg_match(Regex::BIDI_STEP_4_AN, $label) && 1 === preg_match(Regex::BIDI_STEP_4_EN, $label)) { - $info->validBidiDomain = false; - - return; - } - - return; - } - - // We are a LTR label - // Step 1. The first character must be a character with Bidi property L, R, or AL. - // If it has the L property, it is an LTR label. - if (1 !== preg_match(Regex::BIDI_STEP_1_LTR, $label)) { - $info->validBidiDomain = false; - - return; - } - - // Step 5. In an LTR label, only characters with the Bidi properties L, EN, - // ES, CS, ET, ON, BN, or NSM are allowed. - if (1 === preg_match(Regex::BIDI_STEP_5, $label)) { - $info->validBidiDomain = false; - - return; - } - - // Step 6.In an LTR label, the end of the label must be a character with Bidi property L or - // EN, followed by zero or more characters with Bidi property NSM. - if (1 !== preg_match(Regex::BIDI_STEP_6, $label)) { - $info->validBidiDomain = false; - - return; - } - } - - /** - * @param array $labels - */ - private static function validateDomainAndLabelLength(array $labels, Info $info) - { - $maxDomainSize = self::MAX_DOMAIN_SIZE; - $length = \count($labels); - - // Number of "." delimiters. - $domainLength = $length - 1; - - // If the last label is empty and it is not the first label, then it is the root label. - // Increase the max size by 1, making it 254, to account for the root label's "." - // delimiter. This also means we don't need to check the last label's length for being too - // long. - if ($length > 1 && '' === $labels[$length - 1]) { - ++$maxDomainSize; - --$length; - } - - for ($i = 0; $i < $length; ++$i) { - $bytes = \strlen($labels[$i]); - $domainLength += $bytes; - - if ($bytes > self::MAX_LABEL_SIZE) { - $info->errors |= self::ERROR_LABEL_TOO_LONG; - } - } - - if ($domainLength > $maxDomainSize) { - $info->errors |= self::ERROR_DOMAIN_NAME_TOO_LONG; - } - } - - /** - * @see https://www.unicode.org/reports/tr46/#Validity_Criteria - * - * @param string $label - * @param array $options - * @param bool $canBeEmpty - */ - private static function validateLabel($label, Info $info, array $options, $canBeEmpty) - { - if ('' === $label) { - if (!$canBeEmpty && (!isset($options['VerifyDnsLength']) || $options['VerifyDnsLength'])) { - $info->errors |= self::ERROR_EMPTY_LABEL; - } - - return; - } - - // Step 1. The label must be in Unicode Normalization Form C. - if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) { - $info->errors |= self::ERROR_INVALID_ACE_LABEL; - } - - $codePoints = self::utf8Decode($label); - - if ($options['CheckHyphens']) { - // Step 2. If CheckHyphens, the label must not contain a U+002D HYPHEN-MINUS character - // in both the thrid and fourth positions. - if (isset($codePoints[2], $codePoints[3]) && 0x002D === $codePoints[2] && 0x002D === $codePoints[3]) { - $info->errors |= self::ERROR_HYPHEN_3_4; - } - - // Step 3. If CheckHyphens, the label must neither begin nor end with a U+002D - // HYPHEN-MINUS character. - if ('-' === substr($label, 0, 1)) { - $info->errors |= self::ERROR_LEADING_HYPHEN; - } - - if ('-' === substr($label, -1, 1)) { - $info->errors |= self::ERROR_TRAILING_HYPHEN; - } - } - - // Step 4. The label must not contain a U+002E (.) FULL STOP. - if (false !== strpos($label, '.')) { - $info->errors |= self::ERROR_LABEL_HAS_DOT; - } - - // Step 5. The label must not begin with a combining mark, that is: General_Category=Mark. - if (1 === preg_match(Regex::COMBINING_MARK, $label)) { - $info->errors |= self::ERROR_LEADING_COMBINING_MARK; - } - - // Step 6. Each code point in the label must only have certain status values according to - // Section 5, IDNA Mapping Table: - $transitional = $options['Transitional_Processing']; - $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; - - foreach ($codePoints as $codePoint) { - $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); - $status = $data['status']; - - if ('valid' === $status || (!$transitional && 'deviation' === $status)) { - continue; - } - - $info->errors |= self::ERROR_DISALLOWED; - - break; - } - - // Step 7. If CheckJoiners, the label must satisify the ContextJ rules from Appendix A, in - // The Unicode Code Points and Internationalized Domain Names for Applications (IDNA) - // [IDNA2008]. - if ($options['CheckJoiners'] && !self::isValidContextJ($codePoints, $label)) { - $info->errors |= self::ERROR_CONTEXTJ; - } - - // Step 8. If CheckBidi, and if the domain name is a Bidi domain name, then the label must - // satisfy all six of the numbered conditions in [IDNA2008] RFC 5893, Section 2. - if ($options['CheckBidi'] && (!$info->bidiDomain || $info->validBidiDomain)) { - self::validateBidiLabel($label, $info); - } - } - - /** - * @see https://tools.ietf.org/html/rfc3492#section-6.2 - * - * @param string $input - * - * @return string - */ - private static function punycodeDecode($input) - { - $n = self::INITIAL_N; - $out = 0; - $i = 0; - $bias = self::INITIAL_BIAS; - $lastDelimIndex = strrpos($input, self::DELIMITER); - $b = false === $lastDelimIndex ? 0 : $lastDelimIndex; - $inputLength = \strlen($input); - $output = []; - $bytes = array_map('ord', str_split($input)); - - for ($j = 0; $j < $b; ++$j) { - if ($bytes[$j] > 0x7F) { - throw new Exception('Invalid input'); - } - - $output[$out++] = $input[$j]; - } - - if ($b > 0) { - ++$b; - } - - for ($in = $b; $in < $inputLength; ++$out) { - $oldi = $i; - $w = 1; - - for ($k = self::BASE; /* no condition */; $k += self::BASE) { - if ($in >= $inputLength) { - throw new Exception('Invalid input'); - } - - $digit = self::$basicToDigit[$bytes[$in++] & 0xFF]; - - if ($digit < 0) { - throw new Exception('Invalid input'); - } - - if ($digit > intdiv(self::MAX_INT - $i, $w)) { - throw new Exception('Integer overflow'); - } - - $i += $digit * $w; - - if ($k <= $bias) { - $t = self::TMIN; - } elseif ($k >= $bias + self::TMAX) { - $t = self::TMAX; - } else { - $t = $k - $bias; - } - - if ($digit < $t) { - break; - } - - $baseMinusT = self::BASE - $t; - - if ($w > intdiv(self::MAX_INT, $baseMinusT)) { - throw new Exception('Integer overflow'); - } - - $w *= $baseMinusT; - } - - $outPlusOne = $out + 1; - $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi); - - if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) { - throw new Exception('Integer overflow'); - } - - $n += intdiv($i, $outPlusOne); - $i %= $outPlusOne; - array_splice($output, $i++, 0, [mb_chr($n, 'utf-8')]); - } - - return implode('', $output); - } - - /** - * @see https://tools.ietf.org/html/rfc3492#section-6.3 - * - * @param string $input - * - * @return string - */ - private static function punycodeEncode($input) - { - $n = self::INITIAL_N; - $delta = 0; - $out = 0; - $bias = self::INITIAL_BIAS; - $inputLength = 0; - $output = ''; - $iter = self::utf8Decode($input); - - foreach ($iter as $codePoint) { - ++$inputLength; - - if ($codePoint < 0x80) { - $output .= \chr($codePoint); - ++$out; - } - } - - $h = $out; - $b = $out; - - if ($b > 0) { - $output .= self::DELIMITER; - ++$out; - } - - while ($h < $inputLength) { - $m = self::MAX_INT; - - foreach ($iter as $codePoint) { - if ($codePoint >= $n && $codePoint < $m) { - $m = $codePoint; - } - } - - if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) { - throw new Exception('Integer overflow'); - } - - $delta += ($m - $n) * ($h + 1); - $n = $m; - - foreach ($iter as $codePoint) { - if ($codePoint < $n && 0 === ++$delta) { - throw new Exception('Integer overflow'); - } - - if ($codePoint === $n) { - $q = $delta; - - for ($k = self::BASE; /* no condition */; $k += self::BASE) { - if ($k <= $bias) { - $t = self::TMIN; - } elseif ($k >= $bias + self::TMAX) { - $t = self::TMAX; - } else { - $t = $k - $bias; - } - - if ($q < $t) { - break; - } - - $qMinusT = $q - $t; - $baseMinusT = self::BASE - $t; - $output .= self::encodeDigit($t + ($qMinusT) % ($baseMinusT), false); - ++$out; - $q = intdiv($qMinusT, $baseMinusT); - } - - $output .= self::encodeDigit($q, false); - ++$out; - $bias = self::adaptBias($delta, $h + 1, $h === $b); - $delta = 0; - ++$h; - } - } - - ++$delta; - ++$n; - } - - return $output; - } - - /** - * @see https://tools.ietf.org/html/rfc3492#section-6.1 - * - * @param int $delta - * @param int $numPoints - * @param bool $firstTime - * - * @return int - */ - private static function adaptBias($delta, $numPoints, $firstTime) - { - // xxx >> 1 is a faster way of doing intdiv(xxx, 2) - $delta = $firstTime ? intdiv($delta, self::DAMP) : $delta >> 1; - $delta += intdiv($delta, $numPoints); - $k = 0; - - while ($delta > ((self::BASE - self::TMIN) * self::TMAX) >> 1) { - $delta = intdiv($delta, self::BASE - self::TMIN); - $k += self::BASE; - } - - return $k + intdiv((self::BASE - self::TMIN + 1) * $delta, $delta + self::SKEW); - } - - /** - * @param int $d - * @param bool $flag - * - * @return string - */ - private static function encodeDigit($d, $flag) - { - return \chr($d + 22 + 75 * ($d < 26 ? 1 : 0) - (($flag ? 1 : 0) << 5)); - } - - /** - * Takes a UTF-8 encoded string and converts it into a series of integer code points. Any - * invalid byte sequences will be replaced by a U+FFFD replacement code point. - * - * @see https://encoding.spec.whatwg.org/#utf-8-decoder - * - * @param string $input - * - * @return array - */ - private static function utf8Decode($input) - { - $bytesSeen = 0; - $bytesNeeded = 0; - $lowerBoundary = 0x80; - $upperBoundary = 0xBF; - $codePoint = 0; - $codePoints = []; - $length = \strlen($input); - - for ($i = 0; $i < $length; ++$i) { - $byte = \ord($input[$i]); - - if (0 === $bytesNeeded) { - if ($byte >= 0x00 && $byte <= 0x7F) { - $codePoints[] = $byte; - - continue; - } - - if ($byte >= 0xC2 && $byte <= 0xDF) { - $bytesNeeded = 1; - $codePoint = $byte & 0x1F; - } elseif ($byte >= 0xE0 && $byte <= 0xEF) { - if (0xE0 === $byte) { - $lowerBoundary = 0xA0; - } elseif (0xED === $byte) { - $upperBoundary = 0x9F; - } - - $bytesNeeded = 2; - $codePoint = $byte & 0xF; - } elseif ($byte >= 0xF0 && $byte <= 0xF4) { - if (0xF0 === $byte) { - $lowerBoundary = 0x90; - } elseif (0xF4 === $byte) { - $upperBoundary = 0x8F; - } - - $bytesNeeded = 3; - $codePoint = $byte & 0x7; - } else { - $codePoints[] = 0xFFFD; - } - - continue; - } - - if ($byte < $lowerBoundary || $byte > $upperBoundary) { - $codePoint = 0; - $bytesNeeded = 0; - $bytesSeen = 0; - $lowerBoundary = 0x80; - $upperBoundary = 0xBF; - --$i; - $codePoints[] = 0xFFFD; - - continue; - } - - $lowerBoundary = 0x80; - $upperBoundary = 0xBF; - $codePoint = ($codePoint << 6) | ($byte & 0x3F); - - if (++$bytesSeen !== $bytesNeeded) { - continue; - } - - $codePoints[] = $codePoint; - $codePoint = 0; - $bytesNeeded = 0; - $bytesSeen = 0; - } - - // String unexpectedly ended, so append a U+FFFD code point. - if (0 !== $bytesNeeded) { - $codePoints[] = 0xFFFD; - } - - return $codePoints; - } - - /** - * @param int $codePoint - * @param bool $useSTD3ASCIIRules - * - * @return array{status: string, mapping?: string} - */ - private static function lookupCodePointStatus($codePoint, $useSTD3ASCIIRules) - { - if (!self::$mappingTableLoaded) { - self::$mappingTableLoaded = true; - self::$mapped = require __DIR__.'/Resources/unidata/mapped.php'; - self::$ignored = require __DIR__.'/Resources/unidata/ignored.php'; - self::$deviation = require __DIR__.'/Resources/unidata/deviation.php'; - self::$disallowed = require __DIR__.'/Resources/unidata/disallowed.php'; - self::$disallowed_STD3_mapped = require __DIR__.'/Resources/unidata/disallowed_STD3_mapped.php'; - self::$disallowed_STD3_valid = require __DIR__.'/Resources/unidata/disallowed_STD3_valid.php'; - } - - if (isset(self::$mapped[$codePoint])) { - return ['status' => 'mapped', 'mapping' => self::$mapped[$codePoint]]; - } - - if (isset(self::$ignored[$codePoint])) { - return ['status' => 'ignored']; - } - - if (isset(self::$deviation[$codePoint])) { - return ['status' => 'deviation', 'mapping' => self::$deviation[$codePoint]]; - } - - if (isset(self::$disallowed[$codePoint]) || DisallowedRanges::inRange($codePoint)) { - return ['status' => 'disallowed']; - } - - $isDisallowedMapped = isset(self::$disallowed_STD3_mapped[$codePoint]); - - if ($isDisallowedMapped || isset(self::$disallowed_STD3_valid[$codePoint])) { - $status = 'disallowed'; - - if (!$useSTD3ASCIIRules) { - $status = $isDisallowedMapped ? 'mapped' : 'valid'; - } - - if ($isDisallowedMapped) { - return ['status' => $status, 'mapping' => self::$disallowed_STD3_mapped[$codePoint]]; - } - - return ['status' => $status]; - } - - return ['status' => 'valid']; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Info.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Info.php deleted file mode 100644 index e5e916c4..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Info.php +++ /dev/null @@ -1,23 +0,0 @@ - and Trevor Rowbotham - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Doofinder\Symfony\Polyfill\Intl\Idn; - -/** - * @internal - */ -class Info -{ - public $bidiDomain = false; - public $errors = 0; - public $validBidiDomain = true; - public $transitionalDifferent = false; -} diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/LICENSE b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/LICENSE deleted file mode 100644 index 03c5e257..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php deleted file mode 100644 index e75d8377..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php +++ /dev/null @@ -1,375 +0,0 @@ -= 128 && $codePoint <= 159) { - return true; - } - - if ($codePoint >= 2155 && $codePoint <= 2207) { - return true; - } - - if ($codePoint >= 3676 && $codePoint <= 3712) { - return true; - } - - if ($codePoint >= 3808 && $codePoint <= 3839) { - return true; - } - - if ($codePoint >= 4059 && $codePoint <= 4095) { - return true; - } - - if ($codePoint >= 4256 && $codePoint <= 4293) { - return true; - } - - if ($codePoint >= 6849 && $codePoint <= 6911) { - return true; - } - - if ($codePoint >= 11859 && $codePoint <= 11903) { - return true; - } - - if ($codePoint >= 42955 && $codePoint <= 42996) { - return true; - } - - if ($codePoint >= 55296 && $codePoint <= 57343) { - return true; - } - - if ($codePoint >= 57344 && $codePoint <= 63743) { - return true; - } - - if ($codePoint >= 64218 && $codePoint <= 64255) { - return true; - } - - if ($codePoint >= 64976 && $codePoint <= 65007) { - return true; - } - - if ($codePoint >= 65630 && $codePoint <= 65663) { - return true; - } - - if ($codePoint >= 65953 && $codePoint <= 65999) { - return true; - } - - if ($codePoint >= 66046 && $codePoint <= 66175) { - return true; - } - - if ($codePoint >= 66518 && $codePoint <= 66559) { - return true; - } - - if ($codePoint >= 66928 && $codePoint <= 67071) { - return true; - } - - if ($codePoint >= 67432 && $codePoint <= 67583) { - return true; - } - - if ($codePoint >= 67760 && $codePoint <= 67807) { - return true; - } - - if ($codePoint >= 67904 && $codePoint <= 67967) { - return true; - } - - if ($codePoint >= 68256 && $codePoint <= 68287) { - return true; - } - - if ($codePoint >= 68528 && $codePoint <= 68607) { - return true; - } - - if ($codePoint >= 68681 && $codePoint <= 68735) { - return true; - } - - if ($codePoint >= 68922 && $codePoint <= 69215) { - return true; - } - - if ($codePoint >= 69298 && $codePoint <= 69375) { - return true; - } - - if ($codePoint >= 69466 && $codePoint <= 69551) { - return true; - } - - if ($codePoint >= 70207 && $codePoint <= 70271) { - return true; - } - - if ($codePoint >= 70517 && $codePoint <= 70655) { - return true; - } - - if ($codePoint >= 70874 && $codePoint <= 71039) { - return true; - } - - if ($codePoint >= 71134 && $codePoint <= 71167) { - return true; - } - - if ($codePoint >= 71370 && $codePoint <= 71423) { - return true; - } - - if ($codePoint >= 71488 && $codePoint <= 71679) { - return true; - } - - if ($codePoint >= 71740 && $codePoint <= 71839) { - return true; - } - - if ($codePoint >= 72026 && $codePoint <= 72095) { - return true; - } - - if ($codePoint >= 72441 && $codePoint <= 72703) { - return true; - } - - if ($codePoint >= 72887 && $codePoint <= 72959) { - return true; - } - - if ($codePoint >= 73130 && $codePoint <= 73439) { - return true; - } - - if ($codePoint >= 73465 && $codePoint <= 73647) { - return true; - } - - if ($codePoint >= 74650 && $codePoint <= 74751) { - return true; - } - - if ($codePoint >= 75076 && $codePoint <= 77823) { - return true; - } - - if ($codePoint >= 78905 && $codePoint <= 82943) { - return true; - } - - if ($codePoint >= 83527 && $codePoint <= 92159) { - return true; - } - - if ($codePoint >= 92784 && $codePoint <= 92879) { - return true; - } - - if ($codePoint >= 93072 && $codePoint <= 93759) { - return true; - } - - if ($codePoint >= 93851 && $codePoint <= 93951) { - return true; - } - - if ($codePoint >= 94112 && $codePoint <= 94175) { - return true; - } - - if ($codePoint >= 101590 && $codePoint <= 101631) { - return true; - } - - if ($codePoint >= 101641 && $codePoint <= 110591) { - return true; - } - - if ($codePoint >= 110879 && $codePoint <= 110927) { - return true; - } - - if ($codePoint >= 111356 && $codePoint <= 113663) { - return true; - } - - if ($codePoint >= 113828 && $codePoint <= 118783) { - return true; - } - - if ($codePoint >= 119366 && $codePoint <= 119519) { - return true; - } - - if ($codePoint >= 119673 && $codePoint <= 119807) { - return true; - } - - if ($codePoint >= 121520 && $codePoint <= 122879) { - return true; - } - - if ($codePoint >= 122923 && $codePoint <= 123135) { - return true; - } - - if ($codePoint >= 123216 && $codePoint <= 123583) { - return true; - } - - if ($codePoint >= 123648 && $codePoint <= 124927) { - return true; - } - - if ($codePoint >= 125143 && $codePoint <= 125183) { - return true; - } - - if ($codePoint >= 125280 && $codePoint <= 126064) { - return true; - } - - if ($codePoint >= 126133 && $codePoint <= 126208) { - return true; - } - - if ($codePoint >= 126270 && $codePoint <= 126463) { - return true; - } - - if ($codePoint >= 126652 && $codePoint <= 126703) { - return true; - } - - if ($codePoint >= 126706 && $codePoint <= 126975) { - return true; - } - - if ($codePoint >= 127406 && $codePoint <= 127461) { - return true; - } - - if ($codePoint >= 127590 && $codePoint <= 127743) { - return true; - } - - if ($codePoint >= 129202 && $codePoint <= 129279) { - return true; - } - - if ($codePoint >= 129751 && $codePoint <= 129791) { - return true; - } - - if ($codePoint >= 129995 && $codePoint <= 130031) { - return true; - } - - if ($codePoint >= 130042 && $codePoint <= 131069) { - return true; - } - - if ($codePoint >= 173790 && $codePoint <= 173823) { - return true; - } - - if ($codePoint >= 191457 && $codePoint <= 194559) { - return true; - } - - if ($codePoint >= 195102 && $codePoint <= 196605) { - return true; - } - - if ($codePoint >= 201547 && $codePoint <= 262141) { - return true; - } - - if ($codePoint >= 262144 && $codePoint <= 327677) { - return true; - } - - if ($codePoint >= 327680 && $codePoint <= 393213) { - return true; - } - - if ($codePoint >= 393216 && $codePoint <= 458749) { - return true; - } - - if ($codePoint >= 458752 && $codePoint <= 524285) { - return true; - } - - if ($codePoint >= 524288 && $codePoint <= 589821) { - return true; - } - - if ($codePoint >= 589824 && $codePoint <= 655357) { - return true; - } - - if ($codePoint >= 655360 && $codePoint <= 720893) { - return true; - } - - if ($codePoint >= 720896 && $codePoint <= 786429) { - return true; - } - - if ($codePoint >= 786432 && $codePoint <= 851965) { - return true; - } - - if ($codePoint >= 851968 && $codePoint <= 917501) { - return true; - } - - if ($codePoint >= 917536 && $codePoint <= 917631) { - return true; - } - - if ($codePoint >= 917632 && $codePoint <= 917759) { - return true; - } - - if ($codePoint >= 918000 && $codePoint <= 983037) { - return true; - } - - if ($codePoint >= 983040 && $codePoint <= 1048573) { - return true; - } - - if ($codePoint >= 1048576 && $codePoint <= 1114109) { - return true; - } - - return false; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php deleted file mode 100644 index ed1786f6..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php +++ /dev/null @@ -1,24 +0,0 @@ - 'ss', - 962 => 'σ', - 8204 => '', - 8205 => '', -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php deleted file mode 100644 index 25a5f564..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php +++ /dev/null @@ -1,2638 +0,0 @@ - true, - 889 => true, - 896 => true, - 897 => true, - 898 => true, - 899 => true, - 907 => true, - 909 => true, - 930 => true, - 1216 => true, - 1328 => true, - 1367 => true, - 1368 => true, - 1419 => true, - 1420 => true, - 1424 => true, - 1480 => true, - 1481 => true, - 1482 => true, - 1483 => true, - 1484 => true, - 1485 => true, - 1486 => true, - 1487 => true, - 1515 => true, - 1516 => true, - 1517 => true, - 1518 => true, - 1525 => true, - 1526 => true, - 1527 => true, - 1528 => true, - 1529 => true, - 1530 => true, - 1531 => true, - 1532 => true, - 1533 => true, - 1534 => true, - 1535 => true, - 1536 => true, - 1537 => true, - 1538 => true, - 1539 => true, - 1540 => true, - 1541 => true, - 1564 => true, - 1565 => true, - 1757 => true, - 1806 => true, - 1807 => true, - 1867 => true, - 1868 => true, - 1970 => true, - 1971 => true, - 1972 => true, - 1973 => true, - 1974 => true, - 1975 => true, - 1976 => true, - 1977 => true, - 1978 => true, - 1979 => true, - 1980 => true, - 1981 => true, - 1982 => true, - 1983 => true, - 2043 => true, - 2044 => true, - 2094 => true, - 2095 => true, - 2111 => true, - 2140 => true, - 2141 => true, - 2143 => true, - 2229 => true, - 2248 => true, - 2249 => true, - 2250 => true, - 2251 => true, - 2252 => true, - 2253 => true, - 2254 => true, - 2255 => true, - 2256 => true, - 2257 => true, - 2258 => true, - 2274 => true, - 2436 => true, - 2445 => true, - 2446 => true, - 2449 => true, - 2450 => true, - 2473 => true, - 2481 => true, - 2483 => true, - 2484 => true, - 2485 => true, - 2490 => true, - 2491 => true, - 2501 => true, - 2502 => true, - 2505 => true, - 2506 => true, - 2511 => true, - 2512 => true, - 2513 => true, - 2514 => true, - 2515 => true, - 2516 => true, - 2517 => true, - 2518 => true, - 2520 => true, - 2521 => true, - 2522 => true, - 2523 => true, - 2526 => true, - 2532 => true, - 2533 => true, - 2559 => true, - 2560 => true, - 2564 => true, - 2571 => true, - 2572 => true, - 2573 => true, - 2574 => true, - 2577 => true, - 2578 => true, - 2601 => true, - 2609 => true, - 2612 => true, - 2615 => true, - 2618 => true, - 2619 => true, - 2621 => true, - 2627 => true, - 2628 => true, - 2629 => true, - 2630 => true, - 2633 => true, - 2634 => true, - 2638 => true, - 2639 => true, - 2640 => true, - 2642 => true, - 2643 => true, - 2644 => true, - 2645 => true, - 2646 => true, - 2647 => true, - 2648 => true, - 2653 => true, - 2655 => true, - 2656 => true, - 2657 => true, - 2658 => true, - 2659 => true, - 2660 => true, - 2661 => true, - 2679 => true, - 2680 => true, - 2681 => true, - 2682 => true, - 2683 => true, - 2684 => true, - 2685 => true, - 2686 => true, - 2687 => true, - 2688 => true, - 2692 => true, - 2702 => true, - 2706 => true, - 2729 => true, - 2737 => true, - 2740 => true, - 2746 => true, - 2747 => true, - 2758 => true, - 2762 => true, - 2766 => true, - 2767 => true, - 2769 => true, - 2770 => true, - 2771 => true, - 2772 => true, - 2773 => true, - 2774 => true, - 2775 => true, - 2776 => true, - 2777 => true, - 2778 => true, - 2779 => true, - 2780 => true, - 2781 => true, - 2782 => true, - 2783 => true, - 2788 => true, - 2789 => true, - 2802 => true, - 2803 => true, - 2804 => true, - 2805 => true, - 2806 => true, - 2807 => true, - 2808 => true, - 2816 => true, - 2820 => true, - 2829 => true, - 2830 => true, - 2833 => true, - 2834 => true, - 2857 => true, - 2865 => true, - 2868 => true, - 2874 => true, - 2875 => true, - 2885 => true, - 2886 => true, - 2889 => true, - 2890 => true, - 2894 => true, - 2895 => true, - 2896 => true, - 2897 => true, - 2898 => true, - 2899 => true, - 2900 => true, - 2904 => true, - 2905 => true, - 2906 => true, - 2907 => true, - 2910 => true, - 2916 => true, - 2917 => true, - 2936 => true, - 2937 => true, - 2938 => true, - 2939 => true, - 2940 => true, - 2941 => true, - 2942 => true, - 2943 => true, - 2944 => true, - 2945 => true, - 2948 => true, - 2955 => true, - 2956 => true, - 2957 => true, - 2961 => true, - 2966 => true, - 2967 => true, - 2968 => true, - 2971 => true, - 2973 => true, - 2976 => true, - 2977 => true, - 2978 => true, - 2981 => true, - 2982 => true, - 2983 => true, - 2987 => true, - 2988 => true, - 2989 => true, - 3002 => true, - 3003 => true, - 3004 => true, - 3005 => true, - 3011 => true, - 3012 => true, - 3013 => true, - 3017 => true, - 3022 => true, - 3023 => true, - 3025 => true, - 3026 => true, - 3027 => true, - 3028 => true, - 3029 => true, - 3030 => true, - 3032 => true, - 3033 => true, - 3034 => true, - 3035 => true, - 3036 => true, - 3037 => true, - 3038 => true, - 3039 => true, - 3040 => true, - 3041 => true, - 3042 => true, - 3043 => true, - 3044 => true, - 3045 => true, - 3067 => true, - 3068 => true, - 3069 => true, - 3070 => true, - 3071 => true, - 3085 => true, - 3089 => true, - 3113 => true, - 3130 => true, - 3131 => true, - 3132 => true, - 3141 => true, - 3145 => true, - 3150 => true, - 3151 => true, - 3152 => true, - 3153 => true, - 3154 => true, - 3155 => true, - 3156 => true, - 3159 => true, - 3163 => true, - 3164 => true, - 3165 => true, - 3166 => true, - 3167 => true, - 3172 => true, - 3173 => true, - 3184 => true, - 3185 => true, - 3186 => true, - 3187 => true, - 3188 => true, - 3189 => true, - 3190 => true, - 3213 => true, - 3217 => true, - 3241 => true, - 3252 => true, - 3258 => true, - 3259 => true, - 3269 => true, - 3273 => true, - 3278 => true, - 3279 => true, - 3280 => true, - 3281 => true, - 3282 => true, - 3283 => true, - 3284 => true, - 3287 => true, - 3288 => true, - 3289 => true, - 3290 => true, - 3291 => true, - 3292 => true, - 3293 => true, - 3295 => true, - 3300 => true, - 3301 => true, - 3312 => true, - 3315 => true, - 3316 => true, - 3317 => true, - 3318 => true, - 3319 => true, - 3320 => true, - 3321 => true, - 3322 => true, - 3323 => true, - 3324 => true, - 3325 => true, - 3326 => true, - 3327 => true, - 3341 => true, - 3345 => true, - 3397 => true, - 3401 => true, - 3408 => true, - 3409 => true, - 3410 => true, - 3411 => true, - 3428 => true, - 3429 => true, - 3456 => true, - 3460 => true, - 3479 => true, - 3480 => true, - 3481 => true, - 3506 => true, - 3516 => true, - 3518 => true, - 3519 => true, - 3527 => true, - 3528 => true, - 3529 => true, - 3531 => true, - 3532 => true, - 3533 => true, - 3534 => true, - 3541 => true, - 3543 => true, - 3552 => true, - 3553 => true, - 3554 => true, - 3555 => true, - 3556 => true, - 3557 => true, - 3568 => true, - 3569 => true, - 3573 => true, - 3574 => true, - 3575 => true, - 3576 => true, - 3577 => true, - 3578 => true, - 3579 => true, - 3580 => true, - 3581 => true, - 3582 => true, - 3583 => true, - 3584 => true, - 3643 => true, - 3644 => true, - 3645 => true, - 3646 => true, - 3715 => true, - 3717 => true, - 3723 => true, - 3748 => true, - 3750 => true, - 3774 => true, - 3775 => true, - 3781 => true, - 3783 => true, - 3790 => true, - 3791 => true, - 3802 => true, - 3803 => true, - 3912 => true, - 3949 => true, - 3950 => true, - 3951 => true, - 3952 => true, - 3992 => true, - 4029 => true, - 4045 => true, - 4294 => true, - 4296 => true, - 4297 => true, - 4298 => true, - 4299 => true, - 4300 => true, - 4302 => true, - 4303 => true, - 4447 => true, - 4448 => true, - 4681 => true, - 4686 => true, - 4687 => true, - 4695 => true, - 4697 => true, - 4702 => true, - 4703 => true, - 4745 => true, - 4750 => true, - 4751 => true, - 4785 => true, - 4790 => true, - 4791 => true, - 4799 => true, - 4801 => true, - 4806 => true, - 4807 => true, - 4823 => true, - 4881 => true, - 4886 => true, - 4887 => true, - 4955 => true, - 4956 => true, - 4989 => true, - 4990 => true, - 4991 => true, - 5018 => true, - 5019 => true, - 5020 => true, - 5021 => true, - 5022 => true, - 5023 => true, - 5110 => true, - 5111 => true, - 5118 => true, - 5119 => true, - 5760 => true, - 5789 => true, - 5790 => true, - 5791 => true, - 5881 => true, - 5882 => true, - 5883 => true, - 5884 => true, - 5885 => true, - 5886 => true, - 5887 => true, - 5901 => true, - 5909 => true, - 5910 => true, - 5911 => true, - 5912 => true, - 5913 => true, - 5914 => true, - 5915 => true, - 5916 => true, - 5917 => true, - 5918 => true, - 5919 => true, - 5943 => true, - 5944 => true, - 5945 => true, - 5946 => true, - 5947 => true, - 5948 => true, - 5949 => true, - 5950 => true, - 5951 => true, - 5972 => true, - 5973 => true, - 5974 => true, - 5975 => true, - 5976 => true, - 5977 => true, - 5978 => true, - 5979 => true, - 5980 => true, - 5981 => true, - 5982 => true, - 5983 => true, - 5997 => true, - 6001 => true, - 6004 => true, - 6005 => true, - 6006 => true, - 6007 => true, - 6008 => true, - 6009 => true, - 6010 => true, - 6011 => true, - 6012 => true, - 6013 => true, - 6014 => true, - 6015 => true, - 6068 => true, - 6069 => true, - 6110 => true, - 6111 => true, - 6122 => true, - 6123 => true, - 6124 => true, - 6125 => true, - 6126 => true, - 6127 => true, - 6138 => true, - 6139 => true, - 6140 => true, - 6141 => true, - 6142 => true, - 6143 => true, - 6150 => true, - 6158 => true, - 6159 => true, - 6170 => true, - 6171 => true, - 6172 => true, - 6173 => true, - 6174 => true, - 6175 => true, - 6265 => true, - 6266 => true, - 6267 => true, - 6268 => true, - 6269 => true, - 6270 => true, - 6271 => true, - 6315 => true, - 6316 => true, - 6317 => true, - 6318 => true, - 6319 => true, - 6390 => true, - 6391 => true, - 6392 => true, - 6393 => true, - 6394 => true, - 6395 => true, - 6396 => true, - 6397 => true, - 6398 => true, - 6399 => true, - 6431 => true, - 6444 => true, - 6445 => true, - 6446 => true, - 6447 => true, - 6460 => true, - 6461 => true, - 6462 => true, - 6463 => true, - 6465 => true, - 6466 => true, - 6467 => true, - 6510 => true, - 6511 => true, - 6517 => true, - 6518 => true, - 6519 => true, - 6520 => true, - 6521 => true, - 6522 => true, - 6523 => true, - 6524 => true, - 6525 => true, - 6526 => true, - 6527 => true, - 6572 => true, - 6573 => true, - 6574 => true, - 6575 => true, - 6602 => true, - 6603 => true, - 6604 => true, - 6605 => true, - 6606 => true, - 6607 => true, - 6619 => true, - 6620 => true, - 6621 => true, - 6684 => true, - 6685 => true, - 6751 => true, - 6781 => true, - 6782 => true, - 6794 => true, - 6795 => true, - 6796 => true, - 6797 => true, - 6798 => true, - 6799 => true, - 6810 => true, - 6811 => true, - 6812 => true, - 6813 => true, - 6814 => true, - 6815 => true, - 6830 => true, - 6831 => true, - 6988 => true, - 6989 => true, - 6990 => true, - 6991 => true, - 7037 => true, - 7038 => true, - 7039 => true, - 7156 => true, - 7157 => true, - 7158 => true, - 7159 => true, - 7160 => true, - 7161 => true, - 7162 => true, - 7163 => true, - 7224 => true, - 7225 => true, - 7226 => true, - 7242 => true, - 7243 => true, - 7244 => true, - 7305 => true, - 7306 => true, - 7307 => true, - 7308 => true, - 7309 => true, - 7310 => true, - 7311 => true, - 7355 => true, - 7356 => true, - 7368 => true, - 7369 => true, - 7370 => true, - 7371 => true, - 7372 => true, - 7373 => true, - 7374 => true, - 7375 => true, - 7419 => true, - 7420 => true, - 7421 => true, - 7422 => true, - 7423 => true, - 7674 => true, - 7958 => true, - 7959 => true, - 7966 => true, - 7967 => true, - 8006 => true, - 8007 => true, - 8014 => true, - 8015 => true, - 8024 => true, - 8026 => true, - 8028 => true, - 8030 => true, - 8062 => true, - 8063 => true, - 8117 => true, - 8133 => true, - 8148 => true, - 8149 => true, - 8156 => true, - 8176 => true, - 8177 => true, - 8181 => true, - 8191 => true, - 8206 => true, - 8207 => true, - 8228 => true, - 8229 => true, - 8230 => true, - 8232 => true, - 8233 => true, - 8234 => true, - 8235 => true, - 8236 => true, - 8237 => true, - 8238 => true, - 8289 => true, - 8290 => true, - 8291 => true, - 8293 => true, - 8294 => true, - 8295 => true, - 8296 => true, - 8297 => true, - 8298 => true, - 8299 => true, - 8300 => true, - 8301 => true, - 8302 => true, - 8303 => true, - 8306 => true, - 8307 => true, - 8335 => true, - 8349 => true, - 8350 => true, - 8351 => true, - 8384 => true, - 8385 => true, - 8386 => true, - 8387 => true, - 8388 => true, - 8389 => true, - 8390 => true, - 8391 => true, - 8392 => true, - 8393 => true, - 8394 => true, - 8395 => true, - 8396 => true, - 8397 => true, - 8398 => true, - 8399 => true, - 8433 => true, - 8434 => true, - 8435 => true, - 8436 => true, - 8437 => true, - 8438 => true, - 8439 => true, - 8440 => true, - 8441 => true, - 8442 => true, - 8443 => true, - 8444 => true, - 8445 => true, - 8446 => true, - 8447 => true, - 8498 => true, - 8579 => true, - 8588 => true, - 8589 => true, - 8590 => true, - 8591 => true, - 9255 => true, - 9256 => true, - 9257 => true, - 9258 => true, - 9259 => true, - 9260 => true, - 9261 => true, - 9262 => true, - 9263 => true, - 9264 => true, - 9265 => true, - 9266 => true, - 9267 => true, - 9268 => true, - 9269 => true, - 9270 => true, - 9271 => true, - 9272 => true, - 9273 => true, - 9274 => true, - 9275 => true, - 9276 => true, - 9277 => true, - 9278 => true, - 9279 => true, - 9291 => true, - 9292 => true, - 9293 => true, - 9294 => true, - 9295 => true, - 9296 => true, - 9297 => true, - 9298 => true, - 9299 => true, - 9300 => true, - 9301 => true, - 9302 => true, - 9303 => true, - 9304 => true, - 9305 => true, - 9306 => true, - 9307 => true, - 9308 => true, - 9309 => true, - 9310 => true, - 9311 => true, - 9352 => true, - 9353 => true, - 9354 => true, - 9355 => true, - 9356 => true, - 9357 => true, - 9358 => true, - 9359 => true, - 9360 => true, - 9361 => true, - 9362 => true, - 9363 => true, - 9364 => true, - 9365 => true, - 9366 => true, - 9367 => true, - 9368 => true, - 9369 => true, - 9370 => true, - 9371 => true, - 11124 => true, - 11125 => true, - 11158 => true, - 11311 => true, - 11359 => true, - 11508 => true, - 11509 => true, - 11510 => true, - 11511 => true, - 11512 => true, - 11558 => true, - 11560 => true, - 11561 => true, - 11562 => true, - 11563 => true, - 11564 => true, - 11566 => true, - 11567 => true, - 11624 => true, - 11625 => true, - 11626 => true, - 11627 => true, - 11628 => true, - 11629 => true, - 11630 => true, - 11633 => true, - 11634 => true, - 11635 => true, - 11636 => true, - 11637 => true, - 11638 => true, - 11639 => true, - 11640 => true, - 11641 => true, - 11642 => true, - 11643 => true, - 11644 => true, - 11645 => true, - 11646 => true, - 11671 => true, - 11672 => true, - 11673 => true, - 11674 => true, - 11675 => true, - 11676 => true, - 11677 => true, - 11678 => true, - 11679 => true, - 11687 => true, - 11695 => true, - 11703 => true, - 11711 => true, - 11719 => true, - 11727 => true, - 11735 => true, - 11743 => true, - 11930 => true, - 12020 => true, - 12021 => true, - 12022 => true, - 12023 => true, - 12024 => true, - 12025 => true, - 12026 => true, - 12027 => true, - 12028 => true, - 12029 => true, - 12030 => true, - 12031 => true, - 12246 => true, - 12247 => true, - 12248 => true, - 12249 => true, - 12250 => true, - 12251 => true, - 12252 => true, - 12253 => true, - 12254 => true, - 12255 => true, - 12256 => true, - 12257 => true, - 12258 => true, - 12259 => true, - 12260 => true, - 12261 => true, - 12262 => true, - 12263 => true, - 12264 => true, - 12265 => true, - 12266 => true, - 12267 => true, - 12268 => true, - 12269 => true, - 12270 => true, - 12271 => true, - 12272 => true, - 12273 => true, - 12274 => true, - 12275 => true, - 12276 => true, - 12277 => true, - 12278 => true, - 12279 => true, - 12280 => true, - 12281 => true, - 12282 => true, - 12283 => true, - 12284 => true, - 12285 => true, - 12286 => true, - 12287 => true, - 12352 => true, - 12439 => true, - 12440 => true, - 12544 => true, - 12545 => true, - 12546 => true, - 12547 => true, - 12548 => true, - 12592 => true, - 12644 => true, - 12687 => true, - 12772 => true, - 12773 => true, - 12774 => true, - 12775 => true, - 12776 => true, - 12777 => true, - 12778 => true, - 12779 => true, - 12780 => true, - 12781 => true, - 12782 => true, - 12783 => true, - 12831 => true, - 13250 => true, - 13255 => true, - 13272 => true, - 40957 => true, - 40958 => true, - 40959 => true, - 42125 => true, - 42126 => true, - 42127 => true, - 42183 => true, - 42184 => true, - 42185 => true, - 42186 => true, - 42187 => true, - 42188 => true, - 42189 => true, - 42190 => true, - 42191 => true, - 42540 => true, - 42541 => true, - 42542 => true, - 42543 => true, - 42544 => true, - 42545 => true, - 42546 => true, - 42547 => true, - 42548 => true, - 42549 => true, - 42550 => true, - 42551 => true, - 42552 => true, - 42553 => true, - 42554 => true, - 42555 => true, - 42556 => true, - 42557 => true, - 42558 => true, - 42559 => true, - 42744 => true, - 42745 => true, - 42746 => true, - 42747 => true, - 42748 => true, - 42749 => true, - 42750 => true, - 42751 => true, - 42944 => true, - 42945 => true, - 43053 => true, - 43054 => true, - 43055 => true, - 43066 => true, - 43067 => true, - 43068 => true, - 43069 => true, - 43070 => true, - 43071 => true, - 43128 => true, - 43129 => true, - 43130 => true, - 43131 => true, - 43132 => true, - 43133 => true, - 43134 => true, - 43135 => true, - 43206 => true, - 43207 => true, - 43208 => true, - 43209 => true, - 43210 => true, - 43211 => true, - 43212 => true, - 43213 => true, - 43226 => true, - 43227 => true, - 43228 => true, - 43229 => true, - 43230 => true, - 43231 => true, - 43348 => true, - 43349 => true, - 43350 => true, - 43351 => true, - 43352 => true, - 43353 => true, - 43354 => true, - 43355 => true, - 43356 => true, - 43357 => true, - 43358 => true, - 43389 => true, - 43390 => true, - 43391 => true, - 43470 => true, - 43482 => true, - 43483 => true, - 43484 => true, - 43485 => true, - 43519 => true, - 43575 => true, - 43576 => true, - 43577 => true, - 43578 => true, - 43579 => true, - 43580 => true, - 43581 => true, - 43582 => true, - 43583 => true, - 43598 => true, - 43599 => true, - 43610 => true, - 43611 => true, - 43715 => true, - 43716 => true, - 43717 => true, - 43718 => true, - 43719 => true, - 43720 => true, - 43721 => true, - 43722 => true, - 43723 => true, - 43724 => true, - 43725 => true, - 43726 => true, - 43727 => true, - 43728 => true, - 43729 => true, - 43730 => true, - 43731 => true, - 43732 => true, - 43733 => true, - 43734 => true, - 43735 => true, - 43736 => true, - 43737 => true, - 43738 => true, - 43767 => true, - 43768 => true, - 43769 => true, - 43770 => true, - 43771 => true, - 43772 => true, - 43773 => true, - 43774 => true, - 43775 => true, - 43776 => true, - 43783 => true, - 43784 => true, - 43791 => true, - 43792 => true, - 43799 => true, - 43800 => true, - 43801 => true, - 43802 => true, - 43803 => true, - 43804 => true, - 43805 => true, - 43806 => true, - 43807 => true, - 43815 => true, - 43823 => true, - 43884 => true, - 43885 => true, - 43886 => true, - 43887 => true, - 44014 => true, - 44015 => true, - 44026 => true, - 44027 => true, - 44028 => true, - 44029 => true, - 44030 => true, - 44031 => true, - 55204 => true, - 55205 => true, - 55206 => true, - 55207 => true, - 55208 => true, - 55209 => true, - 55210 => true, - 55211 => true, - 55212 => true, - 55213 => true, - 55214 => true, - 55215 => true, - 55239 => true, - 55240 => true, - 55241 => true, - 55242 => true, - 55292 => true, - 55293 => true, - 55294 => true, - 55295 => true, - 64110 => true, - 64111 => true, - 64263 => true, - 64264 => true, - 64265 => true, - 64266 => true, - 64267 => true, - 64268 => true, - 64269 => true, - 64270 => true, - 64271 => true, - 64272 => true, - 64273 => true, - 64274 => true, - 64280 => true, - 64281 => true, - 64282 => true, - 64283 => true, - 64284 => true, - 64311 => true, - 64317 => true, - 64319 => true, - 64322 => true, - 64325 => true, - 64450 => true, - 64451 => true, - 64452 => true, - 64453 => true, - 64454 => true, - 64455 => true, - 64456 => true, - 64457 => true, - 64458 => true, - 64459 => true, - 64460 => true, - 64461 => true, - 64462 => true, - 64463 => true, - 64464 => true, - 64465 => true, - 64466 => true, - 64832 => true, - 64833 => true, - 64834 => true, - 64835 => true, - 64836 => true, - 64837 => true, - 64838 => true, - 64839 => true, - 64840 => true, - 64841 => true, - 64842 => true, - 64843 => true, - 64844 => true, - 64845 => true, - 64846 => true, - 64847 => true, - 64912 => true, - 64913 => true, - 64968 => true, - 64969 => true, - 64970 => true, - 64971 => true, - 64972 => true, - 64973 => true, - 64974 => true, - 64975 => true, - 65022 => true, - 65023 => true, - 65042 => true, - 65049 => true, - 65050 => true, - 65051 => true, - 65052 => true, - 65053 => true, - 65054 => true, - 65055 => true, - 65072 => true, - 65106 => true, - 65107 => true, - 65127 => true, - 65132 => true, - 65133 => true, - 65134 => true, - 65135 => true, - 65141 => true, - 65277 => true, - 65278 => true, - 65280 => true, - 65440 => true, - 65471 => true, - 65472 => true, - 65473 => true, - 65480 => true, - 65481 => true, - 65488 => true, - 65489 => true, - 65496 => true, - 65497 => true, - 65501 => true, - 65502 => true, - 65503 => true, - 65511 => true, - 65519 => true, - 65520 => true, - 65521 => true, - 65522 => true, - 65523 => true, - 65524 => true, - 65525 => true, - 65526 => true, - 65527 => true, - 65528 => true, - 65529 => true, - 65530 => true, - 65531 => true, - 65532 => true, - 65533 => true, - 65534 => true, - 65535 => true, - 65548 => true, - 65575 => true, - 65595 => true, - 65598 => true, - 65614 => true, - 65615 => true, - 65787 => true, - 65788 => true, - 65789 => true, - 65790 => true, - 65791 => true, - 65795 => true, - 65796 => true, - 65797 => true, - 65798 => true, - 65844 => true, - 65845 => true, - 65846 => true, - 65935 => true, - 65949 => true, - 65950 => true, - 65951 => true, - 66205 => true, - 66206 => true, - 66207 => true, - 66257 => true, - 66258 => true, - 66259 => true, - 66260 => true, - 66261 => true, - 66262 => true, - 66263 => true, - 66264 => true, - 66265 => true, - 66266 => true, - 66267 => true, - 66268 => true, - 66269 => true, - 66270 => true, - 66271 => true, - 66300 => true, - 66301 => true, - 66302 => true, - 66303 => true, - 66340 => true, - 66341 => true, - 66342 => true, - 66343 => true, - 66344 => true, - 66345 => true, - 66346 => true, - 66347 => true, - 66348 => true, - 66379 => true, - 66380 => true, - 66381 => true, - 66382 => true, - 66383 => true, - 66427 => true, - 66428 => true, - 66429 => true, - 66430 => true, - 66431 => true, - 66462 => true, - 66500 => true, - 66501 => true, - 66502 => true, - 66503 => true, - 66718 => true, - 66719 => true, - 66730 => true, - 66731 => true, - 66732 => true, - 66733 => true, - 66734 => true, - 66735 => true, - 66772 => true, - 66773 => true, - 66774 => true, - 66775 => true, - 66812 => true, - 66813 => true, - 66814 => true, - 66815 => true, - 66856 => true, - 66857 => true, - 66858 => true, - 66859 => true, - 66860 => true, - 66861 => true, - 66862 => true, - 66863 => true, - 66916 => true, - 66917 => true, - 66918 => true, - 66919 => true, - 66920 => true, - 66921 => true, - 66922 => true, - 66923 => true, - 66924 => true, - 66925 => true, - 66926 => true, - 67383 => true, - 67384 => true, - 67385 => true, - 67386 => true, - 67387 => true, - 67388 => true, - 67389 => true, - 67390 => true, - 67391 => true, - 67414 => true, - 67415 => true, - 67416 => true, - 67417 => true, - 67418 => true, - 67419 => true, - 67420 => true, - 67421 => true, - 67422 => true, - 67423 => true, - 67590 => true, - 67591 => true, - 67593 => true, - 67638 => true, - 67641 => true, - 67642 => true, - 67643 => true, - 67645 => true, - 67646 => true, - 67670 => true, - 67743 => true, - 67744 => true, - 67745 => true, - 67746 => true, - 67747 => true, - 67748 => true, - 67749 => true, - 67750 => true, - 67827 => true, - 67830 => true, - 67831 => true, - 67832 => true, - 67833 => true, - 67834 => true, - 67868 => true, - 67869 => true, - 67870 => true, - 67898 => true, - 67899 => true, - 67900 => true, - 67901 => true, - 67902 => true, - 68024 => true, - 68025 => true, - 68026 => true, - 68027 => true, - 68048 => true, - 68049 => true, - 68100 => true, - 68103 => true, - 68104 => true, - 68105 => true, - 68106 => true, - 68107 => true, - 68116 => true, - 68120 => true, - 68150 => true, - 68151 => true, - 68155 => true, - 68156 => true, - 68157 => true, - 68158 => true, - 68169 => true, - 68170 => true, - 68171 => true, - 68172 => true, - 68173 => true, - 68174 => true, - 68175 => true, - 68185 => true, - 68186 => true, - 68187 => true, - 68188 => true, - 68189 => true, - 68190 => true, - 68191 => true, - 68327 => true, - 68328 => true, - 68329 => true, - 68330 => true, - 68343 => true, - 68344 => true, - 68345 => true, - 68346 => true, - 68347 => true, - 68348 => true, - 68349 => true, - 68350 => true, - 68351 => true, - 68406 => true, - 68407 => true, - 68408 => true, - 68438 => true, - 68439 => true, - 68467 => true, - 68468 => true, - 68469 => true, - 68470 => true, - 68471 => true, - 68498 => true, - 68499 => true, - 68500 => true, - 68501 => true, - 68502 => true, - 68503 => true, - 68504 => true, - 68509 => true, - 68510 => true, - 68511 => true, - 68512 => true, - 68513 => true, - 68514 => true, - 68515 => true, - 68516 => true, - 68517 => true, - 68518 => true, - 68519 => true, - 68520 => true, - 68787 => true, - 68788 => true, - 68789 => true, - 68790 => true, - 68791 => true, - 68792 => true, - 68793 => true, - 68794 => true, - 68795 => true, - 68796 => true, - 68797 => true, - 68798 => true, - 68799 => true, - 68851 => true, - 68852 => true, - 68853 => true, - 68854 => true, - 68855 => true, - 68856 => true, - 68857 => true, - 68904 => true, - 68905 => true, - 68906 => true, - 68907 => true, - 68908 => true, - 68909 => true, - 68910 => true, - 68911 => true, - 69247 => true, - 69290 => true, - 69294 => true, - 69295 => true, - 69416 => true, - 69417 => true, - 69418 => true, - 69419 => true, - 69420 => true, - 69421 => true, - 69422 => true, - 69423 => true, - 69580 => true, - 69581 => true, - 69582 => true, - 69583 => true, - 69584 => true, - 69585 => true, - 69586 => true, - 69587 => true, - 69588 => true, - 69589 => true, - 69590 => true, - 69591 => true, - 69592 => true, - 69593 => true, - 69594 => true, - 69595 => true, - 69596 => true, - 69597 => true, - 69598 => true, - 69599 => true, - 69623 => true, - 69624 => true, - 69625 => true, - 69626 => true, - 69627 => true, - 69628 => true, - 69629 => true, - 69630 => true, - 69631 => true, - 69710 => true, - 69711 => true, - 69712 => true, - 69713 => true, - 69744 => true, - 69745 => true, - 69746 => true, - 69747 => true, - 69748 => true, - 69749 => true, - 69750 => true, - 69751 => true, - 69752 => true, - 69753 => true, - 69754 => true, - 69755 => true, - 69756 => true, - 69757 => true, - 69758 => true, - 69821 => true, - 69826 => true, - 69827 => true, - 69828 => true, - 69829 => true, - 69830 => true, - 69831 => true, - 69832 => true, - 69833 => true, - 69834 => true, - 69835 => true, - 69836 => true, - 69837 => true, - 69838 => true, - 69839 => true, - 69865 => true, - 69866 => true, - 69867 => true, - 69868 => true, - 69869 => true, - 69870 => true, - 69871 => true, - 69882 => true, - 69883 => true, - 69884 => true, - 69885 => true, - 69886 => true, - 69887 => true, - 69941 => true, - 69960 => true, - 69961 => true, - 69962 => true, - 69963 => true, - 69964 => true, - 69965 => true, - 69966 => true, - 69967 => true, - 70007 => true, - 70008 => true, - 70009 => true, - 70010 => true, - 70011 => true, - 70012 => true, - 70013 => true, - 70014 => true, - 70015 => true, - 70112 => true, - 70133 => true, - 70134 => true, - 70135 => true, - 70136 => true, - 70137 => true, - 70138 => true, - 70139 => true, - 70140 => true, - 70141 => true, - 70142 => true, - 70143 => true, - 70162 => true, - 70279 => true, - 70281 => true, - 70286 => true, - 70302 => true, - 70314 => true, - 70315 => true, - 70316 => true, - 70317 => true, - 70318 => true, - 70319 => true, - 70379 => true, - 70380 => true, - 70381 => true, - 70382 => true, - 70383 => true, - 70394 => true, - 70395 => true, - 70396 => true, - 70397 => true, - 70398 => true, - 70399 => true, - 70404 => true, - 70413 => true, - 70414 => true, - 70417 => true, - 70418 => true, - 70441 => true, - 70449 => true, - 70452 => true, - 70458 => true, - 70469 => true, - 70470 => true, - 70473 => true, - 70474 => true, - 70478 => true, - 70479 => true, - 70481 => true, - 70482 => true, - 70483 => true, - 70484 => true, - 70485 => true, - 70486 => true, - 70488 => true, - 70489 => true, - 70490 => true, - 70491 => true, - 70492 => true, - 70500 => true, - 70501 => true, - 70509 => true, - 70510 => true, - 70511 => true, - 70748 => true, - 70754 => true, - 70755 => true, - 70756 => true, - 70757 => true, - 70758 => true, - 70759 => true, - 70760 => true, - 70761 => true, - 70762 => true, - 70763 => true, - 70764 => true, - 70765 => true, - 70766 => true, - 70767 => true, - 70768 => true, - 70769 => true, - 70770 => true, - 70771 => true, - 70772 => true, - 70773 => true, - 70774 => true, - 70775 => true, - 70776 => true, - 70777 => true, - 70778 => true, - 70779 => true, - 70780 => true, - 70781 => true, - 70782 => true, - 70783 => true, - 70856 => true, - 70857 => true, - 70858 => true, - 70859 => true, - 70860 => true, - 70861 => true, - 70862 => true, - 70863 => true, - 71094 => true, - 71095 => true, - 71237 => true, - 71238 => true, - 71239 => true, - 71240 => true, - 71241 => true, - 71242 => true, - 71243 => true, - 71244 => true, - 71245 => true, - 71246 => true, - 71247 => true, - 71258 => true, - 71259 => true, - 71260 => true, - 71261 => true, - 71262 => true, - 71263 => true, - 71277 => true, - 71278 => true, - 71279 => true, - 71280 => true, - 71281 => true, - 71282 => true, - 71283 => true, - 71284 => true, - 71285 => true, - 71286 => true, - 71287 => true, - 71288 => true, - 71289 => true, - 71290 => true, - 71291 => true, - 71292 => true, - 71293 => true, - 71294 => true, - 71295 => true, - 71353 => true, - 71354 => true, - 71355 => true, - 71356 => true, - 71357 => true, - 71358 => true, - 71359 => true, - 71451 => true, - 71452 => true, - 71468 => true, - 71469 => true, - 71470 => true, - 71471 => true, - 71923 => true, - 71924 => true, - 71925 => true, - 71926 => true, - 71927 => true, - 71928 => true, - 71929 => true, - 71930 => true, - 71931 => true, - 71932 => true, - 71933 => true, - 71934 => true, - 71943 => true, - 71944 => true, - 71946 => true, - 71947 => true, - 71956 => true, - 71959 => true, - 71990 => true, - 71993 => true, - 71994 => true, - 72007 => true, - 72008 => true, - 72009 => true, - 72010 => true, - 72011 => true, - 72012 => true, - 72013 => true, - 72014 => true, - 72015 => true, - 72104 => true, - 72105 => true, - 72152 => true, - 72153 => true, - 72165 => true, - 72166 => true, - 72167 => true, - 72168 => true, - 72169 => true, - 72170 => true, - 72171 => true, - 72172 => true, - 72173 => true, - 72174 => true, - 72175 => true, - 72176 => true, - 72177 => true, - 72178 => true, - 72179 => true, - 72180 => true, - 72181 => true, - 72182 => true, - 72183 => true, - 72184 => true, - 72185 => true, - 72186 => true, - 72187 => true, - 72188 => true, - 72189 => true, - 72190 => true, - 72191 => true, - 72264 => true, - 72265 => true, - 72266 => true, - 72267 => true, - 72268 => true, - 72269 => true, - 72270 => true, - 72271 => true, - 72355 => true, - 72356 => true, - 72357 => true, - 72358 => true, - 72359 => true, - 72360 => true, - 72361 => true, - 72362 => true, - 72363 => true, - 72364 => true, - 72365 => true, - 72366 => true, - 72367 => true, - 72368 => true, - 72369 => true, - 72370 => true, - 72371 => true, - 72372 => true, - 72373 => true, - 72374 => true, - 72375 => true, - 72376 => true, - 72377 => true, - 72378 => true, - 72379 => true, - 72380 => true, - 72381 => true, - 72382 => true, - 72383 => true, - 72713 => true, - 72759 => true, - 72774 => true, - 72775 => true, - 72776 => true, - 72777 => true, - 72778 => true, - 72779 => true, - 72780 => true, - 72781 => true, - 72782 => true, - 72783 => true, - 72813 => true, - 72814 => true, - 72815 => true, - 72848 => true, - 72849 => true, - 72872 => true, - 72967 => true, - 72970 => true, - 73015 => true, - 73016 => true, - 73017 => true, - 73019 => true, - 73022 => true, - 73032 => true, - 73033 => true, - 73034 => true, - 73035 => true, - 73036 => true, - 73037 => true, - 73038 => true, - 73039 => true, - 73050 => true, - 73051 => true, - 73052 => true, - 73053 => true, - 73054 => true, - 73055 => true, - 73062 => true, - 73065 => true, - 73103 => true, - 73106 => true, - 73113 => true, - 73114 => true, - 73115 => true, - 73116 => true, - 73117 => true, - 73118 => true, - 73119 => true, - 73649 => true, - 73650 => true, - 73651 => true, - 73652 => true, - 73653 => true, - 73654 => true, - 73655 => true, - 73656 => true, - 73657 => true, - 73658 => true, - 73659 => true, - 73660 => true, - 73661 => true, - 73662 => true, - 73663 => true, - 73714 => true, - 73715 => true, - 73716 => true, - 73717 => true, - 73718 => true, - 73719 => true, - 73720 => true, - 73721 => true, - 73722 => true, - 73723 => true, - 73724 => true, - 73725 => true, - 73726 => true, - 74863 => true, - 74869 => true, - 74870 => true, - 74871 => true, - 74872 => true, - 74873 => true, - 74874 => true, - 74875 => true, - 74876 => true, - 74877 => true, - 74878 => true, - 74879 => true, - 78895 => true, - 78896 => true, - 78897 => true, - 78898 => true, - 78899 => true, - 78900 => true, - 78901 => true, - 78902 => true, - 78903 => true, - 78904 => true, - 92729 => true, - 92730 => true, - 92731 => true, - 92732 => true, - 92733 => true, - 92734 => true, - 92735 => true, - 92767 => true, - 92778 => true, - 92779 => true, - 92780 => true, - 92781 => true, - 92910 => true, - 92911 => true, - 92918 => true, - 92919 => true, - 92920 => true, - 92921 => true, - 92922 => true, - 92923 => true, - 92924 => true, - 92925 => true, - 92926 => true, - 92927 => true, - 92998 => true, - 92999 => true, - 93000 => true, - 93001 => true, - 93002 => true, - 93003 => true, - 93004 => true, - 93005 => true, - 93006 => true, - 93007 => true, - 93018 => true, - 93026 => true, - 93048 => true, - 93049 => true, - 93050 => true, - 93051 => true, - 93052 => true, - 94027 => true, - 94028 => true, - 94029 => true, - 94030 => true, - 94088 => true, - 94089 => true, - 94090 => true, - 94091 => true, - 94092 => true, - 94093 => true, - 94094 => true, - 94181 => true, - 94182 => true, - 94183 => true, - 94184 => true, - 94185 => true, - 94186 => true, - 94187 => true, - 94188 => true, - 94189 => true, - 94190 => true, - 94191 => true, - 94194 => true, - 94195 => true, - 94196 => true, - 94197 => true, - 94198 => true, - 94199 => true, - 94200 => true, - 94201 => true, - 94202 => true, - 94203 => true, - 94204 => true, - 94205 => true, - 94206 => true, - 94207 => true, - 100344 => true, - 100345 => true, - 100346 => true, - 100347 => true, - 100348 => true, - 100349 => true, - 100350 => true, - 100351 => true, - 110931 => true, - 110932 => true, - 110933 => true, - 110934 => true, - 110935 => true, - 110936 => true, - 110937 => true, - 110938 => true, - 110939 => true, - 110940 => true, - 110941 => true, - 110942 => true, - 110943 => true, - 110944 => true, - 110945 => true, - 110946 => true, - 110947 => true, - 110952 => true, - 110953 => true, - 110954 => true, - 110955 => true, - 110956 => true, - 110957 => true, - 110958 => true, - 110959 => true, - 113771 => true, - 113772 => true, - 113773 => true, - 113774 => true, - 113775 => true, - 113789 => true, - 113790 => true, - 113791 => true, - 113801 => true, - 113802 => true, - 113803 => true, - 113804 => true, - 113805 => true, - 113806 => true, - 113807 => true, - 113818 => true, - 113819 => true, - 119030 => true, - 119031 => true, - 119032 => true, - 119033 => true, - 119034 => true, - 119035 => true, - 119036 => true, - 119037 => true, - 119038 => true, - 119039 => true, - 119079 => true, - 119080 => true, - 119155 => true, - 119156 => true, - 119157 => true, - 119158 => true, - 119159 => true, - 119160 => true, - 119161 => true, - 119162 => true, - 119273 => true, - 119274 => true, - 119275 => true, - 119276 => true, - 119277 => true, - 119278 => true, - 119279 => true, - 119280 => true, - 119281 => true, - 119282 => true, - 119283 => true, - 119284 => true, - 119285 => true, - 119286 => true, - 119287 => true, - 119288 => true, - 119289 => true, - 119290 => true, - 119291 => true, - 119292 => true, - 119293 => true, - 119294 => true, - 119295 => true, - 119540 => true, - 119541 => true, - 119542 => true, - 119543 => true, - 119544 => true, - 119545 => true, - 119546 => true, - 119547 => true, - 119548 => true, - 119549 => true, - 119550 => true, - 119551 => true, - 119639 => true, - 119640 => true, - 119641 => true, - 119642 => true, - 119643 => true, - 119644 => true, - 119645 => true, - 119646 => true, - 119647 => true, - 119893 => true, - 119965 => true, - 119968 => true, - 119969 => true, - 119971 => true, - 119972 => true, - 119975 => true, - 119976 => true, - 119981 => true, - 119994 => true, - 119996 => true, - 120004 => true, - 120070 => true, - 120075 => true, - 120076 => true, - 120085 => true, - 120093 => true, - 120122 => true, - 120127 => true, - 120133 => true, - 120135 => true, - 120136 => true, - 120137 => true, - 120145 => true, - 120486 => true, - 120487 => true, - 120780 => true, - 120781 => true, - 121484 => true, - 121485 => true, - 121486 => true, - 121487 => true, - 121488 => true, - 121489 => true, - 121490 => true, - 121491 => true, - 121492 => true, - 121493 => true, - 121494 => true, - 121495 => true, - 121496 => true, - 121497 => true, - 121498 => true, - 121504 => true, - 122887 => true, - 122905 => true, - 122906 => true, - 122914 => true, - 122917 => true, - 123181 => true, - 123182 => true, - 123183 => true, - 123198 => true, - 123199 => true, - 123210 => true, - 123211 => true, - 123212 => true, - 123213 => true, - 123642 => true, - 123643 => true, - 123644 => true, - 123645 => true, - 123646 => true, - 125125 => true, - 125126 => true, - 125260 => true, - 125261 => true, - 125262 => true, - 125263 => true, - 125274 => true, - 125275 => true, - 125276 => true, - 125277 => true, - 126468 => true, - 126496 => true, - 126499 => true, - 126501 => true, - 126502 => true, - 126504 => true, - 126515 => true, - 126520 => true, - 126522 => true, - 126524 => true, - 126525 => true, - 126526 => true, - 126527 => true, - 126528 => true, - 126529 => true, - 126531 => true, - 126532 => true, - 126533 => true, - 126534 => true, - 126536 => true, - 126538 => true, - 126540 => true, - 126544 => true, - 126547 => true, - 126549 => true, - 126550 => true, - 126552 => true, - 126554 => true, - 126556 => true, - 126558 => true, - 126560 => true, - 126563 => true, - 126565 => true, - 126566 => true, - 126571 => true, - 126579 => true, - 126584 => true, - 126589 => true, - 126591 => true, - 126602 => true, - 126620 => true, - 126621 => true, - 126622 => true, - 126623 => true, - 126624 => true, - 126628 => true, - 126634 => true, - 127020 => true, - 127021 => true, - 127022 => true, - 127023 => true, - 127124 => true, - 127125 => true, - 127126 => true, - 127127 => true, - 127128 => true, - 127129 => true, - 127130 => true, - 127131 => true, - 127132 => true, - 127133 => true, - 127134 => true, - 127135 => true, - 127151 => true, - 127152 => true, - 127168 => true, - 127184 => true, - 127222 => true, - 127223 => true, - 127224 => true, - 127225 => true, - 127226 => true, - 127227 => true, - 127228 => true, - 127229 => true, - 127230 => true, - 127231 => true, - 127232 => true, - 127491 => true, - 127492 => true, - 127493 => true, - 127494 => true, - 127495 => true, - 127496 => true, - 127497 => true, - 127498 => true, - 127499 => true, - 127500 => true, - 127501 => true, - 127502 => true, - 127503 => true, - 127548 => true, - 127549 => true, - 127550 => true, - 127551 => true, - 127561 => true, - 127562 => true, - 127563 => true, - 127564 => true, - 127565 => true, - 127566 => true, - 127567 => true, - 127570 => true, - 127571 => true, - 127572 => true, - 127573 => true, - 127574 => true, - 127575 => true, - 127576 => true, - 127577 => true, - 127578 => true, - 127579 => true, - 127580 => true, - 127581 => true, - 127582 => true, - 127583 => true, - 128728 => true, - 128729 => true, - 128730 => true, - 128731 => true, - 128732 => true, - 128733 => true, - 128734 => true, - 128735 => true, - 128749 => true, - 128750 => true, - 128751 => true, - 128765 => true, - 128766 => true, - 128767 => true, - 128884 => true, - 128885 => true, - 128886 => true, - 128887 => true, - 128888 => true, - 128889 => true, - 128890 => true, - 128891 => true, - 128892 => true, - 128893 => true, - 128894 => true, - 128895 => true, - 128985 => true, - 128986 => true, - 128987 => true, - 128988 => true, - 128989 => true, - 128990 => true, - 128991 => true, - 129004 => true, - 129005 => true, - 129006 => true, - 129007 => true, - 129008 => true, - 129009 => true, - 129010 => true, - 129011 => true, - 129012 => true, - 129013 => true, - 129014 => true, - 129015 => true, - 129016 => true, - 129017 => true, - 129018 => true, - 129019 => true, - 129020 => true, - 129021 => true, - 129022 => true, - 129023 => true, - 129036 => true, - 129037 => true, - 129038 => true, - 129039 => true, - 129096 => true, - 129097 => true, - 129098 => true, - 129099 => true, - 129100 => true, - 129101 => true, - 129102 => true, - 129103 => true, - 129114 => true, - 129115 => true, - 129116 => true, - 129117 => true, - 129118 => true, - 129119 => true, - 129160 => true, - 129161 => true, - 129162 => true, - 129163 => true, - 129164 => true, - 129165 => true, - 129166 => true, - 129167 => true, - 129198 => true, - 129199 => true, - 129401 => true, - 129484 => true, - 129620 => true, - 129621 => true, - 129622 => true, - 129623 => true, - 129624 => true, - 129625 => true, - 129626 => true, - 129627 => true, - 129628 => true, - 129629 => true, - 129630 => true, - 129631 => true, - 129646 => true, - 129647 => true, - 129653 => true, - 129654 => true, - 129655 => true, - 129659 => true, - 129660 => true, - 129661 => true, - 129662 => true, - 129663 => true, - 129671 => true, - 129672 => true, - 129673 => true, - 129674 => true, - 129675 => true, - 129676 => true, - 129677 => true, - 129678 => true, - 129679 => true, - 129705 => true, - 129706 => true, - 129707 => true, - 129708 => true, - 129709 => true, - 129710 => true, - 129711 => true, - 129719 => true, - 129720 => true, - 129721 => true, - 129722 => true, - 129723 => true, - 129724 => true, - 129725 => true, - 129726 => true, - 129727 => true, - 129731 => true, - 129732 => true, - 129733 => true, - 129734 => true, - 129735 => true, - 129736 => true, - 129737 => true, - 129738 => true, - 129739 => true, - 129740 => true, - 129741 => true, - 129742 => true, - 129743 => true, - 129939 => true, - 131070 => true, - 131071 => true, - 177973 => true, - 177974 => true, - 177975 => true, - 177976 => true, - 177977 => true, - 177978 => true, - 177979 => true, - 177980 => true, - 177981 => true, - 177982 => true, - 177983 => true, - 178206 => true, - 178207 => true, - 183970 => true, - 183971 => true, - 183972 => true, - 183973 => true, - 183974 => true, - 183975 => true, - 183976 => true, - 183977 => true, - 183978 => true, - 183979 => true, - 183980 => true, - 183981 => true, - 183982 => true, - 183983 => true, - 194664 => true, - 194676 => true, - 194847 => true, - 194911 => true, - 195007 => true, - 196606 => true, - 196607 => true, - 262142 => true, - 262143 => true, - 327678 => true, - 327679 => true, - 393214 => true, - 393215 => true, - 458750 => true, - 458751 => true, - 524286 => true, - 524287 => true, - 589822 => true, - 589823 => true, - 655358 => true, - 655359 => true, - 720894 => true, - 720895 => true, - 786430 => true, - 786431 => true, - 851966 => true, - 851967 => true, - 917502 => true, - 917503 => true, - 917504 => true, - 917505 => true, - 917506 => true, - 917507 => true, - 917508 => true, - 917509 => true, - 917510 => true, - 917511 => true, - 917512 => true, - 917513 => true, - 917514 => true, - 917515 => true, - 917516 => true, - 917517 => true, - 917518 => true, - 917519 => true, - 917520 => true, - 917521 => true, - 917522 => true, - 917523 => true, - 917524 => true, - 917525 => true, - 917526 => true, - 917527 => true, - 917528 => true, - 917529 => true, - 917530 => true, - 917531 => true, - 917532 => true, - 917533 => true, - 917534 => true, - 917535 => true, - 983038 => true, - 983039 => true, - 1048574 => true, - 1048575 => true, - 1114110 => true, - 1114111 => true, -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php deleted file mode 100644 index 54f21cc0..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php +++ /dev/null @@ -1,308 +0,0 @@ - ' ', - 168 => ' ̈', - 175 => ' ̄', - 180 => ' ́', - 184 => ' ̧', - 728 => ' ̆', - 729 => ' ̇', - 730 => ' ̊', - 731 => ' ̨', - 732 => ' ̃', - 733 => ' ̋', - 890 => ' ι', - 894 => ';', - 900 => ' ́', - 901 => ' ̈́', - 8125 => ' ̓', - 8127 => ' ̓', - 8128 => ' ͂', - 8129 => ' ̈͂', - 8141 => ' ̓̀', - 8142 => ' ̓́', - 8143 => ' ̓͂', - 8157 => ' ̔̀', - 8158 => ' ̔́', - 8159 => ' ̔͂', - 8173 => ' ̈̀', - 8174 => ' ̈́', - 8175 => '`', - 8189 => ' ́', - 8190 => ' ̔', - 8192 => ' ', - 8193 => ' ', - 8194 => ' ', - 8195 => ' ', - 8196 => ' ', - 8197 => ' ', - 8198 => ' ', - 8199 => ' ', - 8200 => ' ', - 8201 => ' ', - 8202 => ' ', - 8215 => ' ̳', - 8239 => ' ', - 8252 => '!!', - 8254 => ' ̅', - 8263 => '??', - 8264 => '?!', - 8265 => '!?', - 8287 => ' ', - 8314 => '+', - 8316 => '=', - 8317 => '(', - 8318 => ')', - 8330 => '+', - 8332 => '=', - 8333 => '(', - 8334 => ')', - 8448 => 'a/c', - 8449 => 'a/s', - 8453 => 'c/o', - 8454 => 'c/u', - 9332 => '(1)', - 9333 => '(2)', - 9334 => '(3)', - 9335 => '(4)', - 9336 => '(5)', - 9337 => '(6)', - 9338 => '(7)', - 9339 => '(8)', - 9340 => '(9)', - 9341 => '(10)', - 9342 => '(11)', - 9343 => '(12)', - 9344 => '(13)', - 9345 => '(14)', - 9346 => '(15)', - 9347 => '(16)', - 9348 => '(17)', - 9349 => '(18)', - 9350 => '(19)', - 9351 => '(20)', - 9372 => '(a)', - 9373 => '(b)', - 9374 => '(c)', - 9375 => '(d)', - 9376 => '(e)', - 9377 => '(f)', - 9378 => '(g)', - 9379 => '(h)', - 9380 => '(i)', - 9381 => '(j)', - 9382 => '(k)', - 9383 => '(l)', - 9384 => '(m)', - 9385 => '(n)', - 9386 => '(o)', - 9387 => '(p)', - 9388 => '(q)', - 9389 => '(r)', - 9390 => '(s)', - 9391 => '(t)', - 9392 => '(u)', - 9393 => '(v)', - 9394 => '(w)', - 9395 => '(x)', - 9396 => '(y)', - 9397 => '(z)', - 10868 => '::=', - 10869 => '==', - 10870 => '===', - 12288 => ' ', - 12443 => ' ゙', - 12444 => ' ゚', - 12800 => '(ᄀ)', - 12801 => '(ᄂ)', - 12802 => '(ᄃ)', - 12803 => '(ᄅ)', - 12804 => '(ᄆ)', - 12805 => '(ᄇ)', - 12806 => '(ᄉ)', - 12807 => '(ᄋ)', - 12808 => '(ᄌ)', - 12809 => '(ᄎ)', - 12810 => '(ᄏ)', - 12811 => '(ᄐ)', - 12812 => '(ᄑ)', - 12813 => '(ᄒ)', - 12814 => '(가)', - 12815 => '(나)', - 12816 => '(다)', - 12817 => '(라)', - 12818 => '(마)', - 12819 => '(바)', - 12820 => '(사)', - 12821 => '(아)', - 12822 => '(자)', - 12823 => '(차)', - 12824 => '(카)', - 12825 => '(타)', - 12826 => '(파)', - 12827 => '(하)', - 12828 => '(주)', - 12829 => '(오전)', - 12830 => '(오후)', - 12832 => '(一)', - 12833 => '(二)', - 12834 => '(三)', - 12835 => '(四)', - 12836 => '(五)', - 12837 => '(六)', - 12838 => '(七)', - 12839 => '(八)', - 12840 => '(九)', - 12841 => '(十)', - 12842 => '(月)', - 12843 => '(火)', - 12844 => '(水)', - 12845 => '(木)', - 12846 => '(金)', - 12847 => '(土)', - 12848 => '(日)', - 12849 => '(株)', - 12850 => '(有)', - 12851 => '(社)', - 12852 => '(名)', - 12853 => '(特)', - 12854 => '(財)', - 12855 => '(祝)', - 12856 => '(労)', - 12857 => '(代)', - 12858 => '(呼)', - 12859 => '(学)', - 12860 => '(監)', - 12861 => '(企)', - 12862 => '(資)', - 12863 => '(協)', - 12864 => '(祭)', - 12865 => '(休)', - 12866 => '(自)', - 12867 => '(至)', - 64297 => '+', - 64606 => ' ٌّ', - 64607 => ' ٍّ', - 64608 => ' َّ', - 64609 => ' ُّ', - 64610 => ' ِّ', - 64611 => ' ّٰ', - 65018 => 'صلى الله عليه وسلم', - 65019 => 'جل جلاله', - 65040 => ',', - 65043 => ':', - 65044 => ';', - 65045 => '!', - 65046 => '?', - 65075 => '_', - 65076 => '_', - 65077 => '(', - 65078 => ')', - 65079 => '{', - 65080 => '}', - 65095 => '[', - 65096 => ']', - 65097 => ' ̅', - 65098 => ' ̅', - 65099 => ' ̅', - 65100 => ' ̅', - 65101 => '_', - 65102 => '_', - 65103 => '_', - 65104 => ',', - 65108 => ';', - 65109 => ':', - 65110 => '?', - 65111 => '!', - 65113 => '(', - 65114 => ')', - 65115 => '{', - 65116 => '}', - 65119 => '#', - 65120 => '&', - 65121 => '*', - 65122 => '+', - 65124 => '<', - 65125 => '>', - 65126 => '=', - 65128 => '\\', - 65129 => '$', - 65130 => '%', - 65131 => '@', - 65136 => ' ً', - 65138 => ' ٌ', - 65140 => ' ٍ', - 65142 => ' َ', - 65144 => ' ُ', - 65146 => ' ِ', - 65148 => ' ّ', - 65150 => ' ْ', - 65281 => '!', - 65282 => '"', - 65283 => '#', - 65284 => '$', - 65285 => '%', - 65286 => '&', - 65287 => '\'', - 65288 => '(', - 65289 => ')', - 65290 => '*', - 65291 => '+', - 65292 => ',', - 65295 => '/', - 65306 => ':', - 65307 => ';', - 65308 => '<', - 65309 => '=', - 65310 => '>', - 65311 => '?', - 65312 => '@', - 65339 => '[', - 65340 => '\\', - 65341 => ']', - 65342 => '^', - 65343 => '_', - 65344 => '`', - 65371 => '{', - 65372 => '|', - 65373 => '}', - 65374 => '~', - 65507 => ' ̄', - 127233 => '0,', - 127234 => '1,', - 127235 => '2,', - 127236 => '3,', - 127237 => '4,', - 127238 => '5,', - 127239 => '6,', - 127240 => '7,', - 127241 => '8,', - 127242 => '9,', - 127248 => '(a)', - 127249 => '(b)', - 127250 => '(c)', - 127251 => '(d)', - 127252 => '(e)', - 127253 => '(f)', - 127254 => '(g)', - 127255 => '(h)', - 127256 => '(i)', - 127257 => '(j)', - 127258 => '(k)', - 127259 => '(l)', - 127260 => '(m)', - 127261 => '(n)', - 127262 => '(o)', - 127263 => '(p)', - 127264 => '(q)', - 127265 => '(r)', - 127266 => '(s)', - 127267 => '(t)', - 127268 => '(u)', - 127269 => '(v)', - 127270 => '(w)', - 127271 => '(x)', - 127272 => '(y)', - 127273 => '(z)', -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php deleted file mode 100644 index 223396ec..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php +++ /dev/null @@ -1,71 +0,0 @@ - true, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - 9 => true, - 10 => true, - 11 => true, - 12 => true, - 13 => true, - 14 => true, - 15 => true, - 16 => true, - 17 => true, - 18 => true, - 19 => true, - 20 => true, - 21 => true, - 22 => true, - 23 => true, - 24 => true, - 25 => true, - 26 => true, - 27 => true, - 28 => true, - 29 => true, - 30 => true, - 31 => true, - 32 => true, - 33 => true, - 34 => true, - 35 => true, - 36 => true, - 37 => true, - 38 => true, - 39 => true, - 40 => true, - 41 => true, - 42 => true, - 43 => true, - 44 => true, - 47 => true, - 58 => true, - 59 => true, - 60 => true, - 61 => true, - 62 => true, - 63 => true, - 64 => true, - 91 => true, - 92 => true, - 93 => true, - 94 => true, - 95 => true, - 96 => true, - 123 => true, - 124 => true, - 125 => true, - 126 => true, - 127 => true, - 8800 => true, - 8814 => true, - 8815 => true, -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php deleted file mode 100644 index b3778441..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php +++ /dev/null @@ -1,273 +0,0 @@ - true, - 847 => true, - 6155 => true, - 6156 => true, - 6157 => true, - 8203 => true, - 8288 => true, - 8292 => true, - 65024 => true, - 65025 => true, - 65026 => true, - 65027 => true, - 65028 => true, - 65029 => true, - 65030 => true, - 65031 => true, - 65032 => true, - 65033 => true, - 65034 => true, - 65035 => true, - 65036 => true, - 65037 => true, - 65038 => true, - 65039 => true, - 65279 => true, - 113824 => true, - 113825 => true, - 113826 => true, - 113827 => true, - 917760 => true, - 917761 => true, - 917762 => true, - 917763 => true, - 917764 => true, - 917765 => true, - 917766 => true, - 917767 => true, - 917768 => true, - 917769 => true, - 917770 => true, - 917771 => true, - 917772 => true, - 917773 => true, - 917774 => true, - 917775 => true, - 917776 => true, - 917777 => true, - 917778 => true, - 917779 => true, - 917780 => true, - 917781 => true, - 917782 => true, - 917783 => true, - 917784 => true, - 917785 => true, - 917786 => true, - 917787 => true, - 917788 => true, - 917789 => true, - 917790 => true, - 917791 => true, - 917792 => true, - 917793 => true, - 917794 => true, - 917795 => true, - 917796 => true, - 917797 => true, - 917798 => true, - 917799 => true, - 917800 => true, - 917801 => true, - 917802 => true, - 917803 => true, - 917804 => true, - 917805 => true, - 917806 => true, - 917807 => true, - 917808 => true, - 917809 => true, - 917810 => true, - 917811 => true, - 917812 => true, - 917813 => true, - 917814 => true, - 917815 => true, - 917816 => true, - 917817 => true, - 917818 => true, - 917819 => true, - 917820 => true, - 917821 => true, - 917822 => true, - 917823 => true, - 917824 => true, - 917825 => true, - 917826 => true, - 917827 => true, - 917828 => true, - 917829 => true, - 917830 => true, - 917831 => true, - 917832 => true, - 917833 => true, - 917834 => true, - 917835 => true, - 917836 => true, - 917837 => true, - 917838 => true, - 917839 => true, - 917840 => true, - 917841 => true, - 917842 => true, - 917843 => true, - 917844 => true, - 917845 => true, - 917846 => true, - 917847 => true, - 917848 => true, - 917849 => true, - 917850 => true, - 917851 => true, - 917852 => true, - 917853 => true, - 917854 => true, - 917855 => true, - 917856 => true, - 917857 => true, - 917858 => true, - 917859 => true, - 917860 => true, - 917861 => true, - 917862 => true, - 917863 => true, - 917864 => true, - 917865 => true, - 917866 => true, - 917867 => true, - 917868 => true, - 917869 => true, - 917870 => true, - 917871 => true, - 917872 => true, - 917873 => true, - 917874 => true, - 917875 => true, - 917876 => true, - 917877 => true, - 917878 => true, - 917879 => true, - 917880 => true, - 917881 => true, - 917882 => true, - 917883 => true, - 917884 => true, - 917885 => true, - 917886 => true, - 917887 => true, - 917888 => true, - 917889 => true, - 917890 => true, - 917891 => true, - 917892 => true, - 917893 => true, - 917894 => true, - 917895 => true, - 917896 => true, - 917897 => true, - 917898 => true, - 917899 => true, - 917900 => true, - 917901 => true, - 917902 => true, - 917903 => true, - 917904 => true, - 917905 => true, - 917906 => true, - 917907 => true, - 917908 => true, - 917909 => true, - 917910 => true, - 917911 => true, - 917912 => true, - 917913 => true, - 917914 => true, - 917915 => true, - 917916 => true, - 917917 => true, - 917918 => true, - 917919 => true, - 917920 => true, - 917921 => true, - 917922 => true, - 917923 => true, - 917924 => true, - 917925 => true, - 917926 => true, - 917927 => true, - 917928 => true, - 917929 => true, - 917930 => true, - 917931 => true, - 917932 => true, - 917933 => true, - 917934 => true, - 917935 => true, - 917936 => true, - 917937 => true, - 917938 => true, - 917939 => true, - 917940 => true, - 917941 => true, - 917942 => true, - 917943 => true, - 917944 => true, - 917945 => true, - 917946 => true, - 917947 => true, - 917948 => true, - 917949 => true, - 917950 => true, - 917951 => true, - 917952 => true, - 917953 => true, - 917954 => true, - 917955 => true, - 917956 => true, - 917957 => true, - 917958 => true, - 917959 => true, - 917960 => true, - 917961 => true, - 917962 => true, - 917963 => true, - 917964 => true, - 917965 => true, - 917966 => true, - 917967 => true, - 917968 => true, - 917969 => true, - 917970 => true, - 917971 => true, - 917972 => true, - 917973 => true, - 917974 => true, - 917975 => true, - 917976 => true, - 917977 => true, - 917978 => true, - 917979 => true, - 917980 => true, - 917981 => true, - 917982 => true, - 917983 => true, - 917984 => true, - 917985 => true, - 917986 => true, - 917987 => true, - 917988 => true, - 917989 => true, - 917990 => true, - 917991 => true, - 917992 => true, - 917993 => true, - 917994 => true, - 917995 => true, - 917996 => true, - 917997 => true, - 917998 => true, - 917999 => true, -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php deleted file mode 100644 index 9b85fe9d..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php +++ /dev/null @@ -1,5778 +0,0 @@ - 'a', - 66 => 'b', - 67 => 'c', - 68 => 'd', - 69 => 'e', - 70 => 'f', - 71 => 'g', - 72 => 'h', - 73 => 'i', - 74 => 'j', - 75 => 'k', - 76 => 'l', - 77 => 'm', - 78 => 'n', - 79 => 'o', - 80 => 'p', - 81 => 'q', - 82 => 'r', - 83 => 's', - 84 => 't', - 85 => 'u', - 86 => 'v', - 87 => 'w', - 88 => 'x', - 89 => 'y', - 90 => 'z', - 170 => 'a', - 178 => '2', - 179 => '3', - 181 => 'μ', - 185 => '1', - 186 => 'o', - 188 => '1⁄4', - 189 => '1⁄2', - 190 => '3⁄4', - 192 => 'à', - 193 => 'á', - 194 => 'â', - 195 => 'ã', - 196 => 'ä', - 197 => 'å', - 198 => 'æ', - 199 => 'ç', - 200 => 'è', - 201 => 'é', - 202 => 'ê', - 203 => 'ë', - 204 => 'ì', - 205 => 'í', - 206 => 'î', - 207 => 'ï', - 208 => 'ð', - 209 => 'ñ', - 210 => 'ò', - 211 => 'ó', - 212 => 'ô', - 213 => 'õ', - 214 => 'ö', - 216 => 'ø', - 217 => 'ù', - 218 => 'ú', - 219 => 'û', - 220 => 'ü', - 221 => 'ý', - 222 => 'þ', - 256 => 'ā', - 258 => 'ă', - 260 => 'ą', - 262 => 'ć', - 264 => 'ĉ', - 266 => 'ċ', - 268 => 'č', - 270 => 'ď', - 272 => 'đ', - 274 => 'ē', - 276 => 'ĕ', - 278 => 'ė', - 280 => 'ę', - 282 => 'ě', - 284 => 'ĝ', - 286 => 'ğ', - 288 => 'ġ', - 290 => 'ģ', - 292 => 'ĥ', - 294 => 'ħ', - 296 => 'ĩ', - 298 => 'ī', - 300 => 'ĭ', - 302 => 'į', - 304 => 'i̇', - 306 => 'ij', - 307 => 'ij', - 308 => 'ĵ', - 310 => 'ķ', - 313 => 'ĺ', - 315 => 'ļ', - 317 => 'ľ', - 319 => 'l·', - 320 => 'l·', - 321 => 'ł', - 323 => 'ń', - 325 => 'ņ', - 327 => 'ň', - 329 => 'ʼn', - 330 => 'ŋ', - 332 => 'ō', - 334 => 'ŏ', - 336 => 'ő', - 338 => 'œ', - 340 => 'ŕ', - 342 => 'ŗ', - 344 => 'ř', - 346 => 'ś', - 348 => 'ŝ', - 350 => 'ş', - 352 => 'š', - 354 => 'ţ', - 356 => 'ť', - 358 => 'ŧ', - 360 => 'ũ', - 362 => 'ū', - 364 => 'ŭ', - 366 => 'ů', - 368 => 'ű', - 370 => 'ų', - 372 => 'ŵ', - 374 => 'ŷ', - 376 => 'ÿ', - 377 => 'ź', - 379 => 'ż', - 381 => 'ž', - 383 => 's', - 385 => 'ɓ', - 386 => 'ƃ', - 388 => 'ƅ', - 390 => 'ɔ', - 391 => 'ƈ', - 393 => 'ɖ', - 394 => 'ɗ', - 395 => 'ƌ', - 398 => 'ǝ', - 399 => 'ə', - 400 => 'ɛ', - 401 => 'ƒ', - 403 => 'ɠ', - 404 => 'ɣ', - 406 => 'ɩ', - 407 => 'ɨ', - 408 => 'ƙ', - 412 => 'ɯ', - 413 => 'ɲ', - 415 => 'ɵ', - 416 => 'ơ', - 418 => 'ƣ', - 420 => 'ƥ', - 422 => 'ʀ', - 423 => 'ƨ', - 425 => 'ʃ', - 428 => 'ƭ', - 430 => 'ʈ', - 431 => 'ư', - 433 => 'ʊ', - 434 => 'ʋ', - 435 => 'ƴ', - 437 => 'ƶ', - 439 => 'ʒ', - 440 => 'ƹ', - 444 => 'ƽ', - 452 => 'dž', - 453 => 'dž', - 454 => 'dž', - 455 => 'lj', - 456 => 'lj', - 457 => 'lj', - 458 => 'nj', - 459 => 'nj', - 460 => 'nj', - 461 => 'ǎ', - 463 => 'ǐ', - 465 => 'ǒ', - 467 => 'ǔ', - 469 => 'ǖ', - 471 => 'ǘ', - 473 => 'ǚ', - 475 => 'ǜ', - 478 => 'ǟ', - 480 => 'ǡ', - 482 => 'ǣ', - 484 => 'ǥ', - 486 => 'ǧ', - 488 => 'ǩ', - 490 => 'ǫ', - 492 => 'ǭ', - 494 => 'ǯ', - 497 => 'dz', - 498 => 'dz', - 499 => 'dz', - 500 => 'ǵ', - 502 => 'ƕ', - 503 => 'ƿ', - 504 => 'ǹ', - 506 => 'ǻ', - 508 => 'ǽ', - 510 => 'ǿ', - 512 => 'ȁ', - 514 => 'ȃ', - 516 => 'ȅ', - 518 => 'ȇ', - 520 => 'ȉ', - 522 => 'ȋ', - 524 => 'ȍ', - 526 => 'ȏ', - 528 => 'ȑ', - 530 => 'ȓ', - 532 => 'ȕ', - 534 => 'ȗ', - 536 => 'ș', - 538 => 'ț', - 540 => 'ȝ', - 542 => 'ȟ', - 544 => 'ƞ', - 546 => 'ȣ', - 548 => 'ȥ', - 550 => 'ȧ', - 552 => 'ȩ', - 554 => 'ȫ', - 556 => 'ȭ', - 558 => 'ȯ', - 560 => 'ȱ', - 562 => 'ȳ', - 570 => 'ⱥ', - 571 => 'ȼ', - 573 => 'ƚ', - 574 => 'ⱦ', - 577 => 'ɂ', - 579 => 'ƀ', - 580 => 'ʉ', - 581 => 'ʌ', - 582 => 'ɇ', - 584 => 'ɉ', - 586 => 'ɋ', - 588 => 'ɍ', - 590 => 'ɏ', - 688 => 'h', - 689 => 'ɦ', - 690 => 'j', - 691 => 'r', - 692 => 'ɹ', - 693 => 'ɻ', - 694 => 'ʁ', - 695 => 'w', - 696 => 'y', - 736 => 'ɣ', - 737 => 'l', - 738 => 's', - 739 => 'x', - 740 => 'ʕ', - 832 => '̀', - 833 => '́', - 835 => '̓', - 836 => '̈́', - 837 => 'ι', - 880 => 'ͱ', - 882 => 'ͳ', - 884 => 'ʹ', - 886 => 'ͷ', - 895 => 'ϳ', - 902 => 'ά', - 903 => '·', - 904 => 'έ', - 905 => 'ή', - 906 => 'ί', - 908 => 'ό', - 910 => 'ύ', - 911 => 'ώ', - 913 => 'α', - 914 => 'β', - 915 => 'γ', - 916 => 'δ', - 917 => 'ε', - 918 => 'ζ', - 919 => 'η', - 920 => 'θ', - 921 => 'ι', - 922 => 'κ', - 923 => 'λ', - 924 => 'μ', - 925 => 'ν', - 926 => 'ξ', - 927 => 'ο', - 928 => 'π', - 929 => 'ρ', - 931 => 'σ', - 932 => 'τ', - 933 => 'υ', - 934 => 'φ', - 935 => 'χ', - 936 => 'ψ', - 937 => 'ω', - 938 => 'ϊ', - 939 => 'ϋ', - 975 => 'ϗ', - 976 => 'β', - 977 => 'θ', - 978 => 'υ', - 979 => 'ύ', - 980 => 'ϋ', - 981 => 'φ', - 982 => 'π', - 984 => 'ϙ', - 986 => 'ϛ', - 988 => 'ϝ', - 990 => 'ϟ', - 992 => 'ϡ', - 994 => 'ϣ', - 996 => 'ϥ', - 998 => 'ϧ', - 1000 => 'ϩ', - 1002 => 'ϫ', - 1004 => 'ϭ', - 1006 => 'ϯ', - 1008 => 'κ', - 1009 => 'ρ', - 1010 => 'σ', - 1012 => 'θ', - 1013 => 'ε', - 1015 => 'ϸ', - 1017 => 'σ', - 1018 => 'ϻ', - 1021 => 'ͻ', - 1022 => 'ͼ', - 1023 => 'ͽ', - 1024 => 'ѐ', - 1025 => 'ё', - 1026 => 'ђ', - 1027 => 'ѓ', - 1028 => 'є', - 1029 => 'ѕ', - 1030 => 'і', - 1031 => 'ї', - 1032 => 'ј', - 1033 => 'љ', - 1034 => 'њ', - 1035 => 'ћ', - 1036 => 'ќ', - 1037 => 'ѝ', - 1038 => 'ў', - 1039 => 'џ', - 1040 => 'а', - 1041 => 'б', - 1042 => 'в', - 1043 => 'г', - 1044 => 'д', - 1045 => 'е', - 1046 => 'ж', - 1047 => 'з', - 1048 => 'и', - 1049 => 'й', - 1050 => 'к', - 1051 => 'л', - 1052 => 'м', - 1053 => 'н', - 1054 => 'о', - 1055 => 'п', - 1056 => 'р', - 1057 => 'с', - 1058 => 'т', - 1059 => 'у', - 1060 => 'ф', - 1061 => 'х', - 1062 => 'ц', - 1063 => 'ч', - 1064 => 'ш', - 1065 => 'щ', - 1066 => 'ъ', - 1067 => 'ы', - 1068 => 'ь', - 1069 => 'э', - 1070 => 'ю', - 1071 => 'я', - 1120 => 'ѡ', - 1122 => 'ѣ', - 1124 => 'ѥ', - 1126 => 'ѧ', - 1128 => 'ѩ', - 1130 => 'ѫ', - 1132 => 'ѭ', - 1134 => 'ѯ', - 1136 => 'ѱ', - 1138 => 'ѳ', - 1140 => 'ѵ', - 1142 => 'ѷ', - 1144 => 'ѹ', - 1146 => 'ѻ', - 1148 => 'ѽ', - 1150 => 'ѿ', - 1152 => 'ҁ', - 1162 => 'ҋ', - 1164 => 'ҍ', - 1166 => 'ҏ', - 1168 => 'ґ', - 1170 => 'ғ', - 1172 => 'ҕ', - 1174 => 'җ', - 1176 => 'ҙ', - 1178 => 'қ', - 1180 => 'ҝ', - 1182 => 'ҟ', - 1184 => 'ҡ', - 1186 => 'ң', - 1188 => 'ҥ', - 1190 => 'ҧ', - 1192 => 'ҩ', - 1194 => 'ҫ', - 1196 => 'ҭ', - 1198 => 'ү', - 1200 => 'ұ', - 1202 => 'ҳ', - 1204 => 'ҵ', - 1206 => 'ҷ', - 1208 => 'ҹ', - 1210 => 'һ', - 1212 => 'ҽ', - 1214 => 'ҿ', - 1217 => 'ӂ', - 1219 => 'ӄ', - 1221 => 'ӆ', - 1223 => 'ӈ', - 1225 => 'ӊ', - 1227 => 'ӌ', - 1229 => 'ӎ', - 1232 => 'ӑ', - 1234 => 'ӓ', - 1236 => 'ӕ', - 1238 => 'ӗ', - 1240 => 'ә', - 1242 => 'ӛ', - 1244 => 'ӝ', - 1246 => 'ӟ', - 1248 => 'ӡ', - 1250 => 'ӣ', - 1252 => 'ӥ', - 1254 => 'ӧ', - 1256 => 'ө', - 1258 => 'ӫ', - 1260 => 'ӭ', - 1262 => 'ӯ', - 1264 => 'ӱ', - 1266 => 'ӳ', - 1268 => 'ӵ', - 1270 => 'ӷ', - 1272 => 'ӹ', - 1274 => 'ӻ', - 1276 => 'ӽ', - 1278 => 'ӿ', - 1280 => 'ԁ', - 1282 => 'ԃ', - 1284 => 'ԅ', - 1286 => 'ԇ', - 1288 => 'ԉ', - 1290 => 'ԋ', - 1292 => 'ԍ', - 1294 => 'ԏ', - 1296 => 'ԑ', - 1298 => 'ԓ', - 1300 => 'ԕ', - 1302 => 'ԗ', - 1304 => 'ԙ', - 1306 => 'ԛ', - 1308 => 'ԝ', - 1310 => 'ԟ', - 1312 => 'ԡ', - 1314 => 'ԣ', - 1316 => 'ԥ', - 1318 => 'ԧ', - 1320 => 'ԩ', - 1322 => 'ԫ', - 1324 => 'ԭ', - 1326 => 'ԯ', - 1329 => 'ա', - 1330 => 'բ', - 1331 => 'գ', - 1332 => 'դ', - 1333 => 'ե', - 1334 => 'զ', - 1335 => 'է', - 1336 => 'ը', - 1337 => 'թ', - 1338 => 'ժ', - 1339 => 'ի', - 1340 => 'լ', - 1341 => 'խ', - 1342 => 'ծ', - 1343 => 'կ', - 1344 => 'հ', - 1345 => 'ձ', - 1346 => 'ղ', - 1347 => 'ճ', - 1348 => 'մ', - 1349 => 'յ', - 1350 => 'ն', - 1351 => 'շ', - 1352 => 'ո', - 1353 => 'չ', - 1354 => 'պ', - 1355 => 'ջ', - 1356 => 'ռ', - 1357 => 'ս', - 1358 => 'վ', - 1359 => 'տ', - 1360 => 'ր', - 1361 => 'ց', - 1362 => 'ւ', - 1363 => 'փ', - 1364 => 'ք', - 1365 => 'օ', - 1366 => 'ֆ', - 1415 => 'եւ', - 1653 => 'اٴ', - 1654 => 'وٴ', - 1655 => 'ۇٴ', - 1656 => 'يٴ', - 2392 => 'क़', - 2393 => 'ख़', - 2394 => 'ग़', - 2395 => 'ज़', - 2396 => 'ड़', - 2397 => 'ढ़', - 2398 => 'फ़', - 2399 => 'य़', - 2524 => 'ড়', - 2525 => 'ঢ়', - 2527 => 'য়', - 2611 => 'ਲ਼', - 2614 => 'ਸ਼', - 2649 => 'ਖ਼', - 2650 => 'ਗ਼', - 2651 => 'ਜ਼', - 2654 => 'ਫ਼', - 2908 => 'ଡ଼', - 2909 => 'ଢ଼', - 3635 => 'ํา', - 3763 => 'ໍາ', - 3804 => 'ຫນ', - 3805 => 'ຫມ', - 3852 => '་', - 3907 => 'གྷ', - 3917 => 'ཌྷ', - 3922 => 'དྷ', - 3927 => 'བྷ', - 3932 => 'ཛྷ', - 3945 => 'ཀྵ', - 3955 => 'ཱི', - 3957 => 'ཱུ', - 3958 => 'ྲྀ', - 3959 => 'ྲཱྀ', - 3960 => 'ླྀ', - 3961 => 'ླཱྀ', - 3969 => 'ཱྀ', - 3987 => 'ྒྷ', - 3997 => 'ྜྷ', - 4002 => 'ྡྷ', - 4007 => 'ྦྷ', - 4012 => 'ྫྷ', - 4025 => 'ྐྵ', - 4295 => 'ⴧ', - 4301 => 'ⴭ', - 4348 => 'ნ', - 5112 => 'Ᏸ', - 5113 => 'Ᏹ', - 5114 => 'Ᏺ', - 5115 => 'Ᏻ', - 5116 => 'Ᏼ', - 5117 => 'Ᏽ', - 7296 => 'в', - 7297 => 'д', - 7298 => 'о', - 7299 => 'с', - 7300 => 'т', - 7301 => 'т', - 7302 => 'ъ', - 7303 => 'ѣ', - 7304 => 'ꙋ', - 7312 => 'ა', - 7313 => 'ბ', - 7314 => 'გ', - 7315 => 'დ', - 7316 => 'ე', - 7317 => 'ვ', - 7318 => 'ზ', - 7319 => 'თ', - 7320 => 'ი', - 7321 => 'კ', - 7322 => 'ლ', - 7323 => 'მ', - 7324 => 'ნ', - 7325 => 'ო', - 7326 => 'პ', - 7327 => 'ჟ', - 7328 => 'რ', - 7329 => 'ს', - 7330 => 'ტ', - 7331 => 'უ', - 7332 => 'ფ', - 7333 => 'ქ', - 7334 => 'ღ', - 7335 => 'ყ', - 7336 => 'შ', - 7337 => 'ჩ', - 7338 => 'ც', - 7339 => 'ძ', - 7340 => 'წ', - 7341 => 'ჭ', - 7342 => 'ხ', - 7343 => 'ჯ', - 7344 => 'ჰ', - 7345 => 'ჱ', - 7346 => 'ჲ', - 7347 => 'ჳ', - 7348 => 'ჴ', - 7349 => 'ჵ', - 7350 => 'ჶ', - 7351 => 'ჷ', - 7352 => 'ჸ', - 7353 => 'ჹ', - 7354 => 'ჺ', - 7357 => 'ჽ', - 7358 => 'ჾ', - 7359 => 'ჿ', - 7468 => 'a', - 7469 => 'æ', - 7470 => 'b', - 7472 => 'd', - 7473 => 'e', - 7474 => 'ǝ', - 7475 => 'g', - 7476 => 'h', - 7477 => 'i', - 7478 => 'j', - 7479 => 'k', - 7480 => 'l', - 7481 => 'm', - 7482 => 'n', - 7484 => 'o', - 7485 => 'ȣ', - 7486 => 'p', - 7487 => 'r', - 7488 => 't', - 7489 => 'u', - 7490 => 'w', - 7491 => 'a', - 7492 => 'ɐ', - 7493 => 'ɑ', - 7494 => 'ᴂ', - 7495 => 'b', - 7496 => 'd', - 7497 => 'e', - 7498 => 'ə', - 7499 => 'ɛ', - 7500 => 'ɜ', - 7501 => 'g', - 7503 => 'k', - 7504 => 'm', - 7505 => 'ŋ', - 7506 => 'o', - 7507 => 'ɔ', - 7508 => 'ᴖ', - 7509 => 'ᴗ', - 7510 => 'p', - 7511 => 't', - 7512 => 'u', - 7513 => 'ᴝ', - 7514 => 'ɯ', - 7515 => 'v', - 7516 => 'ᴥ', - 7517 => 'β', - 7518 => 'γ', - 7519 => 'δ', - 7520 => 'φ', - 7521 => 'χ', - 7522 => 'i', - 7523 => 'r', - 7524 => 'u', - 7525 => 'v', - 7526 => 'β', - 7527 => 'γ', - 7528 => 'ρ', - 7529 => 'φ', - 7530 => 'χ', - 7544 => 'н', - 7579 => 'ɒ', - 7580 => 'c', - 7581 => 'ɕ', - 7582 => 'ð', - 7583 => 'ɜ', - 7584 => 'f', - 7585 => 'ɟ', - 7586 => 'ɡ', - 7587 => 'ɥ', - 7588 => 'ɨ', - 7589 => 'ɩ', - 7590 => 'ɪ', - 7591 => 'ᵻ', - 7592 => 'ʝ', - 7593 => 'ɭ', - 7594 => 'ᶅ', - 7595 => 'ʟ', - 7596 => 'ɱ', - 7597 => 'ɰ', - 7598 => 'ɲ', - 7599 => 'ɳ', - 7600 => 'ɴ', - 7601 => 'ɵ', - 7602 => 'ɸ', - 7603 => 'ʂ', - 7604 => 'ʃ', - 7605 => 'ƫ', - 7606 => 'ʉ', - 7607 => 'ʊ', - 7608 => 'ᴜ', - 7609 => 'ʋ', - 7610 => 'ʌ', - 7611 => 'z', - 7612 => 'ʐ', - 7613 => 'ʑ', - 7614 => 'ʒ', - 7615 => 'θ', - 7680 => 'ḁ', - 7682 => 'ḃ', - 7684 => 'ḅ', - 7686 => 'ḇ', - 7688 => 'ḉ', - 7690 => 'ḋ', - 7692 => 'ḍ', - 7694 => 'ḏ', - 7696 => 'ḑ', - 7698 => 'ḓ', - 7700 => 'ḕ', - 7702 => 'ḗ', - 7704 => 'ḙ', - 7706 => 'ḛ', - 7708 => 'ḝ', - 7710 => 'ḟ', - 7712 => 'ḡ', - 7714 => 'ḣ', - 7716 => 'ḥ', - 7718 => 'ḧ', - 7720 => 'ḩ', - 7722 => 'ḫ', - 7724 => 'ḭ', - 7726 => 'ḯ', - 7728 => 'ḱ', - 7730 => 'ḳ', - 7732 => 'ḵ', - 7734 => 'ḷ', - 7736 => 'ḹ', - 7738 => 'ḻ', - 7740 => 'ḽ', - 7742 => 'ḿ', - 7744 => 'ṁ', - 7746 => 'ṃ', - 7748 => 'ṅ', - 7750 => 'ṇ', - 7752 => 'ṉ', - 7754 => 'ṋ', - 7756 => 'ṍ', - 7758 => 'ṏ', - 7760 => 'ṑ', - 7762 => 'ṓ', - 7764 => 'ṕ', - 7766 => 'ṗ', - 7768 => 'ṙ', - 7770 => 'ṛ', - 7772 => 'ṝ', - 7774 => 'ṟ', - 7776 => 'ṡ', - 7778 => 'ṣ', - 7780 => 'ṥ', - 7782 => 'ṧ', - 7784 => 'ṩ', - 7786 => 'ṫ', - 7788 => 'ṭ', - 7790 => 'ṯ', - 7792 => 'ṱ', - 7794 => 'ṳ', - 7796 => 'ṵ', - 7798 => 'ṷ', - 7800 => 'ṹ', - 7802 => 'ṻ', - 7804 => 'ṽ', - 7806 => 'ṿ', - 7808 => 'ẁ', - 7810 => 'ẃ', - 7812 => 'ẅ', - 7814 => 'ẇ', - 7816 => 'ẉ', - 7818 => 'ẋ', - 7820 => 'ẍ', - 7822 => 'ẏ', - 7824 => 'ẑ', - 7826 => 'ẓ', - 7828 => 'ẕ', - 7834 => 'aʾ', - 7835 => 'ṡ', - 7838 => 'ss', - 7840 => 'ạ', - 7842 => 'ả', - 7844 => 'ấ', - 7846 => 'ầ', - 7848 => 'ẩ', - 7850 => 'ẫ', - 7852 => 'ậ', - 7854 => 'ắ', - 7856 => 'ằ', - 7858 => 'ẳ', - 7860 => 'ẵ', - 7862 => 'ặ', - 7864 => 'ẹ', - 7866 => 'ẻ', - 7868 => 'ẽ', - 7870 => 'ế', - 7872 => 'ề', - 7874 => 'ể', - 7876 => 'ễ', - 7878 => 'ệ', - 7880 => 'ỉ', - 7882 => 'ị', - 7884 => 'ọ', - 7886 => 'ỏ', - 7888 => 'ố', - 7890 => 'ồ', - 7892 => 'ổ', - 7894 => 'ỗ', - 7896 => 'ộ', - 7898 => 'ớ', - 7900 => 'ờ', - 7902 => 'ở', - 7904 => 'ỡ', - 7906 => 'ợ', - 7908 => 'ụ', - 7910 => 'ủ', - 7912 => 'ứ', - 7914 => 'ừ', - 7916 => 'ử', - 7918 => 'ữ', - 7920 => 'ự', - 7922 => 'ỳ', - 7924 => 'ỵ', - 7926 => 'ỷ', - 7928 => 'ỹ', - 7930 => 'ỻ', - 7932 => 'ỽ', - 7934 => 'ỿ', - 7944 => 'ἀ', - 7945 => 'ἁ', - 7946 => 'ἂ', - 7947 => 'ἃ', - 7948 => 'ἄ', - 7949 => 'ἅ', - 7950 => 'ἆ', - 7951 => 'ἇ', - 7960 => 'ἐ', - 7961 => 'ἑ', - 7962 => 'ἒ', - 7963 => 'ἓ', - 7964 => 'ἔ', - 7965 => 'ἕ', - 7976 => 'ἠ', - 7977 => 'ἡ', - 7978 => 'ἢ', - 7979 => 'ἣ', - 7980 => 'ἤ', - 7981 => 'ἥ', - 7982 => 'ἦ', - 7983 => 'ἧ', - 7992 => 'ἰ', - 7993 => 'ἱ', - 7994 => 'ἲ', - 7995 => 'ἳ', - 7996 => 'ἴ', - 7997 => 'ἵ', - 7998 => 'ἶ', - 7999 => 'ἷ', - 8008 => 'ὀ', - 8009 => 'ὁ', - 8010 => 'ὂ', - 8011 => 'ὃ', - 8012 => 'ὄ', - 8013 => 'ὅ', - 8025 => 'ὑ', - 8027 => 'ὓ', - 8029 => 'ὕ', - 8031 => 'ὗ', - 8040 => 'ὠ', - 8041 => 'ὡ', - 8042 => 'ὢ', - 8043 => 'ὣ', - 8044 => 'ὤ', - 8045 => 'ὥ', - 8046 => 'ὦ', - 8047 => 'ὧ', - 8049 => 'ά', - 8051 => 'έ', - 8053 => 'ή', - 8055 => 'ί', - 8057 => 'ό', - 8059 => 'ύ', - 8061 => 'ώ', - 8064 => 'ἀι', - 8065 => 'ἁι', - 8066 => 'ἂι', - 8067 => 'ἃι', - 8068 => 'ἄι', - 8069 => 'ἅι', - 8070 => 'ἆι', - 8071 => 'ἇι', - 8072 => 'ἀι', - 8073 => 'ἁι', - 8074 => 'ἂι', - 8075 => 'ἃι', - 8076 => 'ἄι', - 8077 => 'ἅι', - 8078 => 'ἆι', - 8079 => 'ἇι', - 8080 => 'ἠι', - 8081 => 'ἡι', - 8082 => 'ἢι', - 8083 => 'ἣι', - 8084 => 'ἤι', - 8085 => 'ἥι', - 8086 => 'ἦι', - 8087 => 'ἧι', - 8088 => 'ἠι', - 8089 => 'ἡι', - 8090 => 'ἢι', - 8091 => 'ἣι', - 8092 => 'ἤι', - 8093 => 'ἥι', - 8094 => 'ἦι', - 8095 => 'ἧι', - 8096 => 'ὠι', - 8097 => 'ὡι', - 8098 => 'ὢι', - 8099 => 'ὣι', - 8100 => 'ὤι', - 8101 => 'ὥι', - 8102 => 'ὦι', - 8103 => 'ὧι', - 8104 => 'ὠι', - 8105 => 'ὡι', - 8106 => 'ὢι', - 8107 => 'ὣι', - 8108 => 'ὤι', - 8109 => 'ὥι', - 8110 => 'ὦι', - 8111 => 'ὧι', - 8114 => 'ὰι', - 8115 => 'αι', - 8116 => 'άι', - 8119 => 'ᾶι', - 8120 => 'ᾰ', - 8121 => 'ᾱ', - 8122 => 'ὰ', - 8123 => 'ά', - 8124 => 'αι', - 8126 => 'ι', - 8130 => 'ὴι', - 8131 => 'ηι', - 8132 => 'ήι', - 8135 => 'ῆι', - 8136 => 'ὲ', - 8137 => 'έ', - 8138 => 'ὴ', - 8139 => 'ή', - 8140 => 'ηι', - 8147 => 'ΐ', - 8152 => 'ῐ', - 8153 => 'ῑ', - 8154 => 'ὶ', - 8155 => 'ί', - 8163 => 'ΰ', - 8168 => 'ῠ', - 8169 => 'ῡ', - 8170 => 'ὺ', - 8171 => 'ύ', - 8172 => 'ῥ', - 8178 => 'ὼι', - 8179 => 'ωι', - 8180 => 'ώι', - 8183 => 'ῶι', - 8184 => 'ὸ', - 8185 => 'ό', - 8186 => 'ὼ', - 8187 => 'ώ', - 8188 => 'ωι', - 8209 => '‐', - 8243 => '′′', - 8244 => '′′′', - 8246 => '‵‵', - 8247 => '‵‵‵', - 8279 => '′′′′', - 8304 => '0', - 8305 => 'i', - 8308 => '4', - 8309 => '5', - 8310 => '6', - 8311 => '7', - 8312 => '8', - 8313 => '9', - 8315 => '−', - 8319 => 'n', - 8320 => '0', - 8321 => '1', - 8322 => '2', - 8323 => '3', - 8324 => '4', - 8325 => '5', - 8326 => '6', - 8327 => '7', - 8328 => '8', - 8329 => '9', - 8331 => '−', - 8336 => 'a', - 8337 => 'e', - 8338 => 'o', - 8339 => 'x', - 8340 => 'ə', - 8341 => 'h', - 8342 => 'k', - 8343 => 'l', - 8344 => 'm', - 8345 => 'n', - 8346 => 'p', - 8347 => 's', - 8348 => 't', - 8360 => 'rs', - 8450 => 'c', - 8451 => '°c', - 8455 => 'ɛ', - 8457 => '°f', - 8458 => 'g', - 8459 => 'h', - 8460 => 'h', - 8461 => 'h', - 8462 => 'h', - 8463 => 'ħ', - 8464 => 'i', - 8465 => 'i', - 8466 => 'l', - 8467 => 'l', - 8469 => 'n', - 8470 => 'no', - 8473 => 'p', - 8474 => 'q', - 8475 => 'r', - 8476 => 'r', - 8477 => 'r', - 8480 => 'sm', - 8481 => 'tel', - 8482 => 'tm', - 8484 => 'z', - 8486 => 'ω', - 8488 => 'z', - 8490 => 'k', - 8491 => 'å', - 8492 => 'b', - 8493 => 'c', - 8495 => 'e', - 8496 => 'e', - 8497 => 'f', - 8499 => 'm', - 8500 => 'o', - 8501 => 'א', - 8502 => 'ב', - 8503 => 'ג', - 8504 => 'ד', - 8505 => 'i', - 8507 => 'fax', - 8508 => 'π', - 8509 => 'γ', - 8510 => 'γ', - 8511 => 'π', - 8512 => '∑', - 8517 => 'd', - 8518 => 'd', - 8519 => 'e', - 8520 => 'i', - 8521 => 'j', - 8528 => '1⁄7', - 8529 => '1⁄9', - 8530 => '1⁄10', - 8531 => '1⁄3', - 8532 => '2⁄3', - 8533 => '1⁄5', - 8534 => '2⁄5', - 8535 => '3⁄5', - 8536 => '4⁄5', - 8537 => '1⁄6', - 8538 => '5⁄6', - 8539 => '1⁄8', - 8540 => '3⁄8', - 8541 => '5⁄8', - 8542 => '7⁄8', - 8543 => '1⁄', - 8544 => 'i', - 8545 => 'ii', - 8546 => 'iii', - 8547 => 'iv', - 8548 => 'v', - 8549 => 'vi', - 8550 => 'vii', - 8551 => 'viii', - 8552 => 'ix', - 8553 => 'x', - 8554 => 'xi', - 8555 => 'xii', - 8556 => 'l', - 8557 => 'c', - 8558 => 'd', - 8559 => 'm', - 8560 => 'i', - 8561 => 'ii', - 8562 => 'iii', - 8563 => 'iv', - 8564 => 'v', - 8565 => 'vi', - 8566 => 'vii', - 8567 => 'viii', - 8568 => 'ix', - 8569 => 'x', - 8570 => 'xi', - 8571 => 'xii', - 8572 => 'l', - 8573 => 'c', - 8574 => 'd', - 8575 => 'm', - 8585 => '0⁄3', - 8748 => '∫∫', - 8749 => '∫∫∫', - 8751 => '∮∮', - 8752 => '∮∮∮', - 9001 => '〈', - 9002 => '〉', - 9312 => '1', - 9313 => '2', - 9314 => '3', - 9315 => '4', - 9316 => '5', - 9317 => '6', - 9318 => '7', - 9319 => '8', - 9320 => '9', - 9321 => '10', - 9322 => '11', - 9323 => '12', - 9324 => '13', - 9325 => '14', - 9326 => '15', - 9327 => '16', - 9328 => '17', - 9329 => '18', - 9330 => '19', - 9331 => '20', - 9398 => 'a', - 9399 => 'b', - 9400 => 'c', - 9401 => 'd', - 9402 => 'e', - 9403 => 'f', - 9404 => 'g', - 9405 => 'h', - 9406 => 'i', - 9407 => 'j', - 9408 => 'k', - 9409 => 'l', - 9410 => 'm', - 9411 => 'n', - 9412 => 'o', - 9413 => 'p', - 9414 => 'q', - 9415 => 'r', - 9416 => 's', - 9417 => 't', - 9418 => 'u', - 9419 => 'v', - 9420 => 'w', - 9421 => 'x', - 9422 => 'y', - 9423 => 'z', - 9424 => 'a', - 9425 => 'b', - 9426 => 'c', - 9427 => 'd', - 9428 => 'e', - 9429 => 'f', - 9430 => 'g', - 9431 => 'h', - 9432 => 'i', - 9433 => 'j', - 9434 => 'k', - 9435 => 'l', - 9436 => 'm', - 9437 => 'n', - 9438 => 'o', - 9439 => 'p', - 9440 => 'q', - 9441 => 'r', - 9442 => 's', - 9443 => 't', - 9444 => 'u', - 9445 => 'v', - 9446 => 'w', - 9447 => 'x', - 9448 => 'y', - 9449 => 'z', - 9450 => '0', - 10764 => '∫∫∫∫', - 10972 => '⫝̸', - 11264 => 'ⰰ', - 11265 => 'ⰱ', - 11266 => 'ⰲ', - 11267 => 'ⰳ', - 11268 => 'ⰴ', - 11269 => 'ⰵ', - 11270 => 'ⰶ', - 11271 => 'ⰷ', - 11272 => 'ⰸ', - 11273 => 'ⰹ', - 11274 => 'ⰺ', - 11275 => 'ⰻ', - 11276 => 'ⰼ', - 11277 => 'ⰽ', - 11278 => 'ⰾ', - 11279 => 'ⰿ', - 11280 => 'ⱀ', - 11281 => 'ⱁ', - 11282 => 'ⱂ', - 11283 => 'ⱃ', - 11284 => 'ⱄ', - 11285 => 'ⱅ', - 11286 => 'ⱆ', - 11287 => 'ⱇ', - 11288 => 'ⱈ', - 11289 => 'ⱉ', - 11290 => 'ⱊ', - 11291 => 'ⱋ', - 11292 => 'ⱌ', - 11293 => 'ⱍ', - 11294 => 'ⱎ', - 11295 => 'ⱏ', - 11296 => 'ⱐ', - 11297 => 'ⱑ', - 11298 => 'ⱒ', - 11299 => 'ⱓ', - 11300 => 'ⱔ', - 11301 => 'ⱕ', - 11302 => 'ⱖ', - 11303 => 'ⱗ', - 11304 => 'ⱘ', - 11305 => 'ⱙ', - 11306 => 'ⱚ', - 11307 => 'ⱛ', - 11308 => 'ⱜ', - 11309 => 'ⱝ', - 11310 => 'ⱞ', - 11360 => 'ⱡ', - 11362 => 'ɫ', - 11363 => 'ᵽ', - 11364 => 'ɽ', - 11367 => 'ⱨ', - 11369 => 'ⱪ', - 11371 => 'ⱬ', - 11373 => 'ɑ', - 11374 => 'ɱ', - 11375 => 'ɐ', - 11376 => 'ɒ', - 11378 => 'ⱳ', - 11381 => 'ⱶ', - 11388 => 'j', - 11389 => 'v', - 11390 => 'ȿ', - 11391 => 'ɀ', - 11392 => 'ⲁ', - 11394 => 'ⲃ', - 11396 => 'ⲅ', - 11398 => 'ⲇ', - 11400 => 'ⲉ', - 11402 => 'ⲋ', - 11404 => 'ⲍ', - 11406 => 'ⲏ', - 11408 => 'ⲑ', - 11410 => 'ⲓ', - 11412 => 'ⲕ', - 11414 => 'ⲗ', - 11416 => 'ⲙ', - 11418 => 'ⲛ', - 11420 => 'ⲝ', - 11422 => 'ⲟ', - 11424 => 'ⲡ', - 11426 => 'ⲣ', - 11428 => 'ⲥ', - 11430 => 'ⲧ', - 11432 => 'ⲩ', - 11434 => 'ⲫ', - 11436 => 'ⲭ', - 11438 => 'ⲯ', - 11440 => 'ⲱ', - 11442 => 'ⲳ', - 11444 => 'ⲵ', - 11446 => 'ⲷ', - 11448 => 'ⲹ', - 11450 => 'ⲻ', - 11452 => 'ⲽ', - 11454 => 'ⲿ', - 11456 => 'ⳁ', - 11458 => 'ⳃ', - 11460 => 'ⳅ', - 11462 => 'ⳇ', - 11464 => 'ⳉ', - 11466 => 'ⳋ', - 11468 => 'ⳍ', - 11470 => 'ⳏ', - 11472 => 'ⳑ', - 11474 => 'ⳓ', - 11476 => 'ⳕ', - 11478 => 'ⳗ', - 11480 => 'ⳙ', - 11482 => 'ⳛ', - 11484 => 'ⳝ', - 11486 => 'ⳟ', - 11488 => 'ⳡ', - 11490 => 'ⳣ', - 11499 => 'ⳬ', - 11501 => 'ⳮ', - 11506 => 'ⳳ', - 11631 => 'ⵡ', - 11935 => '母', - 12019 => '龟', - 12032 => '一', - 12033 => '丨', - 12034 => '丶', - 12035 => '丿', - 12036 => '乙', - 12037 => '亅', - 12038 => '二', - 12039 => '亠', - 12040 => '人', - 12041 => '儿', - 12042 => '入', - 12043 => '八', - 12044 => '冂', - 12045 => '冖', - 12046 => '冫', - 12047 => '几', - 12048 => '凵', - 12049 => '刀', - 12050 => '力', - 12051 => '勹', - 12052 => '匕', - 12053 => '匚', - 12054 => '匸', - 12055 => '十', - 12056 => '卜', - 12057 => '卩', - 12058 => '厂', - 12059 => '厶', - 12060 => '又', - 12061 => '口', - 12062 => '囗', - 12063 => '土', - 12064 => '士', - 12065 => '夂', - 12066 => '夊', - 12067 => '夕', - 12068 => '大', - 12069 => '女', - 12070 => '子', - 12071 => '宀', - 12072 => '寸', - 12073 => '小', - 12074 => '尢', - 12075 => '尸', - 12076 => '屮', - 12077 => '山', - 12078 => '巛', - 12079 => '工', - 12080 => '己', - 12081 => '巾', - 12082 => '干', - 12083 => '幺', - 12084 => '广', - 12085 => '廴', - 12086 => '廾', - 12087 => '弋', - 12088 => '弓', - 12089 => '彐', - 12090 => '彡', - 12091 => '彳', - 12092 => '心', - 12093 => '戈', - 12094 => '戶', - 12095 => '手', - 12096 => '支', - 12097 => '攴', - 12098 => '文', - 12099 => '斗', - 12100 => '斤', - 12101 => '方', - 12102 => '无', - 12103 => '日', - 12104 => '曰', - 12105 => '月', - 12106 => '木', - 12107 => '欠', - 12108 => '止', - 12109 => '歹', - 12110 => '殳', - 12111 => '毋', - 12112 => '比', - 12113 => '毛', - 12114 => '氏', - 12115 => '气', - 12116 => '水', - 12117 => '火', - 12118 => '爪', - 12119 => '父', - 12120 => '爻', - 12121 => '爿', - 12122 => '片', - 12123 => '牙', - 12124 => '牛', - 12125 => '犬', - 12126 => '玄', - 12127 => '玉', - 12128 => '瓜', - 12129 => '瓦', - 12130 => '甘', - 12131 => '生', - 12132 => '用', - 12133 => '田', - 12134 => '疋', - 12135 => '疒', - 12136 => '癶', - 12137 => '白', - 12138 => '皮', - 12139 => '皿', - 12140 => '目', - 12141 => '矛', - 12142 => '矢', - 12143 => '石', - 12144 => '示', - 12145 => '禸', - 12146 => '禾', - 12147 => '穴', - 12148 => '立', - 12149 => '竹', - 12150 => '米', - 12151 => '糸', - 12152 => '缶', - 12153 => '网', - 12154 => '羊', - 12155 => '羽', - 12156 => '老', - 12157 => '而', - 12158 => '耒', - 12159 => '耳', - 12160 => '聿', - 12161 => '肉', - 12162 => '臣', - 12163 => '自', - 12164 => '至', - 12165 => '臼', - 12166 => '舌', - 12167 => '舛', - 12168 => '舟', - 12169 => '艮', - 12170 => '色', - 12171 => '艸', - 12172 => '虍', - 12173 => '虫', - 12174 => '血', - 12175 => '行', - 12176 => '衣', - 12177 => '襾', - 12178 => '見', - 12179 => '角', - 12180 => '言', - 12181 => '谷', - 12182 => '豆', - 12183 => '豕', - 12184 => '豸', - 12185 => '貝', - 12186 => '赤', - 12187 => '走', - 12188 => '足', - 12189 => '身', - 12190 => '車', - 12191 => '辛', - 12192 => '辰', - 12193 => '辵', - 12194 => '邑', - 12195 => '酉', - 12196 => '釆', - 12197 => '里', - 12198 => '金', - 12199 => '長', - 12200 => '門', - 12201 => '阜', - 12202 => '隶', - 12203 => '隹', - 12204 => '雨', - 12205 => '靑', - 12206 => '非', - 12207 => '面', - 12208 => '革', - 12209 => '韋', - 12210 => '韭', - 12211 => '音', - 12212 => '頁', - 12213 => '風', - 12214 => '飛', - 12215 => '食', - 12216 => '首', - 12217 => '香', - 12218 => '馬', - 12219 => '骨', - 12220 => '高', - 12221 => '髟', - 12222 => '鬥', - 12223 => '鬯', - 12224 => '鬲', - 12225 => '鬼', - 12226 => '魚', - 12227 => '鳥', - 12228 => '鹵', - 12229 => '鹿', - 12230 => '麥', - 12231 => '麻', - 12232 => '黃', - 12233 => '黍', - 12234 => '黑', - 12235 => '黹', - 12236 => '黽', - 12237 => '鼎', - 12238 => '鼓', - 12239 => '鼠', - 12240 => '鼻', - 12241 => '齊', - 12242 => '齒', - 12243 => '龍', - 12244 => '龜', - 12245 => '龠', - 12290 => '.', - 12342 => '〒', - 12344 => '十', - 12345 => '卄', - 12346 => '卅', - 12447 => 'より', - 12543 => 'コト', - 12593 => 'ᄀ', - 12594 => 'ᄁ', - 12595 => 'ᆪ', - 12596 => 'ᄂ', - 12597 => 'ᆬ', - 12598 => 'ᆭ', - 12599 => 'ᄃ', - 12600 => 'ᄄ', - 12601 => 'ᄅ', - 12602 => 'ᆰ', - 12603 => 'ᆱ', - 12604 => 'ᆲ', - 12605 => 'ᆳ', - 12606 => 'ᆴ', - 12607 => 'ᆵ', - 12608 => 'ᄚ', - 12609 => 'ᄆ', - 12610 => 'ᄇ', - 12611 => 'ᄈ', - 12612 => 'ᄡ', - 12613 => 'ᄉ', - 12614 => 'ᄊ', - 12615 => 'ᄋ', - 12616 => 'ᄌ', - 12617 => 'ᄍ', - 12618 => 'ᄎ', - 12619 => 'ᄏ', - 12620 => 'ᄐ', - 12621 => 'ᄑ', - 12622 => 'ᄒ', - 12623 => 'ᅡ', - 12624 => 'ᅢ', - 12625 => 'ᅣ', - 12626 => 'ᅤ', - 12627 => 'ᅥ', - 12628 => 'ᅦ', - 12629 => 'ᅧ', - 12630 => 'ᅨ', - 12631 => 'ᅩ', - 12632 => 'ᅪ', - 12633 => 'ᅫ', - 12634 => 'ᅬ', - 12635 => 'ᅭ', - 12636 => 'ᅮ', - 12637 => 'ᅯ', - 12638 => 'ᅰ', - 12639 => 'ᅱ', - 12640 => 'ᅲ', - 12641 => 'ᅳ', - 12642 => 'ᅴ', - 12643 => 'ᅵ', - 12645 => 'ᄔ', - 12646 => 'ᄕ', - 12647 => 'ᇇ', - 12648 => 'ᇈ', - 12649 => 'ᇌ', - 12650 => 'ᇎ', - 12651 => 'ᇓ', - 12652 => 'ᇗ', - 12653 => 'ᇙ', - 12654 => 'ᄜ', - 12655 => 'ᇝ', - 12656 => 'ᇟ', - 12657 => 'ᄝ', - 12658 => 'ᄞ', - 12659 => 'ᄠ', - 12660 => 'ᄢ', - 12661 => 'ᄣ', - 12662 => 'ᄧ', - 12663 => 'ᄩ', - 12664 => 'ᄫ', - 12665 => 'ᄬ', - 12666 => 'ᄭ', - 12667 => 'ᄮ', - 12668 => 'ᄯ', - 12669 => 'ᄲ', - 12670 => 'ᄶ', - 12671 => 'ᅀ', - 12672 => 'ᅇ', - 12673 => 'ᅌ', - 12674 => 'ᇱ', - 12675 => 'ᇲ', - 12676 => 'ᅗ', - 12677 => 'ᅘ', - 12678 => 'ᅙ', - 12679 => 'ᆄ', - 12680 => 'ᆅ', - 12681 => 'ᆈ', - 12682 => 'ᆑ', - 12683 => 'ᆒ', - 12684 => 'ᆔ', - 12685 => 'ᆞ', - 12686 => 'ᆡ', - 12690 => '一', - 12691 => '二', - 12692 => '三', - 12693 => '四', - 12694 => '上', - 12695 => '中', - 12696 => '下', - 12697 => '甲', - 12698 => '乙', - 12699 => '丙', - 12700 => '丁', - 12701 => '天', - 12702 => '地', - 12703 => '人', - 12868 => '問', - 12869 => '幼', - 12870 => '文', - 12871 => '箏', - 12880 => 'pte', - 12881 => '21', - 12882 => '22', - 12883 => '23', - 12884 => '24', - 12885 => '25', - 12886 => '26', - 12887 => '27', - 12888 => '28', - 12889 => '29', - 12890 => '30', - 12891 => '31', - 12892 => '32', - 12893 => '33', - 12894 => '34', - 12895 => '35', - 12896 => 'ᄀ', - 12897 => 'ᄂ', - 12898 => 'ᄃ', - 12899 => 'ᄅ', - 12900 => 'ᄆ', - 12901 => 'ᄇ', - 12902 => 'ᄉ', - 12903 => 'ᄋ', - 12904 => 'ᄌ', - 12905 => 'ᄎ', - 12906 => 'ᄏ', - 12907 => 'ᄐ', - 12908 => 'ᄑ', - 12909 => 'ᄒ', - 12910 => '가', - 12911 => '나', - 12912 => '다', - 12913 => '라', - 12914 => '마', - 12915 => '바', - 12916 => '사', - 12917 => '아', - 12918 => '자', - 12919 => '차', - 12920 => '카', - 12921 => '타', - 12922 => '파', - 12923 => '하', - 12924 => '참고', - 12925 => '주의', - 12926 => '우', - 12928 => '一', - 12929 => '二', - 12930 => '三', - 12931 => '四', - 12932 => '五', - 12933 => '六', - 12934 => '七', - 12935 => '八', - 12936 => '九', - 12937 => '十', - 12938 => '月', - 12939 => '火', - 12940 => '水', - 12941 => '木', - 12942 => '金', - 12943 => '土', - 12944 => '日', - 12945 => '株', - 12946 => '有', - 12947 => '社', - 12948 => '名', - 12949 => '特', - 12950 => '財', - 12951 => '祝', - 12952 => '労', - 12953 => '秘', - 12954 => '男', - 12955 => '女', - 12956 => '適', - 12957 => '優', - 12958 => '印', - 12959 => '注', - 12960 => '項', - 12961 => '休', - 12962 => '写', - 12963 => '正', - 12964 => '上', - 12965 => '中', - 12966 => '下', - 12967 => '左', - 12968 => '右', - 12969 => '医', - 12970 => '宗', - 12971 => '学', - 12972 => '監', - 12973 => '企', - 12974 => '資', - 12975 => '協', - 12976 => '夜', - 12977 => '36', - 12978 => '37', - 12979 => '38', - 12980 => '39', - 12981 => '40', - 12982 => '41', - 12983 => '42', - 12984 => '43', - 12985 => '44', - 12986 => '45', - 12987 => '46', - 12988 => '47', - 12989 => '48', - 12990 => '49', - 12991 => '50', - 12992 => '1月', - 12993 => '2月', - 12994 => '3月', - 12995 => '4月', - 12996 => '5月', - 12997 => '6月', - 12998 => '7月', - 12999 => '8月', - 13000 => '9月', - 13001 => '10月', - 13002 => '11月', - 13003 => '12月', - 13004 => 'hg', - 13005 => 'erg', - 13006 => 'ev', - 13007 => 'ltd', - 13008 => 'ア', - 13009 => 'イ', - 13010 => 'ウ', - 13011 => 'エ', - 13012 => 'オ', - 13013 => 'カ', - 13014 => 'キ', - 13015 => 'ク', - 13016 => 'ケ', - 13017 => 'コ', - 13018 => 'サ', - 13019 => 'シ', - 13020 => 'ス', - 13021 => 'セ', - 13022 => 'ソ', - 13023 => 'タ', - 13024 => 'チ', - 13025 => 'ツ', - 13026 => 'テ', - 13027 => 'ト', - 13028 => 'ナ', - 13029 => 'ニ', - 13030 => 'ヌ', - 13031 => 'ネ', - 13032 => 'ノ', - 13033 => 'ハ', - 13034 => 'ヒ', - 13035 => 'フ', - 13036 => 'ヘ', - 13037 => 'ホ', - 13038 => 'マ', - 13039 => 'ミ', - 13040 => 'ム', - 13041 => 'メ', - 13042 => 'モ', - 13043 => 'ヤ', - 13044 => 'ユ', - 13045 => 'ヨ', - 13046 => 'ラ', - 13047 => 'リ', - 13048 => 'ル', - 13049 => 'レ', - 13050 => 'ロ', - 13051 => 'ワ', - 13052 => 'ヰ', - 13053 => 'ヱ', - 13054 => 'ヲ', - 13055 => '令和', - 13056 => 'アパート', - 13057 => 'アルファ', - 13058 => 'アンペア', - 13059 => 'アール', - 13060 => 'イニング', - 13061 => 'インチ', - 13062 => 'ウォン', - 13063 => 'エスクード', - 13064 => 'エーカー', - 13065 => 'オンス', - 13066 => 'オーム', - 13067 => 'カイリ', - 13068 => 'カラット', - 13069 => 'カロリー', - 13070 => 'ガロン', - 13071 => 'ガンマ', - 13072 => 'ギガ', - 13073 => 'ギニー', - 13074 => 'キュリー', - 13075 => 'ギルダー', - 13076 => 'キロ', - 13077 => 'キログラム', - 13078 => 'キロメートル', - 13079 => 'キロワット', - 13080 => 'グラム', - 13081 => 'グラムトン', - 13082 => 'クルゼイロ', - 13083 => 'クローネ', - 13084 => 'ケース', - 13085 => 'コルナ', - 13086 => 'コーポ', - 13087 => 'サイクル', - 13088 => 'サンチーム', - 13089 => 'シリング', - 13090 => 'センチ', - 13091 => 'セント', - 13092 => 'ダース', - 13093 => 'デシ', - 13094 => 'ドル', - 13095 => 'トン', - 13096 => 'ナノ', - 13097 => 'ノット', - 13098 => 'ハイツ', - 13099 => 'パーセント', - 13100 => 'パーツ', - 13101 => 'バーレル', - 13102 => 'ピアストル', - 13103 => 'ピクル', - 13104 => 'ピコ', - 13105 => 'ビル', - 13106 => 'ファラッド', - 13107 => 'フィート', - 13108 => 'ブッシェル', - 13109 => 'フラン', - 13110 => 'ヘクタール', - 13111 => 'ペソ', - 13112 => 'ペニヒ', - 13113 => 'ヘルツ', - 13114 => 'ペンス', - 13115 => 'ページ', - 13116 => 'ベータ', - 13117 => 'ポイント', - 13118 => 'ボルト', - 13119 => 'ホン', - 13120 => 'ポンド', - 13121 => 'ホール', - 13122 => 'ホーン', - 13123 => 'マイクロ', - 13124 => 'マイル', - 13125 => 'マッハ', - 13126 => 'マルク', - 13127 => 'マンション', - 13128 => 'ミクロン', - 13129 => 'ミリ', - 13130 => 'ミリバール', - 13131 => 'メガ', - 13132 => 'メガトン', - 13133 => 'メートル', - 13134 => 'ヤード', - 13135 => 'ヤール', - 13136 => 'ユアン', - 13137 => 'リットル', - 13138 => 'リラ', - 13139 => 'ルピー', - 13140 => 'ルーブル', - 13141 => 'レム', - 13142 => 'レントゲン', - 13143 => 'ワット', - 13144 => '0点', - 13145 => '1点', - 13146 => '2点', - 13147 => '3点', - 13148 => '4点', - 13149 => '5点', - 13150 => '6点', - 13151 => '7点', - 13152 => '8点', - 13153 => '9点', - 13154 => '10点', - 13155 => '11点', - 13156 => '12点', - 13157 => '13点', - 13158 => '14点', - 13159 => '15点', - 13160 => '16点', - 13161 => '17点', - 13162 => '18点', - 13163 => '19点', - 13164 => '20点', - 13165 => '21点', - 13166 => '22点', - 13167 => '23点', - 13168 => '24点', - 13169 => 'hpa', - 13170 => 'da', - 13171 => 'au', - 13172 => 'bar', - 13173 => 'ov', - 13174 => 'pc', - 13175 => 'dm', - 13176 => 'dm2', - 13177 => 'dm3', - 13178 => 'iu', - 13179 => '平成', - 13180 => '昭和', - 13181 => '大正', - 13182 => '明治', - 13183 => '株式会社', - 13184 => 'pa', - 13185 => 'na', - 13186 => 'μa', - 13187 => 'ma', - 13188 => 'ka', - 13189 => 'kb', - 13190 => 'mb', - 13191 => 'gb', - 13192 => 'cal', - 13193 => 'kcal', - 13194 => 'pf', - 13195 => 'nf', - 13196 => 'μf', - 13197 => 'μg', - 13198 => 'mg', - 13199 => 'kg', - 13200 => 'hz', - 13201 => 'khz', - 13202 => 'mhz', - 13203 => 'ghz', - 13204 => 'thz', - 13205 => 'μl', - 13206 => 'ml', - 13207 => 'dl', - 13208 => 'kl', - 13209 => 'fm', - 13210 => 'nm', - 13211 => 'μm', - 13212 => 'mm', - 13213 => 'cm', - 13214 => 'km', - 13215 => 'mm2', - 13216 => 'cm2', - 13217 => 'm2', - 13218 => 'km2', - 13219 => 'mm3', - 13220 => 'cm3', - 13221 => 'm3', - 13222 => 'km3', - 13223 => 'm∕s', - 13224 => 'm∕s2', - 13225 => 'pa', - 13226 => 'kpa', - 13227 => 'mpa', - 13228 => 'gpa', - 13229 => 'rad', - 13230 => 'rad∕s', - 13231 => 'rad∕s2', - 13232 => 'ps', - 13233 => 'ns', - 13234 => 'μs', - 13235 => 'ms', - 13236 => 'pv', - 13237 => 'nv', - 13238 => 'μv', - 13239 => 'mv', - 13240 => 'kv', - 13241 => 'mv', - 13242 => 'pw', - 13243 => 'nw', - 13244 => 'μw', - 13245 => 'mw', - 13246 => 'kw', - 13247 => 'mw', - 13248 => 'kω', - 13249 => 'mω', - 13251 => 'bq', - 13252 => 'cc', - 13253 => 'cd', - 13254 => 'c∕kg', - 13256 => 'db', - 13257 => 'gy', - 13258 => 'ha', - 13259 => 'hp', - 13260 => 'in', - 13261 => 'kk', - 13262 => 'km', - 13263 => 'kt', - 13264 => 'lm', - 13265 => 'ln', - 13266 => 'log', - 13267 => 'lx', - 13268 => 'mb', - 13269 => 'mil', - 13270 => 'mol', - 13271 => 'ph', - 13273 => 'ppm', - 13274 => 'pr', - 13275 => 'sr', - 13276 => 'sv', - 13277 => 'wb', - 13278 => 'v∕m', - 13279 => 'a∕m', - 13280 => '1日', - 13281 => '2日', - 13282 => '3日', - 13283 => '4日', - 13284 => '5日', - 13285 => '6日', - 13286 => '7日', - 13287 => '8日', - 13288 => '9日', - 13289 => '10日', - 13290 => '11日', - 13291 => '12日', - 13292 => '13日', - 13293 => '14日', - 13294 => '15日', - 13295 => '16日', - 13296 => '17日', - 13297 => '18日', - 13298 => '19日', - 13299 => '20日', - 13300 => '21日', - 13301 => '22日', - 13302 => '23日', - 13303 => '24日', - 13304 => '25日', - 13305 => '26日', - 13306 => '27日', - 13307 => '28日', - 13308 => '29日', - 13309 => '30日', - 13310 => '31日', - 13311 => 'gal', - 42560 => 'ꙁ', - 42562 => 'ꙃ', - 42564 => 'ꙅ', - 42566 => 'ꙇ', - 42568 => 'ꙉ', - 42570 => 'ꙋ', - 42572 => 'ꙍ', - 42574 => 'ꙏ', - 42576 => 'ꙑ', - 42578 => 'ꙓ', - 42580 => 'ꙕ', - 42582 => 'ꙗ', - 42584 => 'ꙙ', - 42586 => 'ꙛ', - 42588 => 'ꙝ', - 42590 => 'ꙟ', - 42592 => 'ꙡ', - 42594 => 'ꙣ', - 42596 => 'ꙥ', - 42598 => 'ꙧ', - 42600 => 'ꙩ', - 42602 => 'ꙫ', - 42604 => 'ꙭ', - 42624 => 'ꚁ', - 42626 => 'ꚃ', - 42628 => 'ꚅ', - 42630 => 'ꚇ', - 42632 => 'ꚉ', - 42634 => 'ꚋ', - 42636 => 'ꚍ', - 42638 => 'ꚏ', - 42640 => 'ꚑ', - 42642 => 'ꚓ', - 42644 => 'ꚕ', - 42646 => 'ꚗ', - 42648 => 'ꚙ', - 42650 => 'ꚛ', - 42652 => 'ъ', - 42653 => 'ь', - 42786 => 'ꜣ', - 42788 => 'ꜥ', - 42790 => 'ꜧ', - 42792 => 'ꜩ', - 42794 => 'ꜫ', - 42796 => 'ꜭ', - 42798 => 'ꜯ', - 42802 => 'ꜳ', - 42804 => 'ꜵ', - 42806 => 'ꜷ', - 42808 => 'ꜹ', - 42810 => 'ꜻ', - 42812 => 'ꜽ', - 42814 => 'ꜿ', - 42816 => 'ꝁ', - 42818 => 'ꝃ', - 42820 => 'ꝅ', - 42822 => 'ꝇ', - 42824 => 'ꝉ', - 42826 => 'ꝋ', - 42828 => 'ꝍ', - 42830 => 'ꝏ', - 42832 => 'ꝑ', - 42834 => 'ꝓ', - 42836 => 'ꝕ', - 42838 => 'ꝗ', - 42840 => 'ꝙ', - 42842 => 'ꝛ', - 42844 => 'ꝝ', - 42846 => 'ꝟ', - 42848 => 'ꝡ', - 42850 => 'ꝣ', - 42852 => 'ꝥ', - 42854 => 'ꝧ', - 42856 => 'ꝩ', - 42858 => 'ꝫ', - 42860 => 'ꝭ', - 42862 => 'ꝯ', - 42864 => 'ꝯ', - 42873 => 'ꝺ', - 42875 => 'ꝼ', - 42877 => 'ᵹ', - 42878 => 'ꝿ', - 42880 => 'ꞁ', - 42882 => 'ꞃ', - 42884 => 'ꞅ', - 42886 => 'ꞇ', - 42891 => 'ꞌ', - 42893 => 'ɥ', - 42896 => 'ꞑ', - 42898 => 'ꞓ', - 42902 => 'ꞗ', - 42904 => 'ꞙ', - 42906 => 'ꞛ', - 42908 => 'ꞝ', - 42910 => 'ꞟ', - 42912 => 'ꞡ', - 42914 => 'ꞣ', - 42916 => 'ꞥ', - 42918 => 'ꞧ', - 42920 => 'ꞩ', - 42922 => 'ɦ', - 42923 => 'ɜ', - 42924 => 'ɡ', - 42925 => 'ɬ', - 42926 => 'ɪ', - 42928 => 'ʞ', - 42929 => 'ʇ', - 42930 => 'ʝ', - 42931 => 'ꭓ', - 42932 => 'ꞵ', - 42934 => 'ꞷ', - 42936 => 'ꞹ', - 42938 => 'ꞻ', - 42940 => 'ꞽ', - 42942 => 'ꞿ', - 42946 => 'ꟃ', - 42948 => 'ꞔ', - 42949 => 'ʂ', - 42950 => 'ᶎ', - 42951 => 'ꟈ', - 42953 => 'ꟊ', - 42997 => 'ꟶ', - 43000 => 'ħ', - 43001 => 'œ', - 43868 => 'ꜧ', - 43869 => 'ꬷ', - 43870 => 'ɫ', - 43871 => 'ꭒ', - 43881 => 'ʍ', - 43888 => 'Ꭰ', - 43889 => 'Ꭱ', - 43890 => 'Ꭲ', - 43891 => 'Ꭳ', - 43892 => 'Ꭴ', - 43893 => 'Ꭵ', - 43894 => 'Ꭶ', - 43895 => 'Ꭷ', - 43896 => 'Ꭸ', - 43897 => 'Ꭹ', - 43898 => 'Ꭺ', - 43899 => 'Ꭻ', - 43900 => 'Ꭼ', - 43901 => 'Ꭽ', - 43902 => 'Ꭾ', - 43903 => 'Ꭿ', - 43904 => 'Ꮀ', - 43905 => 'Ꮁ', - 43906 => 'Ꮂ', - 43907 => 'Ꮃ', - 43908 => 'Ꮄ', - 43909 => 'Ꮅ', - 43910 => 'Ꮆ', - 43911 => 'Ꮇ', - 43912 => 'Ꮈ', - 43913 => 'Ꮉ', - 43914 => 'Ꮊ', - 43915 => 'Ꮋ', - 43916 => 'Ꮌ', - 43917 => 'Ꮍ', - 43918 => 'Ꮎ', - 43919 => 'Ꮏ', - 43920 => 'Ꮐ', - 43921 => 'Ꮑ', - 43922 => 'Ꮒ', - 43923 => 'Ꮓ', - 43924 => 'Ꮔ', - 43925 => 'Ꮕ', - 43926 => 'Ꮖ', - 43927 => 'Ꮗ', - 43928 => 'Ꮘ', - 43929 => 'Ꮙ', - 43930 => 'Ꮚ', - 43931 => 'Ꮛ', - 43932 => 'Ꮜ', - 43933 => 'Ꮝ', - 43934 => 'Ꮞ', - 43935 => 'Ꮟ', - 43936 => 'Ꮠ', - 43937 => 'Ꮡ', - 43938 => 'Ꮢ', - 43939 => 'Ꮣ', - 43940 => 'Ꮤ', - 43941 => 'Ꮥ', - 43942 => 'Ꮦ', - 43943 => 'Ꮧ', - 43944 => 'Ꮨ', - 43945 => 'Ꮩ', - 43946 => 'Ꮪ', - 43947 => 'Ꮫ', - 43948 => 'Ꮬ', - 43949 => 'Ꮭ', - 43950 => 'Ꮮ', - 43951 => 'Ꮯ', - 43952 => 'Ꮰ', - 43953 => 'Ꮱ', - 43954 => 'Ꮲ', - 43955 => 'Ꮳ', - 43956 => 'Ꮴ', - 43957 => 'Ꮵ', - 43958 => 'Ꮶ', - 43959 => 'Ꮷ', - 43960 => 'Ꮸ', - 43961 => 'Ꮹ', - 43962 => 'Ꮺ', - 43963 => 'Ꮻ', - 43964 => 'Ꮼ', - 43965 => 'Ꮽ', - 43966 => 'Ꮾ', - 43967 => 'Ꮿ', - 63744 => '豈', - 63745 => '更', - 63746 => '車', - 63747 => '賈', - 63748 => '滑', - 63749 => '串', - 63750 => '句', - 63751 => '龜', - 63752 => '龜', - 63753 => '契', - 63754 => '金', - 63755 => '喇', - 63756 => '奈', - 63757 => '懶', - 63758 => '癩', - 63759 => '羅', - 63760 => '蘿', - 63761 => '螺', - 63762 => '裸', - 63763 => '邏', - 63764 => '樂', - 63765 => '洛', - 63766 => '烙', - 63767 => '珞', - 63768 => '落', - 63769 => '酪', - 63770 => '駱', - 63771 => '亂', - 63772 => '卵', - 63773 => '欄', - 63774 => '爛', - 63775 => '蘭', - 63776 => '鸞', - 63777 => '嵐', - 63778 => '濫', - 63779 => '藍', - 63780 => '襤', - 63781 => '拉', - 63782 => '臘', - 63783 => '蠟', - 63784 => '廊', - 63785 => '朗', - 63786 => '浪', - 63787 => '狼', - 63788 => '郎', - 63789 => '來', - 63790 => '冷', - 63791 => '勞', - 63792 => '擄', - 63793 => '櫓', - 63794 => '爐', - 63795 => '盧', - 63796 => '老', - 63797 => '蘆', - 63798 => '虜', - 63799 => '路', - 63800 => '露', - 63801 => '魯', - 63802 => '鷺', - 63803 => '碌', - 63804 => '祿', - 63805 => '綠', - 63806 => '菉', - 63807 => '錄', - 63808 => '鹿', - 63809 => '論', - 63810 => '壟', - 63811 => '弄', - 63812 => '籠', - 63813 => '聾', - 63814 => '牢', - 63815 => '磊', - 63816 => '賂', - 63817 => '雷', - 63818 => '壘', - 63819 => '屢', - 63820 => '樓', - 63821 => '淚', - 63822 => '漏', - 63823 => '累', - 63824 => '縷', - 63825 => '陋', - 63826 => '勒', - 63827 => '肋', - 63828 => '凜', - 63829 => '凌', - 63830 => '稜', - 63831 => '綾', - 63832 => '菱', - 63833 => '陵', - 63834 => '讀', - 63835 => '拏', - 63836 => '樂', - 63837 => '諾', - 63838 => '丹', - 63839 => '寧', - 63840 => '怒', - 63841 => '率', - 63842 => '異', - 63843 => '北', - 63844 => '磻', - 63845 => '便', - 63846 => '復', - 63847 => '不', - 63848 => '泌', - 63849 => '數', - 63850 => '索', - 63851 => '參', - 63852 => '塞', - 63853 => '省', - 63854 => '葉', - 63855 => '說', - 63856 => '殺', - 63857 => '辰', - 63858 => '沈', - 63859 => '拾', - 63860 => '若', - 63861 => '掠', - 63862 => '略', - 63863 => '亮', - 63864 => '兩', - 63865 => '凉', - 63866 => '梁', - 63867 => '糧', - 63868 => '良', - 63869 => '諒', - 63870 => '量', - 63871 => '勵', - 63872 => '呂', - 63873 => '女', - 63874 => '廬', - 63875 => '旅', - 63876 => '濾', - 63877 => '礪', - 63878 => '閭', - 63879 => '驪', - 63880 => '麗', - 63881 => '黎', - 63882 => '力', - 63883 => '曆', - 63884 => '歷', - 63885 => '轢', - 63886 => '年', - 63887 => '憐', - 63888 => '戀', - 63889 => '撚', - 63890 => '漣', - 63891 => '煉', - 63892 => '璉', - 63893 => '秊', - 63894 => '練', - 63895 => '聯', - 63896 => '輦', - 63897 => '蓮', - 63898 => '連', - 63899 => '鍊', - 63900 => '列', - 63901 => '劣', - 63902 => '咽', - 63903 => '烈', - 63904 => '裂', - 63905 => '說', - 63906 => '廉', - 63907 => '念', - 63908 => '捻', - 63909 => '殮', - 63910 => '簾', - 63911 => '獵', - 63912 => '令', - 63913 => '囹', - 63914 => '寧', - 63915 => '嶺', - 63916 => '怜', - 63917 => '玲', - 63918 => '瑩', - 63919 => '羚', - 63920 => '聆', - 63921 => '鈴', - 63922 => '零', - 63923 => '靈', - 63924 => '領', - 63925 => '例', - 63926 => '禮', - 63927 => '醴', - 63928 => '隸', - 63929 => '惡', - 63930 => '了', - 63931 => '僚', - 63932 => '寮', - 63933 => '尿', - 63934 => '料', - 63935 => '樂', - 63936 => '燎', - 63937 => '療', - 63938 => '蓼', - 63939 => '遼', - 63940 => '龍', - 63941 => '暈', - 63942 => '阮', - 63943 => '劉', - 63944 => '杻', - 63945 => '柳', - 63946 => '流', - 63947 => '溜', - 63948 => '琉', - 63949 => '留', - 63950 => '硫', - 63951 => '紐', - 63952 => '類', - 63953 => '六', - 63954 => '戮', - 63955 => '陸', - 63956 => '倫', - 63957 => '崙', - 63958 => '淪', - 63959 => '輪', - 63960 => '律', - 63961 => '慄', - 63962 => '栗', - 63963 => '率', - 63964 => '隆', - 63965 => '利', - 63966 => '吏', - 63967 => '履', - 63968 => '易', - 63969 => '李', - 63970 => '梨', - 63971 => '泥', - 63972 => '理', - 63973 => '痢', - 63974 => '罹', - 63975 => '裏', - 63976 => '裡', - 63977 => '里', - 63978 => '離', - 63979 => '匿', - 63980 => '溺', - 63981 => '吝', - 63982 => '燐', - 63983 => '璘', - 63984 => '藺', - 63985 => '隣', - 63986 => '鱗', - 63987 => '麟', - 63988 => '林', - 63989 => '淋', - 63990 => '臨', - 63991 => '立', - 63992 => '笠', - 63993 => '粒', - 63994 => '狀', - 63995 => '炙', - 63996 => '識', - 63997 => '什', - 63998 => '茶', - 63999 => '刺', - 64000 => '切', - 64001 => '度', - 64002 => '拓', - 64003 => '糖', - 64004 => '宅', - 64005 => '洞', - 64006 => '暴', - 64007 => '輻', - 64008 => '行', - 64009 => '降', - 64010 => '見', - 64011 => '廓', - 64012 => '兀', - 64013 => '嗀', - 64016 => '塚', - 64018 => '晴', - 64021 => '凞', - 64022 => '猪', - 64023 => '益', - 64024 => '礼', - 64025 => '神', - 64026 => '祥', - 64027 => '福', - 64028 => '靖', - 64029 => '精', - 64030 => '羽', - 64032 => '蘒', - 64034 => '諸', - 64037 => '逸', - 64038 => '都', - 64042 => '飯', - 64043 => '飼', - 64044 => '館', - 64045 => '鶴', - 64046 => '郞', - 64047 => '隷', - 64048 => '侮', - 64049 => '僧', - 64050 => '免', - 64051 => '勉', - 64052 => '勤', - 64053 => '卑', - 64054 => '喝', - 64055 => '嘆', - 64056 => '器', - 64057 => '塀', - 64058 => '墨', - 64059 => '層', - 64060 => '屮', - 64061 => '悔', - 64062 => '慨', - 64063 => '憎', - 64064 => '懲', - 64065 => '敏', - 64066 => '既', - 64067 => '暑', - 64068 => '梅', - 64069 => '海', - 64070 => '渚', - 64071 => '漢', - 64072 => '煮', - 64073 => '爫', - 64074 => '琢', - 64075 => '碑', - 64076 => '社', - 64077 => '祉', - 64078 => '祈', - 64079 => '祐', - 64080 => '祖', - 64081 => '祝', - 64082 => '禍', - 64083 => '禎', - 64084 => '穀', - 64085 => '突', - 64086 => '節', - 64087 => '練', - 64088 => '縉', - 64089 => '繁', - 64090 => '署', - 64091 => '者', - 64092 => '臭', - 64093 => '艹', - 64094 => '艹', - 64095 => '著', - 64096 => '褐', - 64097 => '視', - 64098 => '謁', - 64099 => '謹', - 64100 => '賓', - 64101 => '贈', - 64102 => '辶', - 64103 => '逸', - 64104 => '難', - 64105 => '響', - 64106 => '頻', - 64107 => '恵', - 64108 => '𤋮', - 64109 => '舘', - 64112 => '並', - 64113 => '况', - 64114 => '全', - 64115 => '侀', - 64116 => '充', - 64117 => '冀', - 64118 => '勇', - 64119 => '勺', - 64120 => '喝', - 64121 => '啕', - 64122 => '喙', - 64123 => '嗢', - 64124 => '塚', - 64125 => '墳', - 64126 => '奄', - 64127 => '奔', - 64128 => '婢', - 64129 => '嬨', - 64130 => '廒', - 64131 => '廙', - 64132 => '彩', - 64133 => '徭', - 64134 => '惘', - 64135 => '慎', - 64136 => '愈', - 64137 => '憎', - 64138 => '慠', - 64139 => '懲', - 64140 => '戴', - 64141 => '揄', - 64142 => '搜', - 64143 => '摒', - 64144 => '敖', - 64145 => '晴', - 64146 => '朗', - 64147 => '望', - 64148 => '杖', - 64149 => '歹', - 64150 => '殺', - 64151 => '流', - 64152 => '滛', - 64153 => '滋', - 64154 => '漢', - 64155 => '瀞', - 64156 => '煮', - 64157 => '瞧', - 64158 => '爵', - 64159 => '犯', - 64160 => '猪', - 64161 => '瑱', - 64162 => '甆', - 64163 => '画', - 64164 => '瘝', - 64165 => '瘟', - 64166 => '益', - 64167 => '盛', - 64168 => '直', - 64169 => '睊', - 64170 => '着', - 64171 => '磌', - 64172 => '窱', - 64173 => '節', - 64174 => '类', - 64175 => '絛', - 64176 => '練', - 64177 => '缾', - 64178 => '者', - 64179 => '荒', - 64180 => '華', - 64181 => '蝹', - 64182 => '襁', - 64183 => '覆', - 64184 => '視', - 64185 => '調', - 64186 => '諸', - 64187 => '請', - 64188 => '謁', - 64189 => '諾', - 64190 => '諭', - 64191 => '謹', - 64192 => '變', - 64193 => '贈', - 64194 => '輸', - 64195 => '遲', - 64196 => '醙', - 64197 => '鉶', - 64198 => '陼', - 64199 => '難', - 64200 => '靖', - 64201 => '韛', - 64202 => '響', - 64203 => '頋', - 64204 => '頻', - 64205 => '鬒', - 64206 => '龜', - 64207 => '𢡊', - 64208 => '𢡄', - 64209 => '𣏕', - 64210 => '㮝', - 64211 => '䀘', - 64212 => '䀹', - 64213 => '𥉉', - 64214 => '𥳐', - 64215 => '𧻓', - 64216 => '齃', - 64217 => '龎', - 64256 => 'ff', - 64257 => 'fi', - 64258 => 'fl', - 64259 => 'ffi', - 64260 => 'ffl', - 64261 => 'st', - 64262 => 'st', - 64275 => 'մն', - 64276 => 'մե', - 64277 => 'մի', - 64278 => 'վն', - 64279 => 'մխ', - 64285 => 'יִ', - 64287 => 'ײַ', - 64288 => 'ע', - 64289 => 'א', - 64290 => 'ד', - 64291 => 'ה', - 64292 => 'כ', - 64293 => 'ל', - 64294 => 'ם', - 64295 => 'ר', - 64296 => 'ת', - 64298 => 'שׁ', - 64299 => 'שׂ', - 64300 => 'שּׁ', - 64301 => 'שּׂ', - 64302 => 'אַ', - 64303 => 'אָ', - 64304 => 'אּ', - 64305 => 'בּ', - 64306 => 'גּ', - 64307 => 'דּ', - 64308 => 'הּ', - 64309 => 'וּ', - 64310 => 'זּ', - 64312 => 'טּ', - 64313 => 'יּ', - 64314 => 'ךּ', - 64315 => 'כּ', - 64316 => 'לּ', - 64318 => 'מּ', - 64320 => 'נּ', - 64321 => 'סּ', - 64323 => 'ףּ', - 64324 => 'פּ', - 64326 => 'צּ', - 64327 => 'קּ', - 64328 => 'רּ', - 64329 => 'שּ', - 64330 => 'תּ', - 64331 => 'וֹ', - 64332 => 'בֿ', - 64333 => 'כֿ', - 64334 => 'פֿ', - 64335 => 'אל', - 64336 => 'ٱ', - 64337 => 'ٱ', - 64338 => 'ٻ', - 64339 => 'ٻ', - 64340 => 'ٻ', - 64341 => 'ٻ', - 64342 => 'پ', - 64343 => 'پ', - 64344 => 'پ', - 64345 => 'پ', - 64346 => 'ڀ', - 64347 => 'ڀ', - 64348 => 'ڀ', - 64349 => 'ڀ', - 64350 => 'ٺ', - 64351 => 'ٺ', - 64352 => 'ٺ', - 64353 => 'ٺ', - 64354 => 'ٿ', - 64355 => 'ٿ', - 64356 => 'ٿ', - 64357 => 'ٿ', - 64358 => 'ٹ', - 64359 => 'ٹ', - 64360 => 'ٹ', - 64361 => 'ٹ', - 64362 => 'ڤ', - 64363 => 'ڤ', - 64364 => 'ڤ', - 64365 => 'ڤ', - 64366 => 'ڦ', - 64367 => 'ڦ', - 64368 => 'ڦ', - 64369 => 'ڦ', - 64370 => 'ڄ', - 64371 => 'ڄ', - 64372 => 'ڄ', - 64373 => 'ڄ', - 64374 => 'ڃ', - 64375 => 'ڃ', - 64376 => 'ڃ', - 64377 => 'ڃ', - 64378 => 'چ', - 64379 => 'چ', - 64380 => 'چ', - 64381 => 'چ', - 64382 => 'ڇ', - 64383 => 'ڇ', - 64384 => 'ڇ', - 64385 => 'ڇ', - 64386 => 'ڍ', - 64387 => 'ڍ', - 64388 => 'ڌ', - 64389 => 'ڌ', - 64390 => 'ڎ', - 64391 => 'ڎ', - 64392 => 'ڈ', - 64393 => 'ڈ', - 64394 => 'ژ', - 64395 => 'ژ', - 64396 => 'ڑ', - 64397 => 'ڑ', - 64398 => 'ک', - 64399 => 'ک', - 64400 => 'ک', - 64401 => 'ک', - 64402 => 'گ', - 64403 => 'گ', - 64404 => 'گ', - 64405 => 'گ', - 64406 => 'ڳ', - 64407 => 'ڳ', - 64408 => 'ڳ', - 64409 => 'ڳ', - 64410 => 'ڱ', - 64411 => 'ڱ', - 64412 => 'ڱ', - 64413 => 'ڱ', - 64414 => 'ں', - 64415 => 'ں', - 64416 => 'ڻ', - 64417 => 'ڻ', - 64418 => 'ڻ', - 64419 => 'ڻ', - 64420 => 'ۀ', - 64421 => 'ۀ', - 64422 => 'ہ', - 64423 => 'ہ', - 64424 => 'ہ', - 64425 => 'ہ', - 64426 => 'ھ', - 64427 => 'ھ', - 64428 => 'ھ', - 64429 => 'ھ', - 64430 => 'ے', - 64431 => 'ے', - 64432 => 'ۓ', - 64433 => 'ۓ', - 64467 => 'ڭ', - 64468 => 'ڭ', - 64469 => 'ڭ', - 64470 => 'ڭ', - 64471 => 'ۇ', - 64472 => 'ۇ', - 64473 => 'ۆ', - 64474 => 'ۆ', - 64475 => 'ۈ', - 64476 => 'ۈ', - 64477 => 'ۇٴ', - 64478 => 'ۋ', - 64479 => 'ۋ', - 64480 => 'ۅ', - 64481 => 'ۅ', - 64482 => 'ۉ', - 64483 => 'ۉ', - 64484 => 'ې', - 64485 => 'ې', - 64486 => 'ې', - 64487 => 'ې', - 64488 => 'ى', - 64489 => 'ى', - 64490 => 'ئا', - 64491 => 'ئا', - 64492 => 'ئە', - 64493 => 'ئە', - 64494 => 'ئو', - 64495 => 'ئو', - 64496 => 'ئۇ', - 64497 => 'ئۇ', - 64498 => 'ئۆ', - 64499 => 'ئۆ', - 64500 => 'ئۈ', - 64501 => 'ئۈ', - 64502 => 'ئې', - 64503 => 'ئې', - 64504 => 'ئې', - 64505 => 'ئى', - 64506 => 'ئى', - 64507 => 'ئى', - 64508 => 'ی', - 64509 => 'ی', - 64510 => 'ی', - 64511 => 'ی', - 64512 => 'ئج', - 64513 => 'ئح', - 64514 => 'ئم', - 64515 => 'ئى', - 64516 => 'ئي', - 64517 => 'بج', - 64518 => 'بح', - 64519 => 'بخ', - 64520 => 'بم', - 64521 => 'بى', - 64522 => 'بي', - 64523 => 'تج', - 64524 => 'تح', - 64525 => 'تخ', - 64526 => 'تم', - 64527 => 'تى', - 64528 => 'تي', - 64529 => 'ثج', - 64530 => 'ثم', - 64531 => 'ثى', - 64532 => 'ثي', - 64533 => 'جح', - 64534 => 'جم', - 64535 => 'حج', - 64536 => 'حم', - 64537 => 'خج', - 64538 => 'خح', - 64539 => 'خم', - 64540 => 'سج', - 64541 => 'سح', - 64542 => 'سخ', - 64543 => 'سم', - 64544 => 'صح', - 64545 => 'صم', - 64546 => 'ضج', - 64547 => 'ضح', - 64548 => 'ضخ', - 64549 => 'ضم', - 64550 => 'طح', - 64551 => 'طم', - 64552 => 'ظم', - 64553 => 'عج', - 64554 => 'عم', - 64555 => 'غج', - 64556 => 'غم', - 64557 => 'فج', - 64558 => 'فح', - 64559 => 'فخ', - 64560 => 'فم', - 64561 => 'فى', - 64562 => 'في', - 64563 => 'قح', - 64564 => 'قم', - 64565 => 'قى', - 64566 => 'قي', - 64567 => 'كا', - 64568 => 'كج', - 64569 => 'كح', - 64570 => 'كخ', - 64571 => 'كل', - 64572 => 'كم', - 64573 => 'كى', - 64574 => 'كي', - 64575 => 'لج', - 64576 => 'لح', - 64577 => 'لخ', - 64578 => 'لم', - 64579 => 'لى', - 64580 => 'لي', - 64581 => 'مج', - 64582 => 'مح', - 64583 => 'مخ', - 64584 => 'مم', - 64585 => 'مى', - 64586 => 'مي', - 64587 => 'نج', - 64588 => 'نح', - 64589 => 'نخ', - 64590 => 'نم', - 64591 => 'نى', - 64592 => 'ني', - 64593 => 'هج', - 64594 => 'هم', - 64595 => 'هى', - 64596 => 'هي', - 64597 => 'يج', - 64598 => 'يح', - 64599 => 'يخ', - 64600 => 'يم', - 64601 => 'يى', - 64602 => 'يي', - 64603 => 'ذٰ', - 64604 => 'رٰ', - 64605 => 'ىٰ', - 64612 => 'ئر', - 64613 => 'ئز', - 64614 => 'ئم', - 64615 => 'ئن', - 64616 => 'ئى', - 64617 => 'ئي', - 64618 => 'بر', - 64619 => 'بز', - 64620 => 'بم', - 64621 => 'بن', - 64622 => 'بى', - 64623 => 'بي', - 64624 => 'تر', - 64625 => 'تز', - 64626 => 'تم', - 64627 => 'تن', - 64628 => 'تى', - 64629 => 'تي', - 64630 => 'ثر', - 64631 => 'ثز', - 64632 => 'ثم', - 64633 => 'ثن', - 64634 => 'ثى', - 64635 => 'ثي', - 64636 => 'فى', - 64637 => 'في', - 64638 => 'قى', - 64639 => 'قي', - 64640 => 'كا', - 64641 => 'كل', - 64642 => 'كم', - 64643 => 'كى', - 64644 => 'كي', - 64645 => 'لم', - 64646 => 'لى', - 64647 => 'لي', - 64648 => 'ما', - 64649 => 'مم', - 64650 => 'نر', - 64651 => 'نز', - 64652 => 'نم', - 64653 => 'نن', - 64654 => 'نى', - 64655 => 'ني', - 64656 => 'ىٰ', - 64657 => 'ير', - 64658 => 'يز', - 64659 => 'يم', - 64660 => 'ين', - 64661 => 'يى', - 64662 => 'يي', - 64663 => 'ئج', - 64664 => 'ئح', - 64665 => 'ئخ', - 64666 => 'ئم', - 64667 => 'ئه', - 64668 => 'بج', - 64669 => 'بح', - 64670 => 'بخ', - 64671 => 'بم', - 64672 => 'به', - 64673 => 'تج', - 64674 => 'تح', - 64675 => 'تخ', - 64676 => 'تم', - 64677 => 'ته', - 64678 => 'ثم', - 64679 => 'جح', - 64680 => 'جم', - 64681 => 'حج', - 64682 => 'حم', - 64683 => 'خج', - 64684 => 'خم', - 64685 => 'سج', - 64686 => 'سح', - 64687 => 'سخ', - 64688 => 'سم', - 64689 => 'صح', - 64690 => 'صخ', - 64691 => 'صم', - 64692 => 'ضج', - 64693 => 'ضح', - 64694 => 'ضخ', - 64695 => 'ضم', - 64696 => 'طح', - 64697 => 'ظم', - 64698 => 'عج', - 64699 => 'عم', - 64700 => 'غج', - 64701 => 'غم', - 64702 => 'فج', - 64703 => 'فح', - 64704 => 'فخ', - 64705 => 'فم', - 64706 => 'قح', - 64707 => 'قم', - 64708 => 'كج', - 64709 => 'كح', - 64710 => 'كخ', - 64711 => 'كل', - 64712 => 'كم', - 64713 => 'لج', - 64714 => 'لح', - 64715 => 'لخ', - 64716 => 'لم', - 64717 => 'له', - 64718 => 'مج', - 64719 => 'مح', - 64720 => 'مخ', - 64721 => 'مم', - 64722 => 'نج', - 64723 => 'نح', - 64724 => 'نخ', - 64725 => 'نم', - 64726 => 'نه', - 64727 => 'هج', - 64728 => 'هم', - 64729 => 'هٰ', - 64730 => 'يج', - 64731 => 'يح', - 64732 => 'يخ', - 64733 => 'يم', - 64734 => 'يه', - 64735 => 'ئم', - 64736 => 'ئه', - 64737 => 'بم', - 64738 => 'به', - 64739 => 'تم', - 64740 => 'ته', - 64741 => 'ثم', - 64742 => 'ثه', - 64743 => 'سم', - 64744 => 'سه', - 64745 => 'شم', - 64746 => 'شه', - 64747 => 'كل', - 64748 => 'كم', - 64749 => 'لم', - 64750 => 'نم', - 64751 => 'نه', - 64752 => 'يم', - 64753 => 'يه', - 64754 => 'ـَّ', - 64755 => 'ـُّ', - 64756 => 'ـِّ', - 64757 => 'طى', - 64758 => 'طي', - 64759 => 'عى', - 64760 => 'عي', - 64761 => 'غى', - 64762 => 'غي', - 64763 => 'سى', - 64764 => 'سي', - 64765 => 'شى', - 64766 => 'شي', - 64767 => 'حى', - 64768 => 'حي', - 64769 => 'جى', - 64770 => 'جي', - 64771 => 'خى', - 64772 => 'خي', - 64773 => 'صى', - 64774 => 'صي', - 64775 => 'ضى', - 64776 => 'ضي', - 64777 => 'شج', - 64778 => 'شح', - 64779 => 'شخ', - 64780 => 'شم', - 64781 => 'شر', - 64782 => 'سر', - 64783 => 'صر', - 64784 => 'ضر', - 64785 => 'طى', - 64786 => 'طي', - 64787 => 'عى', - 64788 => 'عي', - 64789 => 'غى', - 64790 => 'غي', - 64791 => 'سى', - 64792 => 'سي', - 64793 => 'شى', - 64794 => 'شي', - 64795 => 'حى', - 64796 => 'حي', - 64797 => 'جى', - 64798 => 'جي', - 64799 => 'خى', - 64800 => 'خي', - 64801 => 'صى', - 64802 => 'صي', - 64803 => 'ضى', - 64804 => 'ضي', - 64805 => 'شج', - 64806 => 'شح', - 64807 => 'شخ', - 64808 => 'شم', - 64809 => 'شر', - 64810 => 'سر', - 64811 => 'صر', - 64812 => 'ضر', - 64813 => 'شج', - 64814 => 'شح', - 64815 => 'شخ', - 64816 => 'شم', - 64817 => 'سه', - 64818 => 'شه', - 64819 => 'طم', - 64820 => 'سج', - 64821 => 'سح', - 64822 => 'سخ', - 64823 => 'شج', - 64824 => 'شح', - 64825 => 'شخ', - 64826 => 'طم', - 64827 => 'ظم', - 64828 => 'اً', - 64829 => 'اً', - 64848 => 'تجم', - 64849 => 'تحج', - 64850 => 'تحج', - 64851 => 'تحم', - 64852 => 'تخم', - 64853 => 'تمج', - 64854 => 'تمح', - 64855 => 'تمخ', - 64856 => 'جمح', - 64857 => 'جمح', - 64858 => 'حمي', - 64859 => 'حمى', - 64860 => 'سحج', - 64861 => 'سجح', - 64862 => 'سجى', - 64863 => 'سمح', - 64864 => 'سمح', - 64865 => 'سمج', - 64866 => 'سمم', - 64867 => 'سمم', - 64868 => 'صحح', - 64869 => 'صحح', - 64870 => 'صمم', - 64871 => 'شحم', - 64872 => 'شحم', - 64873 => 'شجي', - 64874 => 'شمخ', - 64875 => 'شمخ', - 64876 => 'شمم', - 64877 => 'شمم', - 64878 => 'ضحى', - 64879 => 'ضخم', - 64880 => 'ضخم', - 64881 => 'طمح', - 64882 => 'طمح', - 64883 => 'طمم', - 64884 => 'طمي', - 64885 => 'عجم', - 64886 => 'عمم', - 64887 => 'عمم', - 64888 => 'عمى', - 64889 => 'غمم', - 64890 => 'غمي', - 64891 => 'غمى', - 64892 => 'فخم', - 64893 => 'فخم', - 64894 => 'قمح', - 64895 => 'قمم', - 64896 => 'لحم', - 64897 => 'لحي', - 64898 => 'لحى', - 64899 => 'لجج', - 64900 => 'لجج', - 64901 => 'لخم', - 64902 => 'لخم', - 64903 => 'لمح', - 64904 => 'لمح', - 64905 => 'محج', - 64906 => 'محم', - 64907 => 'محي', - 64908 => 'مجح', - 64909 => 'مجم', - 64910 => 'مخج', - 64911 => 'مخم', - 64914 => 'مجخ', - 64915 => 'همج', - 64916 => 'همم', - 64917 => 'نحم', - 64918 => 'نحى', - 64919 => 'نجم', - 64920 => 'نجم', - 64921 => 'نجى', - 64922 => 'نمي', - 64923 => 'نمى', - 64924 => 'يمم', - 64925 => 'يمم', - 64926 => 'بخي', - 64927 => 'تجي', - 64928 => 'تجى', - 64929 => 'تخي', - 64930 => 'تخى', - 64931 => 'تمي', - 64932 => 'تمى', - 64933 => 'جمي', - 64934 => 'جحى', - 64935 => 'جمى', - 64936 => 'سخى', - 64937 => 'صحي', - 64938 => 'شحي', - 64939 => 'ضحي', - 64940 => 'لجي', - 64941 => 'لمي', - 64942 => 'يحي', - 64943 => 'يجي', - 64944 => 'يمي', - 64945 => 'ممي', - 64946 => 'قمي', - 64947 => 'نحي', - 64948 => 'قمح', - 64949 => 'لحم', - 64950 => 'عمي', - 64951 => 'كمي', - 64952 => 'نجح', - 64953 => 'مخي', - 64954 => 'لجم', - 64955 => 'كمم', - 64956 => 'لجم', - 64957 => 'نجح', - 64958 => 'جحي', - 64959 => 'حجي', - 64960 => 'مجي', - 64961 => 'فمي', - 64962 => 'بحي', - 64963 => 'كمم', - 64964 => 'عجم', - 64965 => 'صمم', - 64966 => 'سخي', - 64967 => 'نجي', - 65008 => 'صلے', - 65009 => 'قلے', - 65010 => 'الله', - 65011 => 'اكبر', - 65012 => 'محمد', - 65013 => 'صلعم', - 65014 => 'رسول', - 65015 => 'عليه', - 65016 => 'وسلم', - 65017 => 'صلى', - 65020 => 'ریال', - 65041 => '、', - 65047 => '〖', - 65048 => '〗', - 65073 => '—', - 65074 => '–', - 65081 => '〔', - 65082 => '〕', - 65083 => '【', - 65084 => '】', - 65085 => '《', - 65086 => '》', - 65087 => '〈', - 65088 => '〉', - 65089 => '「', - 65090 => '」', - 65091 => '『', - 65092 => '』', - 65105 => '、', - 65112 => '—', - 65117 => '〔', - 65118 => '〕', - 65123 => '-', - 65137 => 'ـً', - 65143 => 'ـَ', - 65145 => 'ـُ', - 65147 => 'ـِ', - 65149 => 'ـّ', - 65151 => 'ـْ', - 65152 => 'ء', - 65153 => 'آ', - 65154 => 'آ', - 65155 => 'أ', - 65156 => 'أ', - 65157 => 'ؤ', - 65158 => 'ؤ', - 65159 => 'إ', - 65160 => 'إ', - 65161 => 'ئ', - 65162 => 'ئ', - 65163 => 'ئ', - 65164 => 'ئ', - 65165 => 'ا', - 65166 => 'ا', - 65167 => 'ب', - 65168 => 'ب', - 65169 => 'ب', - 65170 => 'ب', - 65171 => 'ة', - 65172 => 'ة', - 65173 => 'ت', - 65174 => 'ت', - 65175 => 'ت', - 65176 => 'ت', - 65177 => 'ث', - 65178 => 'ث', - 65179 => 'ث', - 65180 => 'ث', - 65181 => 'ج', - 65182 => 'ج', - 65183 => 'ج', - 65184 => 'ج', - 65185 => 'ح', - 65186 => 'ح', - 65187 => 'ح', - 65188 => 'ح', - 65189 => 'خ', - 65190 => 'خ', - 65191 => 'خ', - 65192 => 'خ', - 65193 => 'د', - 65194 => 'د', - 65195 => 'ذ', - 65196 => 'ذ', - 65197 => 'ر', - 65198 => 'ر', - 65199 => 'ز', - 65200 => 'ز', - 65201 => 'س', - 65202 => 'س', - 65203 => 'س', - 65204 => 'س', - 65205 => 'ش', - 65206 => 'ش', - 65207 => 'ش', - 65208 => 'ش', - 65209 => 'ص', - 65210 => 'ص', - 65211 => 'ص', - 65212 => 'ص', - 65213 => 'ض', - 65214 => 'ض', - 65215 => 'ض', - 65216 => 'ض', - 65217 => 'ط', - 65218 => 'ط', - 65219 => 'ط', - 65220 => 'ط', - 65221 => 'ظ', - 65222 => 'ظ', - 65223 => 'ظ', - 65224 => 'ظ', - 65225 => 'ع', - 65226 => 'ع', - 65227 => 'ع', - 65228 => 'ع', - 65229 => 'غ', - 65230 => 'غ', - 65231 => 'غ', - 65232 => 'غ', - 65233 => 'ف', - 65234 => 'ف', - 65235 => 'ف', - 65236 => 'ف', - 65237 => 'ق', - 65238 => 'ق', - 65239 => 'ق', - 65240 => 'ق', - 65241 => 'ك', - 65242 => 'ك', - 65243 => 'ك', - 65244 => 'ك', - 65245 => 'ل', - 65246 => 'ل', - 65247 => 'ل', - 65248 => 'ل', - 65249 => 'م', - 65250 => 'م', - 65251 => 'م', - 65252 => 'م', - 65253 => 'ن', - 65254 => 'ن', - 65255 => 'ن', - 65256 => 'ن', - 65257 => 'ه', - 65258 => 'ه', - 65259 => 'ه', - 65260 => 'ه', - 65261 => 'و', - 65262 => 'و', - 65263 => 'ى', - 65264 => 'ى', - 65265 => 'ي', - 65266 => 'ي', - 65267 => 'ي', - 65268 => 'ي', - 65269 => 'لآ', - 65270 => 'لآ', - 65271 => 'لأ', - 65272 => 'لأ', - 65273 => 'لإ', - 65274 => 'لإ', - 65275 => 'لا', - 65276 => 'لا', - 65293 => '-', - 65294 => '.', - 65296 => '0', - 65297 => '1', - 65298 => '2', - 65299 => '3', - 65300 => '4', - 65301 => '5', - 65302 => '6', - 65303 => '7', - 65304 => '8', - 65305 => '9', - 65313 => 'a', - 65314 => 'b', - 65315 => 'c', - 65316 => 'd', - 65317 => 'e', - 65318 => 'f', - 65319 => 'g', - 65320 => 'h', - 65321 => 'i', - 65322 => 'j', - 65323 => 'k', - 65324 => 'l', - 65325 => 'm', - 65326 => 'n', - 65327 => 'o', - 65328 => 'p', - 65329 => 'q', - 65330 => 'r', - 65331 => 's', - 65332 => 't', - 65333 => 'u', - 65334 => 'v', - 65335 => 'w', - 65336 => 'x', - 65337 => 'y', - 65338 => 'z', - 65345 => 'a', - 65346 => 'b', - 65347 => 'c', - 65348 => 'd', - 65349 => 'e', - 65350 => 'f', - 65351 => 'g', - 65352 => 'h', - 65353 => 'i', - 65354 => 'j', - 65355 => 'k', - 65356 => 'l', - 65357 => 'm', - 65358 => 'n', - 65359 => 'o', - 65360 => 'p', - 65361 => 'q', - 65362 => 'r', - 65363 => 's', - 65364 => 't', - 65365 => 'u', - 65366 => 'v', - 65367 => 'w', - 65368 => 'x', - 65369 => 'y', - 65370 => 'z', - 65375 => '⦅', - 65376 => '⦆', - 65377 => '.', - 65378 => '「', - 65379 => '」', - 65380 => '、', - 65381 => '・', - 65382 => 'ヲ', - 65383 => 'ァ', - 65384 => 'ィ', - 65385 => 'ゥ', - 65386 => 'ェ', - 65387 => 'ォ', - 65388 => 'ャ', - 65389 => 'ュ', - 65390 => 'ョ', - 65391 => 'ッ', - 65392 => 'ー', - 65393 => 'ア', - 65394 => 'イ', - 65395 => 'ウ', - 65396 => 'エ', - 65397 => 'オ', - 65398 => 'カ', - 65399 => 'キ', - 65400 => 'ク', - 65401 => 'ケ', - 65402 => 'コ', - 65403 => 'サ', - 65404 => 'シ', - 65405 => 'ス', - 65406 => 'セ', - 65407 => 'ソ', - 65408 => 'タ', - 65409 => 'チ', - 65410 => 'ツ', - 65411 => 'テ', - 65412 => 'ト', - 65413 => 'ナ', - 65414 => 'ニ', - 65415 => 'ヌ', - 65416 => 'ネ', - 65417 => 'ノ', - 65418 => 'ハ', - 65419 => 'ヒ', - 65420 => 'フ', - 65421 => 'ヘ', - 65422 => 'ホ', - 65423 => 'マ', - 65424 => 'ミ', - 65425 => 'ム', - 65426 => 'メ', - 65427 => 'モ', - 65428 => 'ヤ', - 65429 => 'ユ', - 65430 => 'ヨ', - 65431 => 'ラ', - 65432 => 'リ', - 65433 => 'ル', - 65434 => 'レ', - 65435 => 'ロ', - 65436 => 'ワ', - 65437 => 'ン', - 65438 => '゙', - 65439 => '゚', - 65441 => 'ᄀ', - 65442 => 'ᄁ', - 65443 => 'ᆪ', - 65444 => 'ᄂ', - 65445 => 'ᆬ', - 65446 => 'ᆭ', - 65447 => 'ᄃ', - 65448 => 'ᄄ', - 65449 => 'ᄅ', - 65450 => 'ᆰ', - 65451 => 'ᆱ', - 65452 => 'ᆲ', - 65453 => 'ᆳ', - 65454 => 'ᆴ', - 65455 => 'ᆵ', - 65456 => 'ᄚ', - 65457 => 'ᄆ', - 65458 => 'ᄇ', - 65459 => 'ᄈ', - 65460 => 'ᄡ', - 65461 => 'ᄉ', - 65462 => 'ᄊ', - 65463 => 'ᄋ', - 65464 => 'ᄌ', - 65465 => 'ᄍ', - 65466 => 'ᄎ', - 65467 => 'ᄏ', - 65468 => 'ᄐ', - 65469 => 'ᄑ', - 65470 => 'ᄒ', - 65474 => 'ᅡ', - 65475 => 'ᅢ', - 65476 => 'ᅣ', - 65477 => 'ᅤ', - 65478 => 'ᅥ', - 65479 => 'ᅦ', - 65482 => 'ᅧ', - 65483 => 'ᅨ', - 65484 => 'ᅩ', - 65485 => 'ᅪ', - 65486 => 'ᅫ', - 65487 => 'ᅬ', - 65490 => 'ᅭ', - 65491 => 'ᅮ', - 65492 => 'ᅯ', - 65493 => 'ᅰ', - 65494 => 'ᅱ', - 65495 => 'ᅲ', - 65498 => 'ᅳ', - 65499 => 'ᅴ', - 65500 => 'ᅵ', - 65504 => '¢', - 65505 => '£', - 65506 => '¬', - 65508 => '¦', - 65509 => '¥', - 65510 => '₩', - 65512 => '│', - 65513 => '←', - 65514 => '↑', - 65515 => '→', - 65516 => '↓', - 65517 => '■', - 65518 => '○', - 66560 => '𐐨', - 66561 => '𐐩', - 66562 => '𐐪', - 66563 => '𐐫', - 66564 => '𐐬', - 66565 => '𐐭', - 66566 => '𐐮', - 66567 => '𐐯', - 66568 => '𐐰', - 66569 => '𐐱', - 66570 => '𐐲', - 66571 => '𐐳', - 66572 => '𐐴', - 66573 => '𐐵', - 66574 => '𐐶', - 66575 => '𐐷', - 66576 => '𐐸', - 66577 => '𐐹', - 66578 => '𐐺', - 66579 => '𐐻', - 66580 => '𐐼', - 66581 => '𐐽', - 66582 => '𐐾', - 66583 => '𐐿', - 66584 => '𐑀', - 66585 => '𐑁', - 66586 => '𐑂', - 66587 => '𐑃', - 66588 => '𐑄', - 66589 => '𐑅', - 66590 => '𐑆', - 66591 => '𐑇', - 66592 => '𐑈', - 66593 => '𐑉', - 66594 => '𐑊', - 66595 => '𐑋', - 66596 => '𐑌', - 66597 => '𐑍', - 66598 => '𐑎', - 66599 => '𐑏', - 66736 => '𐓘', - 66737 => '𐓙', - 66738 => '𐓚', - 66739 => '𐓛', - 66740 => '𐓜', - 66741 => '𐓝', - 66742 => '𐓞', - 66743 => '𐓟', - 66744 => '𐓠', - 66745 => '𐓡', - 66746 => '𐓢', - 66747 => '𐓣', - 66748 => '𐓤', - 66749 => '𐓥', - 66750 => '𐓦', - 66751 => '𐓧', - 66752 => '𐓨', - 66753 => '𐓩', - 66754 => '𐓪', - 66755 => '𐓫', - 66756 => '𐓬', - 66757 => '𐓭', - 66758 => '𐓮', - 66759 => '𐓯', - 66760 => '𐓰', - 66761 => '𐓱', - 66762 => '𐓲', - 66763 => '𐓳', - 66764 => '𐓴', - 66765 => '𐓵', - 66766 => '𐓶', - 66767 => '𐓷', - 66768 => '𐓸', - 66769 => '𐓹', - 66770 => '𐓺', - 66771 => '𐓻', - 68736 => '𐳀', - 68737 => '𐳁', - 68738 => '𐳂', - 68739 => '𐳃', - 68740 => '𐳄', - 68741 => '𐳅', - 68742 => '𐳆', - 68743 => '𐳇', - 68744 => '𐳈', - 68745 => '𐳉', - 68746 => '𐳊', - 68747 => '𐳋', - 68748 => '𐳌', - 68749 => '𐳍', - 68750 => '𐳎', - 68751 => '𐳏', - 68752 => '𐳐', - 68753 => '𐳑', - 68754 => '𐳒', - 68755 => '𐳓', - 68756 => '𐳔', - 68757 => '𐳕', - 68758 => '𐳖', - 68759 => '𐳗', - 68760 => '𐳘', - 68761 => '𐳙', - 68762 => '𐳚', - 68763 => '𐳛', - 68764 => '𐳜', - 68765 => '𐳝', - 68766 => '𐳞', - 68767 => '𐳟', - 68768 => '𐳠', - 68769 => '𐳡', - 68770 => '𐳢', - 68771 => '𐳣', - 68772 => '𐳤', - 68773 => '𐳥', - 68774 => '𐳦', - 68775 => '𐳧', - 68776 => '𐳨', - 68777 => '𐳩', - 68778 => '𐳪', - 68779 => '𐳫', - 68780 => '𐳬', - 68781 => '𐳭', - 68782 => '𐳮', - 68783 => '𐳯', - 68784 => '𐳰', - 68785 => '𐳱', - 68786 => '𐳲', - 71840 => '𑣀', - 71841 => '𑣁', - 71842 => '𑣂', - 71843 => '𑣃', - 71844 => '𑣄', - 71845 => '𑣅', - 71846 => '𑣆', - 71847 => '𑣇', - 71848 => '𑣈', - 71849 => '𑣉', - 71850 => '𑣊', - 71851 => '𑣋', - 71852 => '𑣌', - 71853 => '𑣍', - 71854 => '𑣎', - 71855 => '𑣏', - 71856 => '𑣐', - 71857 => '𑣑', - 71858 => '𑣒', - 71859 => '𑣓', - 71860 => '𑣔', - 71861 => '𑣕', - 71862 => '𑣖', - 71863 => '𑣗', - 71864 => '𑣘', - 71865 => '𑣙', - 71866 => '𑣚', - 71867 => '𑣛', - 71868 => '𑣜', - 71869 => '𑣝', - 71870 => '𑣞', - 71871 => '𑣟', - 93760 => '𖹠', - 93761 => '𖹡', - 93762 => '𖹢', - 93763 => '𖹣', - 93764 => '𖹤', - 93765 => '𖹥', - 93766 => '𖹦', - 93767 => '𖹧', - 93768 => '𖹨', - 93769 => '𖹩', - 93770 => '𖹪', - 93771 => '𖹫', - 93772 => '𖹬', - 93773 => '𖹭', - 93774 => '𖹮', - 93775 => '𖹯', - 93776 => '𖹰', - 93777 => '𖹱', - 93778 => '𖹲', - 93779 => '𖹳', - 93780 => '𖹴', - 93781 => '𖹵', - 93782 => '𖹶', - 93783 => '𖹷', - 93784 => '𖹸', - 93785 => '𖹹', - 93786 => '𖹺', - 93787 => '𖹻', - 93788 => '𖹼', - 93789 => '𖹽', - 93790 => '𖹾', - 93791 => '𖹿', - 119134 => '𝅗𝅥', - 119135 => '𝅘𝅥', - 119136 => '𝅘𝅥𝅮', - 119137 => '𝅘𝅥𝅯', - 119138 => '𝅘𝅥𝅰', - 119139 => '𝅘𝅥𝅱', - 119140 => '𝅘𝅥𝅲', - 119227 => '𝆹𝅥', - 119228 => '𝆺𝅥', - 119229 => '𝆹𝅥𝅮', - 119230 => '𝆺𝅥𝅮', - 119231 => '𝆹𝅥𝅯', - 119232 => '𝆺𝅥𝅯', - 119808 => 'a', - 119809 => 'b', - 119810 => 'c', - 119811 => 'd', - 119812 => 'e', - 119813 => 'f', - 119814 => 'g', - 119815 => 'h', - 119816 => 'i', - 119817 => 'j', - 119818 => 'k', - 119819 => 'l', - 119820 => 'm', - 119821 => 'n', - 119822 => 'o', - 119823 => 'p', - 119824 => 'q', - 119825 => 'r', - 119826 => 's', - 119827 => 't', - 119828 => 'u', - 119829 => 'v', - 119830 => 'w', - 119831 => 'x', - 119832 => 'y', - 119833 => 'z', - 119834 => 'a', - 119835 => 'b', - 119836 => 'c', - 119837 => 'd', - 119838 => 'e', - 119839 => 'f', - 119840 => 'g', - 119841 => 'h', - 119842 => 'i', - 119843 => 'j', - 119844 => 'k', - 119845 => 'l', - 119846 => 'm', - 119847 => 'n', - 119848 => 'o', - 119849 => 'p', - 119850 => 'q', - 119851 => 'r', - 119852 => 's', - 119853 => 't', - 119854 => 'u', - 119855 => 'v', - 119856 => 'w', - 119857 => 'x', - 119858 => 'y', - 119859 => 'z', - 119860 => 'a', - 119861 => 'b', - 119862 => 'c', - 119863 => 'd', - 119864 => 'e', - 119865 => 'f', - 119866 => 'g', - 119867 => 'h', - 119868 => 'i', - 119869 => 'j', - 119870 => 'k', - 119871 => 'l', - 119872 => 'm', - 119873 => 'n', - 119874 => 'o', - 119875 => 'p', - 119876 => 'q', - 119877 => 'r', - 119878 => 's', - 119879 => 't', - 119880 => 'u', - 119881 => 'v', - 119882 => 'w', - 119883 => 'x', - 119884 => 'y', - 119885 => 'z', - 119886 => 'a', - 119887 => 'b', - 119888 => 'c', - 119889 => 'd', - 119890 => 'e', - 119891 => 'f', - 119892 => 'g', - 119894 => 'i', - 119895 => 'j', - 119896 => 'k', - 119897 => 'l', - 119898 => 'm', - 119899 => 'n', - 119900 => 'o', - 119901 => 'p', - 119902 => 'q', - 119903 => 'r', - 119904 => 's', - 119905 => 't', - 119906 => 'u', - 119907 => 'v', - 119908 => 'w', - 119909 => 'x', - 119910 => 'y', - 119911 => 'z', - 119912 => 'a', - 119913 => 'b', - 119914 => 'c', - 119915 => 'd', - 119916 => 'e', - 119917 => 'f', - 119918 => 'g', - 119919 => 'h', - 119920 => 'i', - 119921 => 'j', - 119922 => 'k', - 119923 => 'l', - 119924 => 'm', - 119925 => 'n', - 119926 => 'o', - 119927 => 'p', - 119928 => 'q', - 119929 => 'r', - 119930 => 's', - 119931 => 't', - 119932 => 'u', - 119933 => 'v', - 119934 => 'w', - 119935 => 'x', - 119936 => 'y', - 119937 => 'z', - 119938 => 'a', - 119939 => 'b', - 119940 => 'c', - 119941 => 'd', - 119942 => 'e', - 119943 => 'f', - 119944 => 'g', - 119945 => 'h', - 119946 => 'i', - 119947 => 'j', - 119948 => 'k', - 119949 => 'l', - 119950 => 'm', - 119951 => 'n', - 119952 => 'o', - 119953 => 'p', - 119954 => 'q', - 119955 => 'r', - 119956 => 's', - 119957 => 't', - 119958 => 'u', - 119959 => 'v', - 119960 => 'w', - 119961 => 'x', - 119962 => 'y', - 119963 => 'z', - 119964 => 'a', - 119966 => 'c', - 119967 => 'd', - 119970 => 'g', - 119973 => 'j', - 119974 => 'k', - 119977 => 'n', - 119978 => 'o', - 119979 => 'p', - 119980 => 'q', - 119982 => 's', - 119983 => 't', - 119984 => 'u', - 119985 => 'v', - 119986 => 'w', - 119987 => 'x', - 119988 => 'y', - 119989 => 'z', - 119990 => 'a', - 119991 => 'b', - 119992 => 'c', - 119993 => 'd', - 119995 => 'f', - 119997 => 'h', - 119998 => 'i', - 119999 => 'j', - 120000 => 'k', - 120001 => 'l', - 120002 => 'm', - 120003 => 'n', - 120005 => 'p', - 120006 => 'q', - 120007 => 'r', - 120008 => 's', - 120009 => 't', - 120010 => 'u', - 120011 => 'v', - 120012 => 'w', - 120013 => 'x', - 120014 => 'y', - 120015 => 'z', - 120016 => 'a', - 120017 => 'b', - 120018 => 'c', - 120019 => 'd', - 120020 => 'e', - 120021 => 'f', - 120022 => 'g', - 120023 => 'h', - 120024 => 'i', - 120025 => 'j', - 120026 => 'k', - 120027 => 'l', - 120028 => 'm', - 120029 => 'n', - 120030 => 'o', - 120031 => 'p', - 120032 => 'q', - 120033 => 'r', - 120034 => 's', - 120035 => 't', - 120036 => 'u', - 120037 => 'v', - 120038 => 'w', - 120039 => 'x', - 120040 => 'y', - 120041 => 'z', - 120042 => 'a', - 120043 => 'b', - 120044 => 'c', - 120045 => 'd', - 120046 => 'e', - 120047 => 'f', - 120048 => 'g', - 120049 => 'h', - 120050 => 'i', - 120051 => 'j', - 120052 => 'k', - 120053 => 'l', - 120054 => 'm', - 120055 => 'n', - 120056 => 'o', - 120057 => 'p', - 120058 => 'q', - 120059 => 'r', - 120060 => 's', - 120061 => 't', - 120062 => 'u', - 120063 => 'v', - 120064 => 'w', - 120065 => 'x', - 120066 => 'y', - 120067 => 'z', - 120068 => 'a', - 120069 => 'b', - 120071 => 'd', - 120072 => 'e', - 120073 => 'f', - 120074 => 'g', - 120077 => 'j', - 120078 => 'k', - 120079 => 'l', - 120080 => 'm', - 120081 => 'n', - 120082 => 'o', - 120083 => 'p', - 120084 => 'q', - 120086 => 's', - 120087 => 't', - 120088 => 'u', - 120089 => 'v', - 120090 => 'w', - 120091 => 'x', - 120092 => 'y', - 120094 => 'a', - 120095 => 'b', - 120096 => 'c', - 120097 => 'd', - 120098 => 'e', - 120099 => 'f', - 120100 => 'g', - 120101 => 'h', - 120102 => 'i', - 120103 => 'j', - 120104 => 'k', - 120105 => 'l', - 120106 => 'm', - 120107 => 'n', - 120108 => 'o', - 120109 => 'p', - 120110 => 'q', - 120111 => 'r', - 120112 => 's', - 120113 => 't', - 120114 => 'u', - 120115 => 'v', - 120116 => 'w', - 120117 => 'x', - 120118 => 'y', - 120119 => 'z', - 120120 => 'a', - 120121 => 'b', - 120123 => 'd', - 120124 => 'e', - 120125 => 'f', - 120126 => 'g', - 120128 => 'i', - 120129 => 'j', - 120130 => 'k', - 120131 => 'l', - 120132 => 'm', - 120134 => 'o', - 120138 => 's', - 120139 => 't', - 120140 => 'u', - 120141 => 'v', - 120142 => 'w', - 120143 => 'x', - 120144 => 'y', - 120146 => 'a', - 120147 => 'b', - 120148 => 'c', - 120149 => 'd', - 120150 => 'e', - 120151 => 'f', - 120152 => 'g', - 120153 => 'h', - 120154 => 'i', - 120155 => 'j', - 120156 => 'k', - 120157 => 'l', - 120158 => 'm', - 120159 => 'n', - 120160 => 'o', - 120161 => 'p', - 120162 => 'q', - 120163 => 'r', - 120164 => 's', - 120165 => 't', - 120166 => 'u', - 120167 => 'v', - 120168 => 'w', - 120169 => 'x', - 120170 => 'y', - 120171 => 'z', - 120172 => 'a', - 120173 => 'b', - 120174 => 'c', - 120175 => 'd', - 120176 => 'e', - 120177 => 'f', - 120178 => 'g', - 120179 => 'h', - 120180 => 'i', - 120181 => 'j', - 120182 => 'k', - 120183 => 'l', - 120184 => 'm', - 120185 => 'n', - 120186 => 'o', - 120187 => 'p', - 120188 => 'q', - 120189 => 'r', - 120190 => 's', - 120191 => 't', - 120192 => 'u', - 120193 => 'v', - 120194 => 'w', - 120195 => 'x', - 120196 => 'y', - 120197 => 'z', - 120198 => 'a', - 120199 => 'b', - 120200 => 'c', - 120201 => 'd', - 120202 => 'e', - 120203 => 'f', - 120204 => 'g', - 120205 => 'h', - 120206 => 'i', - 120207 => 'j', - 120208 => 'k', - 120209 => 'l', - 120210 => 'm', - 120211 => 'n', - 120212 => 'o', - 120213 => 'p', - 120214 => 'q', - 120215 => 'r', - 120216 => 's', - 120217 => 't', - 120218 => 'u', - 120219 => 'v', - 120220 => 'w', - 120221 => 'x', - 120222 => 'y', - 120223 => 'z', - 120224 => 'a', - 120225 => 'b', - 120226 => 'c', - 120227 => 'd', - 120228 => 'e', - 120229 => 'f', - 120230 => 'g', - 120231 => 'h', - 120232 => 'i', - 120233 => 'j', - 120234 => 'k', - 120235 => 'l', - 120236 => 'm', - 120237 => 'n', - 120238 => 'o', - 120239 => 'p', - 120240 => 'q', - 120241 => 'r', - 120242 => 's', - 120243 => 't', - 120244 => 'u', - 120245 => 'v', - 120246 => 'w', - 120247 => 'x', - 120248 => 'y', - 120249 => 'z', - 120250 => 'a', - 120251 => 'b', - 120252 => 'c', - 120253 => 'd', - 120254 => 'e', - 120255 => 'f', - 120256 => 'g', - 120257 => 'h', - 120258 => 'i', - 120259 => 'j', - 120260 => 'k', - 120261 => 'l', - 120262 => 'm', - 120263 => 'n', - 120264 => 'o', - 120265 => 'p', - 120266 => 'q', - 120267 => 'r', - 120268 => 's', - 120269 => 't', - 120270 => 'u', - 120271 => 'v', - 120272 => 'w', - 120273 => 'x', - 120274 => 'y', - 120275 => 'z', - 120276 => 'a', - 120277 => 'b', - 120278 => 'c', - 120279 => 'd', - 120280 => 'e', - 120281 => 'f', - 120282 => 'g', - 120283 => 'h', - 120284 => 'i', - 120285 => 'j', - 120286 => 'k', - 120287 => 'l', - 120288 => 'm', - 120289 => 'n', - 120290 => 'o', - 120291 => 'p', - 120292 => 'q', - 120293 => 'r', - 120294 => 's', - 120295 => 't', - 120296 => 'u', - 120297 => 'v', - 120298 => 'w', - 120299 => 'x', - 120300 => 'y', - 120301 => 'z', - 120302 => 'a', - 120303 => 'b', - 120304 => 'c', - 120305 => 'd', - 120306 => 'e', - 120307 => 'f', - 120308 => 'g', - 120309 => 'h', - 120310 => 'i', - 120311 => 'j', - 120312 => 'k', - 120313 => 'l', - 120314 => 'm', - 120315 => 'n', - 120316 => 'o', - 120317 => 'p', - 120318 => 'q', - 120319 => 'r', - 120320 => 's', - 120321 => 't', - 120322 => 'u', - 120323 => 'v', - 120324 => 'w', - 120325 => 'x', - 120326 => 'y', - 120327 => 'z', - 120328 => 'a', - 120329 => 'b', - 120330 => 'c', - 120331 => 'd', - 120332 => 'e', - 120333 => 'f', - 120334 => 'g', - 120335 => 'h', - 120336 => 'i', - 120337 => 'j', - 120338 => 'k', - 120339 => 'l', - 120340 => 'm', - 120341 => 'n', - 120342 => 'o', - 120343 => 'p', - 120344 => 'q', - 120345 => 'r', - 120346 => 's', - 120347 => 't', - 120348 => 'u', - 120349 => 'v', - 120350 => 'w', - 120351 => 'x', - 120352 => 'y', - 120353 => 'z', - 120354 => 'a', - 120355 => 'b', - 120356 => 'c', - 120357 => 'd', - 120358 => 'e', - 120359 => 'f', - 120360 => 'g', - 120361 => 'h', - 120362 => 'i', - 120363 => 'j', - 120364 => 'k', - 120365 => 'l', - 120366 => 'm', - 120367 => 'n', - 120368 => 'o', - 120369 => 'p', - 120370 => 'q', - 120371 => 'r', - 120372 => 's', - 120373 => 't', - 120374 => 'u', - 120375 => 'v', - 120376 => 'w', - 120377 => 'x', - 120378 => 'y', - 120379 => 'z', - 120380 => 'a', - 120381 => 'b', - 120382 => 'c', - 120383 => 'd', - 120384 => 'e', - 120385 => 'f', - 120386 => 'g', - 120387 => 'h', - 120388 => 'i', - 120389 => 'j', - 120390 => 'k', - 120391 => 'l', - 120392 => 'm', - 120393 => 'n', - 120394 => 'o', - 120395 => 'p', - 120396 => 'q', - 120397 => 'r', - 120398 => 's', - 120399 => 't', - 120400 => 'u', - 120401 => 'v', - 120402 => 'w', - 120403 => 'x', - 120404 => 'y', - 120405 => 'z', - 120406 => 'a', - 120407 => 'b', - 120408 => 'c', - 120409 => 'd', - 120410 => 'e', - 120411 => 'f', - 120412 => 'g', - 120413 => 'h', - 120414 => 'i', - 120415 => 'j', - 120416 => 'k', - 120417 => 'l', - 120418 => 'm', - 120419 => 'n', - 120420 => 'o', - 120421 => 'p', - 120422 => 'q', - 120423 => 'r', - 120424 => 's', - 120425 => 't', - 120426 => 'u', - 120427 => 'v', - 120428 => 'w', - 120429 => 'x', - 120430 => 'y', - 120431 => 'z', - 120432 => 'a', - 120433 => 'b', - 120434 => 'c', - 120435 => 'd', - 120436 => 'e', - 120437 => 'f', - 120438 => 'g', - 120439 => 'h', - 120440 => 'i', - 120441 => 'j', - 120442 => 'k', - 120443 => 'l', - 120444 => 'm', - 120445 => 'n', - 120446 => 'o', - 120447 => 'p', - 120448 => 'q', - 120449 => 'r', - 120450 => 's', - 120451 => 't', - 120452 => 'u', - 120453 => 'v', - 120454 => 'w', - 120455 => 'x', - 120456 => 'y', - 120457 => 'z', - 120458 => 'a', - 120459 => 'b', - 120460 => 'c', - 120461 => 'd', - 120462 => 'e', - 120463 => 'f', - 120464 => 'g', - 120465 => 'h', - 120466 => 'i', - 120467 => 'j', - 120468 => 'k', - 120469 => 'l', - 120470 => 'm', - 120471 => 'n', - 120472 => 'o', - 120473 => 'p', - 120474 => 'q', - 120475 => 'r', - 120476 => 's', - 120477 => 't', - 120478 => 'u', - 120479 => 'v', - 120480 => 'w', - 120481 => 'x', - 120482 => 'y', - 120483 => 'z', - 120484 => 'ı', - 120485 => 'ȷ', - 120488 => 'α', - 120489 => 'β', - 120490 => 'γ', - 120491 => 'δ', - 120492 => 'ε', - 120493 => 'ζ', - 120494 => 'η', - 120495 => 'θ', - 120496 => 'ι', - 120497 => 'κ', - 120498 => 'λ', - 120499 => 'μ', - 120500 => 'ν', - 120501 => 'ξ', - 120502 => 'ο', - 120503 => 'π', - 120504 => 'ρ', - 120505 => 'θ', - 120506 => 'σ', - 120507 => 'τ', - 120508 => 'υ', - 120509 => 'φ', - 120510 => 'χ', - 120511 => 'ψ', - 120512 => 'ω', - 120513 => '∇', - 120514 => 'α', - 120515 => 'β', - 120516 => 'γ', - 120517 => 'δ', - 120518 => 'ε', - 120519 => 'ζ', - 120520 => 'η', - 120521 => 'θ', - 120522 => 'ι', - 120523 => 'κ', - 120524 => 'λ', - 120525 => 'μ', - 120526 => 'ν', - 120527 => 'ξ', - 120528 => 'ο', - 120529 => 'π', - 120530 => 'ρ', - 120531 => 'σ', - 120532 => 'σ', - 120533 => 'τ', - 120534 => 'υ', - 120535 => 'φ', - 120536 => 'χ', - 120537 => 'ψ', - 120538 => 'ω', - 120539 => '∂', - 120540 => 'ε', - 120541 => 'θ', - 120542 => 'κ', - 120543 => 'φ', - 120544 => 'ρ', - 120545 => 'π', - 120546 => 'α', - 120547 => 'β', - 120548 => 'γ', - 120549 => 'δ', - 120550 => 'ε', - 120551 => 'ζ', - 120552 => 'η', - 120553 => 'θ', - 120554 => 'ι', - 120555 => 'κ', - 120556 => 'λ', - 120557 => 'μ', - 120558 => 'ν', - 120559 => 'ξ', - 120560 => 'ο', - 120561 => 'π', - 120562 => 'ρ', - 120563 => 'θ', - 120564 => 'σ', - 120565 => 'τ', - 120566 => 'υ', - 120567 => 'φ', - 120568 => 'χ', - 120569 => 'ψ', - 120570 => 'ω', - 120571 => '∇', - 120572 => 'α', - 120573 => 'β', - 120574 => 'γ', - 120575 => 'δ', - 120576 => 'ε', - 120577 => 'ζ', - 120578 => 'η', - 120579 => 'θ', - 120580 => 'ι', - 120581 => 'κ', - 120582 => 'λ', - 120583 => 'μ', - 120584 => 'ν', - 120585 => 'ξ', - 120586 => 'ο', - 120587 => 'π', - 120588 => 'ρ', - 120589 => 'σ', - 120590 => 'σ', - 120591 => 'τ', - 120592 => 'υ', - 120593 => 'φ', - 120594 => 'χ', - 120595 => 'ψ', - 120596 => 'ω', - 120597 => '∂', - 120598 => 'ε', - 120599 => 'θ', - 120600 => 'κ', - 120601 => 'φ', - 120602 => 'ρ', - 120603 => 'π', - 120604 => 'α', - 120605 => 'β', - 120606 => 'γ', - 120607 => 'δ', - 120608 => 'ε', - 120609 => 'ζ', - 120610 => 'η', - 120611 => 'θ', - 120612 => 'ι', - 120613 => 'κ', - 120614 => 'λ', - 120615 => 'μ', - 120616 => 'ν', - 120617 => 'ξ', - 120618 => 'ο', - 120619 => 'π', - 120620 => 'ρ', - 120621 => 'θ', - 120622 => 'σ', - 120623 => 'τ', - 120624 => 'υ', - 120625 => 'φ', - 120626 => 'χ', - 120627 => 'ψ', - 120628 => 'ω', - 120629 => '∇', - 120630 => 'α', - 120631 => 'β', - 120632 => 'γ', - 120633 => 'δ', - 120634 => 'ε', - 120635 => 'ζ', - 120636 => 'η', - 120637 => 'θ', - 120638 => 'ι', - 120639 => 'κ', - 120640 => 'λ', - 120641 => 'μ', - 120642 => 'ν', - 120643 => 'ξ', - 120644 => 'ο', - 120645 => 'π', - 120646 => 'ρ', - 120647 => 'σ', - 120648 => 'σ', - 120649 => 'τ', - 120650 => 'υ', - 120651 => 'φ', - 120652 => 'χ', - 120653 => 'ψ', - 120654 => 'ω', - 120655 => '∂', - 120656 => 'ε', - 120657 => 'θ', - 120658 => 'κ', - 120659 => 'φ', - 120660 => 'ρ', - 120661 => 'π', - 120662 => 'α', - 120663 => 'β', - 120664 => 'γ', - 120665 => 'δ', - 120666 => 'ε', - 120667 => 'ζ', - 120668 => 'η', - 120669 => 'θ', - 120670 => 'ι', - 120671 => 'κ', - 120672 => 'λ', - 120673 => 'μ', - 120674 => 'ν', - 120675 => 'ξ', - 120676 => 'ο', - 120677 => 'π', - 120678 => 'ρ', - 120679 => 'θ', - 120680 => 'σ', - 120681 => 'τ', - 120682 => 'υ', - 120683 => 'φ', - 120684 => 'χ', - 120685 => 'ψ', - 120686 => 'ω', - 120687 => '∇', - 120688 => 'α', - 120689 => 'β', - 120690 => 'γ', - 120691 => 'δ', - 120692 => 'ε', - 120693 => 'ζ', - 120694 => 'η', - 120695 => 'θ', - 120696 => 'ι', - 120697 => 'κ', - 120698 => 'λ', - 120699 => 'μ', - 120700 => 'ν', - 120701 => 'ξ', - 120702 => 'ο', - 120703 => 'π', - 120704 => 'ρ', - 120705 => 'σ', - 120706 => 'σ', - 120707 => 'τ', - 120708 => 'υ', - 120709 => 'φ', - 120710 => 'χ', - 120711 => 'ψ', - 120712 => 'ω', - 120713 => '∂', - 120714 => 'ε', - 120715 => 'θ', - 120716 => 'κ', - 120717 => 'φ', - 120718 => 'ρ', - 120719 => 'π', - 120720 => 'α', - 120721 => 'β', - 120722 => 'γ', - 120723 => 'δ', - 120724 => 'ε', - 120725 => 'ζ', - 120726 => 'η', - 120727 => 'θ', - 120728 => 'ι', - 120729 => 'κ', - 120730 => 'λ', - 120731 => 'μ', - 120732 => 'ν', - 120733 => 'ξ', - 120734 => 'ο', - 120735 => 'π', - 120736 => 'ρ', - 120737 => 'θ', - 120738 => 'σ', - 120739 => 'τ', - 120740 => 'υ', - 120741 => 'φ', - 120742 => 'χ', - 120743 => 'ψ', - 120744 => 'ω', - 120745 => '∇', - 120746 => 'α', - 120747 => 'β', - 120748 => 'γ', - 120749 => 'δ', - 120750 => 'ε', - 120751 => 'ζ', - 120752 => 'η', - 120753 => 'θ', - 120754 => 'ι', - 120755 => 'κ', - 120756 => 'λ', - 120757 => 'μ', - 120758 => 'ν', - 120759 => 'ξ', - 120760 => 'ο', - 120761 => 'π', - 120762 => 'ρ', - 120763 => 'σ', - 120764 => 'σ', - 120765 => 'τ', - 120766 => 'υ', - 120767 => 'φ', - 120768 => 'χ', - 120769 => 'ψ', - 120770 => 'ω', - 120771 => '∂', - 120772 => 'ε', - 120773 => 'θ', - 120774 => 'κ', - 120775 => 'φ', - 120776 => 'ρ', - 120777 => 'π', - 120778 => 'ϝ', - 120779 => 'ϝ', - 120782 => '0', - 120783 => '1', - 120784 => '2', - 120785 => '3', - 120786 => '4', - 120787 => '5', - 120788 => '6', - 120789 => '7', - 120790 => '8', - 120791 => '9', - 120792 => '0', - 120793 => '1', - 120794 => '2', - 120795 => '3', - 120796 => '4', - 120797 => '5', - 120798 => '6', - 120799 => '7', - 120800 => '8', - 120801 => '9', - 120802 => '0', - 120803 => '1', - 120804 => '2', - 120805 => '3', - 120806 => '4', - 120807 => '5', - 120808 => '6', - 120809 => '7', - 120810 => '8', - 120811 => '9', - 120812 => '0', - 120813 => '1', - 120814 => '2', - 120815 => '3', - 120816 => '4', - 120817 => '5', - 120818 => '6', - 120819 => '7', - 120820 => '8', - 120821 => '9', - 120822 => '0', - 120823 => '1', - 120824 => '2', - 120825 => '3', - 120826 => '4', - 120827 => '5', - 120828 => '6', - 120829 => '7', - 120830 => '8', - 120831 => '9', - 125184 => '𞤢', - 125185 => '𞤣', - 125186 => '𞤤', - 125187 => '𞤥', - 125188 => '𞤦', - 125189 => '𞤧', - 125190 => '𞤨', - 125191 => '𞤩', - 125192 => '𞤪', - 125193 => '𞤫', - 125194 => '𞤬', - 125195 => '𞤭', - 125196 => '𞤮', - 125197 => '𞤯', - 125198 => '𞤰', - 125199 => '𞤱', - 125200 => '𞤲', - 125201 => '𞤳', - 125202 => '𞤴', - 125203 => '𞤵', - 125204 => '𞤶', - 125205 => '𞤷', - 125206 => '𞤸', - 125207 => '𞤹', - 125208 => '𞤺', - 125209 => '𞤻', - 125210 => '𞤼', - 125211 => '𞤽', - 125212 => '𞤾', - 125213 => '𞤿', - 125214 => '𞥀', - 125215 => '𞥁', - 125216 => '𞥂', - 125217 => '𞥃', - 126464 => 'ا', - 126465 => 'ب', - 126466 => 'ج', - 126467 => 'د', - 126469 => 'و', - 126470 => 'ز', - 126471 => 'ح', - 126472 => 'ط', - 126473 => 'ي', - 126474 => 'ك', - 126475 => 'ل', - 126476 => 'م', - 126477 => 'ن', - 126478 => 'س', - 126479 => 'ع', - 126480 => 'ف', - 126481 => 'ص', - 126482 => 'ق', - 126483 => 'ر', - 126484 => 'ش', - 126485 => 'ت', - 126486 => 'ث', - 126487 => 'خ', - 126488 => 'ذ', - 126489 => 'ض', - 126490 => 'ظ', - 126491 => 'غ', - 126492 => 'ٮ', - 126493 => 'ں', - 126494 => 'ڡ', - 126495 => 'ٯ', - 126497 => 'ب', - 126498 => 'ج', - 126500 => 'ه', - 126503 => 'ح', - 126505 => 'ي', - 126506 => 'ك', - 126507 => 'ل', - 126508 => 'م', - 126509 => 'ن', - 126510 => 'س', - 126511 => 'ع', - 126512 => 'ف', - 126513 => 'ص', - 126514 => 'ق', - 126516 => 'ش', - 126517 => 'ت', - 126518 => 'ث', - 126519 => 'خ', - 126521 => 'ض', - 126523 => 'غ', - 126530 => 'ج', - 126535 => 'ح', - 126537 => 'ي', - 126539 => 'ل', - 126541 => 'ن', - 126542 => 'س', - 126543 => 'ع', - 126545 => 'ص', - 126546 => 'ق', - 126548 => 'ش', - 126551 => 'خ', - 126553 => 'ض', - 126555 => 'غ', - 126557 => 'ں', - 126559 => 'ٯ', - 126561 => 'ب', - 126562 => 'ج', - 126564 => 'ه', - 126567 => 'ح', - 126568 => 'ط', - 126569 => 'ي', - 126570 => 'ك', - 126572 => 'م', - 126573 => 'ن', - 126574 => 'س', - 126575 => 'ع', - 126576 => 'ف', - 126577 => 'ص', - 126578 => 'ق', - 126580 => 'ش', - 126581 => 'ت', - 126582 => 'ث', - 126583 => 'خ', - 126585 => 'ض', - 126586 => 'ظ', - 126587 => 'غ', - 126588 => 'ٮ', - 126590 => 'ڡ', - 126592 => 'ا', - 126593 => 'ب', - 126594 => 'ج', - 126595 => 'د', - 126596 => 'ه', - 126597 => 'و', - 126598 => 'ز', - 126599 => 'ح', - 126600 => 'ط', - 126601 => 'ي', - 126603 => 'ل', - 126604 => 'م', - 126605 => 'ن', - 126606 => 'س', - 126607 => 'ع', - 126608 => 'ف', - 126609 => 'ص', - 126610 => 'ق', - 126611 => 'ر', - 126612 => 'ش', - 126613 => 'ت', - 126614 => 'ث', - 126615 => 'خ', - 126616 => 'ذ', - 126617 => 'ض', - 126618 => 'ظ', - 126619 => 'غ', - 126625 => 'ب', - 126626 => 'ج', - 126627 => 'د', - 126629 => 'و', - 126630 => 'ز', - 126631 => 'ح', - 126632 => 'ط', - 126633 => 'ي', - 126635 => 'ل', - 126636 => 'م', - 126637 => 'ن', - 126638 => 'س', - 126639 => 'ع', - 126640 => 'ف', - 126641 => 'ص', - 126642 => 'ق', - 126643 => 'ر', - 126644 => 'ش', - 126645 => 'ت', - 126646 => 'ث', - 126647 => 'خ', - 126648 => 'ذ', - 126649 => 'ض', - 126650 => 'ظ', - 126651 => 'غ', - 127274 => '〔s〕', - 127275 => 'c', - 127276 => 'r', - 127277 => 'cd', - 127278 => 'wz', - 127280 => 'a', - 127281 => 'b', - 127282 => 'c', - 127283 => 'd', - 127284 => 'e', - 127285 => 'f', - 127286 => 'g', - 127287 => 'h', - 127288 => 'i', - 127289 => 'j', - 127290 => 'k', - 127291 => 'l', - 127292 => 'm', - 127293 => 'n', - 127294 => 'o', - 127295 => 'p', - 127296 => 'q', - 127297 => 'r', - 127298 => 's', - 127299 => 't', - 127300 => 'u', - 127301 => 'v', - 127302 => 'w', - 127303 => 'x', - 127304 => 'y', - 127305 => 'z', - 127306 => 'hv', - 127307 => 'mv', - 127308 => 'sd', - 127309 => 'ss', - 127310 => 'ppv', - 127311 => 'wc', - 127338 => 'mc', - 127339 => 'md', - 127340 => 'mr', - 127376 => 'dj', - 127488 => 'ほか', - 127489 => 'ココ', - 127490 => 'サ', - 127504 => '手', - 127505 => '字', - 127506 => '双', - 127507 => 'デ', - 127508 => '二', - 127509 => '多', - 127510 => '解', - 127511 => '天', - 127512 => '交', - 127513 => '映', - 127514 => '無', - 127515 => '料', - 127516 => '前', - 127517 => '後', - 127518 => '再', - 127519 => '新', - 127520 => '初', - 127521 => '終', - 127522 => '生', - 127523 => '販', - 127524 => '声', - 127525 => '吹', - 127526 => '演', - 127527 => '投', - 127528 => '捕', - 127529 => '一', - 127530 => '三', - 127531 => '遊', - 127532 => '左', - 127533 => '中', - 127534 => '右', - 127535 => '指', - 127536 => '走', - 127537 => '打', - 127538 => '禁', - 127539 => '空', - 127540 => '合', - 127541 => '満', - 127542 => '有', - 127543 => '月', - 127544 => '申', - 127545 => '割', - 127546 => '営', - 127547 => '配', - 127552 => '〔本〕', - 127553 => '〔三〕', - 127554 => '〔二〕', - 127555 => '〔安〕', - 127556 => '〔点〕', - 127557 => '〔打〕', - 127558 => '〔盗〕', - 127559 => '〔勝〕', - 127560 => '〔敗〕', - 127568 => '得', - 127569 => '可', - 130032 => '0', - 130033 => '1', - 130034 => '2', - 130035 => '3', - 130036 => '4', - 130037 => '5', - 130038 => '6', - 130039 => '7', - 130040 => '8', - 130041 => '9', - 194560 => '丽', - 194561 => '丸', - 194562 => '乁', - 194563 => '𠄢', - 194564 => '你', - 194565 => '侮', - 194566 => '侻', - 194567 => '倂', - 194568 => '偺', - 194569 => '備', - 194570 => '僧', - 194571 => '像', - 194572 => '㒞', - 194573 => '𠘺', - 194574 => '免', - 194575 => '兔', - 194576 => '兤', - 194577 => '具', - 194578 => '𠔜', - 194579 => '㒹', - 194580 => '內', - 194581 => '再', - 194582 => '𠕋', - 194583 => '冗', - 194584 => '冤', - 194585 => '仌', - 194586 => '冬', - 194587 => '况', - 194588 => '𩇟', - 194589 => '凵', - 194590 => '刃', - 194591 => '㓟', - 194592 => '刻', - 194593 => '剆', - 194594 => '割', - 194595 => '剷', - 194596 => '㔕', - 194597 => '勇', - 194598 => '勉', - 194599 => '勤', - 194600 => '勺', - 194601 => '包', - 194602 => '匆', - 194603 => '北', - 194604 => '卉', - 194605 => '卑', - 194606 => '博', - 194607 => '即', - 194608 => '卽', - 194609 => '卿', - 194610 => '卿', - 194611 => '卿', - 194612 => '𠨬', - 194613 => '灰', - 194614 => '及', - 194615 => '叟', - 194616 => '𠭣', - 194617 => '叫', - 194618 => '叱', - 194619 => '吆', - 194620 => '咞', - 194621 => '吸', - 194622 => '呈', - 194623 => '周', - 194624 => '咢', - 194625 => '哶', - 194626 => '唐', - 194627 => '啓', - 194628 => '啣', - 194629 => '善', - 194630 => '善', - 194631 => '喙', - 194632 => '喫', - 194633 => '喳', - 194634 => '嗂', - 194635 => '圖', - 194636 => '嘆', - 194637 => '圗', - 194638 => '噑', - 194639 => '噴', - 194640 => '切', - 194641 => '壮', - 194642 => '城', - 194643 => '埴', - 194644 => '堍', - 194645 => '型', - 194646 => '堲', - 194647 => '報', - 194648 => '墬', - 194649 => '𡓤', - 194650 => '売', - 194651 => '壷', - 194652 => '夆', - 194653 => '多', - 194654 => '夢', - 194655 => '奢', - 194656 => '𡚨', - 194657 => '𡛪', - 194658 => '姬', - 194659 => '娛', - 194660 => '娧', - 194661 => '姘', - 194662 => '婦', - 194663 => '㛮', - 194665 => '嬈', - 194666 => '嬾', - 194667 => '嬾', - 194668 => '𡧈', - 194669 => '寃', - 194670 => '寘', - 194671 => '寧', - 194672 => '寳', - 194673 => '𡬘', - 194674 => '寿', - 194675 => '将', - 194677 => '尢', - 194678 => '㞁', - 194679 => '屠', - 194680 => '屮', - 194681 => '峀', - 194682 => '岍', - 194683 => '𡷤', - 194684 => '嵃', - 194685 => '𡷦', - 194686 => '嵮', - 194687 => '嵫', - 194688 => '嵼', - 194689 => '巡', - 194690 => '巢', - 194691 => '㠯', - 194692 => '巽', - 194693 => '帨', - 194694 => '帽', - 194695 => '幩', - 194696 => '㡢', - 194697 => '𢆃', - 194698 => '㡼', - 194699 => '庰', - 194700 => '庳', - 194701 => '庶', - 194702 => '廊', - 194703 => '𪎒', - 194704 => '廾', - 194705 => '𢌱', - 194706 => '𢌱', - 194707 => '舁', - 194708 => '弢', - 194709 => '弢', - 194710 => '㣇', - 194711 => '𣊸', - 194712 => '𦇚', - 194713 => '形', - 194714 => '彫', - 194715 => '㣣', - 194716 => '徚', - 194717 => '忍', - 194718 => '志', - 194719 => '忹', - 194720 => '悁', - 194721 => '㤺', - 194722 => '㤜', - 194723 => '悔', - 194724 => '𢛔', - 194725 => '惇', - 194726 => '慈', - 194727 => '慌', - 194728 => '慎', - 194729 => '慌', - 194730 => '慺', - 194731 => '憎', - 194732 => '憲', - 194733 => '憤', - 194734 => '憯', - 194735 => '懞', - 194736 => '懲', - 194737 => '懶', - 194738 => '成', - 194739 => '戛', - 194740 => '扝', - 194741 => '抱', - 194742 => '拔', - 194743 => '捐', - 194744 => '𢬌', - 194745 => '挽', - 194746 => '拼', - 194747 => '捨', - 194748 => '掃', - 194749 => '揤', - 194750 => '𢯱', - 194751 => '搢', - 194752 => '揅', - 194753 => '掩', - 194754 => '㨮', - 194755 => '摩', - 194756 => '摾', - 194757 => '撝', - 194758 => '摷', - 194759 => '㩬', - 194760 => '敏', - 194761 => '敬', - 194762 => '𣀊', - 194763 => '旣', - 194764 => '書', - 194765 => '晉', - 194766 => '㬙', - 194767 => '暑', - 194768 => '㬈', - 194769 => '㫤', - 194770 => '冒', - 194771 => '冕', - 194772 => '最', - 194773 => '暜', - 194774 => '肭', - 194775 => '䏙', - 194776 => '朗', - 194777 => '望', - 194778 => '朡', - 194779 => '杞', - 194780 => '杓', - 194781 => '𣏃', - 194782 => '㭉', - 194783 => '柺', - 194784 => '枅', - 194785 => '桒', - 194786 => '梅', - 194787 => '𣑭', - 194788 => '梎', - 194789 => '栟', - 194790 => '椔', - 194791 => '㮝', - 194792 => '楂', - 194793 => '榣', - 194794 => '槪', - 194795 => '檨', - 194796 => '𣚣', - 194797 => '櫛', - 194798 => '㰘', - 194799 => '次', - 194800 => '𣢧', - 194801 => '歔', - 194802 => '㱎', - 194803 => '歲', - 194804 => '殟', - 194805 => '殺', - 194806 => '殻', - 194807 => '𣪍', - 194808 => '𡴋', - 194809 => '𣫺', - 194810 => '汎', - 194811 => '𣲼', - 194812 => '沿', - 194813 => '泍', - 194814 => '汧', - 194815 => '洖', - 194816 => '派', - 194817 => '海', - 194818 => '流', - 194819 => '浩', - 194820 => '浸', - 194821 => '涅', - 194822 => '𣴞', - 194823 => '洴', - 194824 => '港', - 194825 => '湮', - 194826 => '㴳', - 194827 => '滋', - 194828 => '滇', - 194829 => '𣻑', - 194830 => '淹', - 194831 => '潮', - 194832 => '𣽞', - 194833 => '𣾎', - 194834 => '濆', - 194835 => '瀹', - 194836 => '瀞', - 194837 => '瀛', - 194838 => '㶖', - 194839 => '灊', - 194840 => '災', - 194841 => '灷', - 194842 => '炭', - 194843 => '𠔥', - 194844 => '煅', - 194845 => '𤉣', - 194846 => '熜', - 194848 => '爨', - 194849 => '爵', - 194850 => '牐', - 194851 => '𤘈', - 194852 => '犀', - 194853 => '犕', - 194854 => '𤜵', - 194855 => '𤠔', - 194856 => '獺', - 194857 => '王', - 194858 => '㺬', - 194859 => '玥', - 194860 => '㺸', - 194861 => '㺸', - 194862 => '瑇', - 194863 => '瑜', - 194864 => '瑱', - 194865 => '璅', - 194866 => '瓊', - 194867 => '㼛', - 194868 => '甤', - 194869 => '𤰶', - 194870 => '甾', - 194871 => '𤲒', - 194872 => '異', - 194873 => '𢆟', - 194874 => '瘐', - 194875 => '𤾡', - 194876 => '𤾸', - 194877 => '𥁄', - 194878 => '㿼', - 194879 => '䀈', - 194880 => '直', - 194881 => '𥃳', - 194882 => '𥃲', - 194883 => '𥄙', - 194884 => '𥄳', - 194885 => '眞', - 194886 => '真', - 194887 => '真', - 194888 => '睊', - 194889 => '䀹', - 194890 => '瞋', - 194891 => '䁆', - 194892 => '䂖', - 194893 => '𥐝', - 194894 => '硎', - 194895 => '碌', - 194896 => '磌', - 194897 => '䃣', - 194898 => '𥘦', - 194899 => '祖', - 194900 => '𥚚', - 194901 => '𥛅', - 194902 => '福', - 194903 => '秫', - 194904 => '䄯', - 194905 => '穀', - 194906 => '穊', - 194907 => '穏', - 194908 => '𥥼', - 194909 => '𥪧', - 194910 => '𥪧', - 194912 => '䈂', - 194913 => '𥮫', - 194914 => '篆', - 194915 => '築', - 194916 => '䈧', - 194917 => '𥲀', - 194918 => '糒', - 194919 => '䊠', - 194920 => '糨', - 194921 => '糣', - 194922 => '紀', - 194923 => '𥾆', - 194924 => '絣', - 194925 => '䌁', - 194926 => '緇', - 194927 => '縂', - 194928 => '繅', - 194929 => '䌴', - 194930 => '𦈨', - 194931 => '𦉇', - 194932 => '䍙', - 194933 => '𦋙', - 194934 => '罺', - 194935 => '𦌾', - 194936 => '羕', - 194937 => '翺', - 194938 => '者', - 194939 => '𦓚', - 194940 => '𦔣', - 194941 => '聠', - 194942 => '𦖨', - 194943 => '聰', - 194944 => '𣍟', - 194945 => '䏕', - 194946 => '育', - 194947 => '脃', - 194948 => '䐋', - 194949 => '脾', - 194950 => '媵', - 194951 => '𦞧', - 194952 => '𦞵', - 194953 => '𣎓', - 194954 => '𣎜', - 194955 => '舁', - 194956 => '舄', - 194957 => '辞', - 194958 => '䑫', - 194959 => '芑', - 194960 => '芋', - 194961 => '芝', - 194962 => '劳', - 194963 => '花', - 194964 => '芳', - 194965 => '芽', - 194966 => '苦', - 194967 => '𦬼', - 194968 => '若', - 194969 => '茝', - 194970 => '荣', - 194971 => '莭', - 194972 => '茣', - 194973 => '莽', - 194974 => '菧', - 194975 => '著', - 194976 => '荓', - 194977 => '菊', - 194978 => '菌', - 194979 => '菜', - 194980 => '𦰶', - 194981 => '𦵫', - 194982 => '𦳕', - 194983 => '䔫', - 194984 => '蓱', - 194985 => '蓳', - 194986 => '蔖', - 194987 => '𧏊', - 194988 => '蕤', - 194989 => '𦼬', - 194990 => '䕝', - 194991 => '䕡', - 194992 => '𦾱', - 194993 => '𧃒', - 194994 => '䕫', - 194995 => '虐', - 194996 => '虜', - 194997 => '虧', - 194998 => '虩', - 194999 => '蚩', - 195000 => '蚈', - 195001 => '蜎', - 195002 => '蛢', - 195003 => '蝹', - 195004 => '蜨', - 195005 => '蝫', - 195006 => '螆', - 195008 => '蟡', - 195009 => '蠁', - 195010 => '䗹', - 195011 => '衠', - 195012 => '衣', - 195013 => '𧙧', - 195014 => '裗', - 195015 => '裞', - 195016 => '䘵', - 195017 => '裺', - 195018 => '㒻', - 195019 => '𧢮', - 195020 => '𧥦', - 195021 => '䚾', - 195022 => '䛇', - 195023 => '誠', - 195024 => '諭', - 195025 => '變', - 195026 => '豕', - 195027 => '𧲨', - 195028 => '貫', - 195029 => '賁', - 195030 => '贛', - 195031 => '起', - 195032 => '𧼯', - 195033 => '𠠄', - 195034 => '跋', - 195035 => '趼', - 195036 => '跰', - 195037 => '𠣞', - 195038 => '軔', - 195039 => '輸', - 195040 => '𨗒', - 195041 => '𨗭', - 195042 => '邔', - 195043 => '郱', - 195044 => '鄑', - 195045 => '𨜮', - 195046 => '鄛', - 195047 => '鈸', - 195048 => '鋗', - 195049 => '鋘', - 195050 => '鉼', - 195051 => '鏹', - 195052 => '鐕', - 195053 => '𨯺', - 195054 => '開', - 195055 => '䦕', - 195056 => '閷', - 195057 => '𨵷', - 195058 => '䧦', - 195059 => '雃', - 195060 => '嶲', - 195061 => '霣', - 195062 => '𩅅', - 195063 => '𩈚', - 195064 => '䩮', - 195065 => '䩶', - 195066 => '韠', - 195067 => '𩐊', - 195068 => '䪲', - 195069 => '𩒖', - 195070 => '頋', - 195071 => '頋', - 195072 => '頩', - 195073 => '𩖶', - 195074 => '飢', - 195075 => '䬳', - 195076 => '餩', - 195077 => '馧', - 195078 => '駂', - 195079 => '駾', - 195080 => '䯎', - 195081 => '𩬰', - 195082 => '鬒', - 195083 => '鱀', - 195084 => '鳽', - 195085 => '䳎', - 195086 => '䳭', - 195087 => '鵧', - 195088 => '𪃎', - 195089 => '䳸', - 195090 => '𪄅', - 195091 => '𪈎', - 195092 => '𪊑', - 195093 => '麻', - 195094 => '䵖', - 195095 => '黹', - 195096 => '黾', - 195097 => '鼅', - 195098 => '鼏', - 195099 => '鼖', - 195100 => '鼻', - 195101 => '𪘀', -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php deleted file mode 100644 index 1958e37e..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php +++ /dev/null @@ -1,65 +0,0 @@ - 9, - 2509 => 9, - 2637 => 9, - 2765 => 9, - 2893 => 9, - 3021 => 9, - 3149 => 9, - 3277 => 9, - 3387 => 9, - 3388 => 9, - 3405 => 9, - 3530 => 9, - 3642 => 9, - 3770 => 9, - 3972 => 9, - 4153 => 9, - 4154 => 9, - 5908 => 9, - 5940 => 9, - 6098 => 9, - 6752 => 9, - 6980 => 9, - 7082 => 9, - 7083 => 9, - 7154 => 9, - 7155 => 9, - 11647 => 9, - 43014 => 9, - 43052 => 9, - 43204 => 9, - 43347 => 9, - 43456 => 9, - 43766 => 9, - 44013 => 9, - 68159 => 9, - 69702 => 9, - 69759 => 9, - 69817 => 9, - 69939 => 9, - 69940 => 9, - 70080 => 9, - 70197 => 9, - 70378 => 9, - 70477 => 9, - 70722 => 9, - 70850 => 9, - 71103 => 9, - 71231 => 9, - 71350 => 9, - 71467 => 9, - 71737 => 9, - 71997 => 9, - 71998 => 9, - 72160 => 9, - 72244 => 9, - 72263 => 9, - 72345 => 9, - 72767 => 9, - 73028 => 9, - 73029 => 9, - 73111 => 9, -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/bootstrap.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/bootstrap.php deleted file mode 100644 index f6b6bdf1..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/bootstrap.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Doofinder\Symfony\Polyfill\Intl\Idn as p; - -if (extension_loaded('intl')) { - return; -} - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!defined('U_IDNA_PROHIBITED_ERROR')) { - define('U_IDNA_PROHIBITED_ERROR', 66560); -} -if (!defined('U_IDNA_ERROR_START')) { - define('U_IDNA_ERROR_START', 66560); -} -if (!defined('U_IDNA_UNASSIGNED_ERROR')) { - define('U_IDNA_UNASSIGNED_ERROR', 66561); -} -if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { - define('U_IDNA_CHECK_BIDI_ERROR', 66562); -} -if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { - define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); -} -if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { - define('U_IDNA_ACE_PREFIX_ERROR', 66564); -} -if (!defined('U_IDNA_VERIFICATION_ERROR')) { - define('U_IDNA_VERIFICATION_ERROR', 66565); -} -if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { - define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); -} -if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { - define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); -} -if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { - define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); -} -if (!defined('U_IDNA_ERROR_LIMIT')) { - define('U_IDNA_ERROR_LIMIT', 66569); -} -if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { - define('U_STRINGPREP_PROHIBITED_ERROR', 66560); -} -if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { - define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); -} -if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { - define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); -} -if (!defined('IDNA_DEFAULT')) { - define('IDNA_DEFAULT', 0); -} -if (!defined('IDNA_ALLOW_UNASSIGNED')) { - define('IDNA_ALLOW_UNASSIGNED', 1); -} -if (!defined('IDNA_USE_STD3_RULES')) { - define('IDNA_USE_STD3_RULES', 2); -} -if (!defined('IDNA_CHECK_BIDI')) { - define('IDNA_CHECK_BIDI', 4); -} -if (!defined('IDNA_CHECK_CONTEXTJ')) { - define('IDNA_CHECK_CONTEXTJ', 8); -} -if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { - define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); -} -if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { - define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); -} -if (!defined('INTL_IDNA_VARIANT_2003')) { - define('INTL_IDNA_VARIANT_2003', 0); -} -if (!defined('INTL_IDNA_VARIANT_UTS46')) { - define('INTL_IDNA_VARIANT_UTS46', 1); -} -if (!defined('IDNA_ERROR_EMPTY_LABEL')) { - define('IDNA_ERROR_EMPTY_LABEL', 1); -} -if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { - define('IDNA_ERROR_LABEL_TOO_LONG', 2); -} -if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { - define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); -} -if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { - define('IDNA_ERROR_LEADING_HYPHEN', 8); -} -if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { - define('IDNA_ERROR_TRAILING_HYPHEN', 16); -} -if (!defined('IDNA_ERROR_HYPHEN_3_4')) { - define('IDNA_ERROR_HYPHEN_3_4', 32); -} -if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { - define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); -} -if (!defined('IDNA_ERROR_DISALLOWED')) { - define('IDNA_ERROR_DISALLOWED', 128); -} -if (!defined('IDNA_ERROR_PUNYCODE')) { - define('IDNA_ERROR_PUNYCODE', 256); -} -if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { - define('IDNA_ERROR_LABEL_HAS_DOT', 512); -} -if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { - define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); -} -if (!defined('IDNA_ERROR_BIDI')) { - define('IDNA_ERROR_BIDI', 2048); -} -if (!defined('IDNA_ERROR_CONTEXTJ')) { - define('IDNA_ERROR_CONTEXTJ', 4096); -} - -if (\PHP_VERSION_ID < 70400) { - if (!function_exists('idn_to_ascii')) { - function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } - } - if (!function_exists('idn_to_utf8')) { - function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } - } -} else { - if (!function_exists('idn_to_ascii')) { - function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } - } - if (!function_exists('idn_to_utf8')) { - function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/bootstrap80.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/bootstrap80.php deleted file mode 100644 index 0a324c50..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-idn/bootstrap80.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Doofinder\Symfony\Polyfill\Intl\Idn as p; - -if (!defined('U_IDNA_PROHIBITED_ERROR')) { - define('U_IDNA_PROHIBITED_ERROR', 66560); -} -if (!defined('U_IDNA_ERROR_START')) { - define('U_IDNA_ERROR_START', 66560); -} -if (!defined('U_IDNA_UNASSIGNED_ERROR')) { - define('U_IDNA_UNASSIGNED_ERROR', 66561); -} -if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { - define('U_IDNA_CHECK_BIDI_ERROR', 66562); -} -if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { - define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); -} -if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { - define('U_IDNA_ACE_PREFIX_ERROR', 66564); -} -if (!defined('U_IDNA_VERIFICATION_ERROR')) { - define('U_IDNA_VERIFICATION_ERROR', 66565); -} -if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { - define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); -} -if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { - define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); -} -if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { - define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); -} -if (!defined('U_IDNA_ERROR_LIMIT')) { - define('U_IDNA_ERROR_LIMIT', 66569); -} -if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { - define('U_STRINGPREP_PROHIBITED_ERROR', 66560); -} -if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { - define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); -} -if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { - define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); -} -if (!defined('IDNA_DEFAULT')) { - define('IDNA_DEFAULT', 0); -} -if (!defined('IDNA_ALLOW_UNASSIGNED')) { - define('IDNA_ALLOW_UNASSIGNED', 1); -} -if (!defined('IDNA_USE_STD3_RULES')) { - define('IDNA_USE_STD3_RULES', 2); -} -if (!defined('IDNA_CHECK_BIDI')) { - define('IDNA_CHECK_BIDI', 4); -} -if (!defined('IDNA_CHECK_CONTEXTJ')) { - define('IDNA_CHECK_CONTEXTJ', 8); -} -if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { - define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); -} -if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { - define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); -} -if (!defined('INTL_IDNA_VARIANT_UTS46')) { - define('INTL_IDNA_VARIANT_UTS46', 1); -} -if (!defined('IDNA_ERROR_EMPTY_LABEL')) { - define('IDNA_ERROR_EMPTY_LABEL', 1); -} -if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { - define('IDNA_ERROR_LABEL_TOO_LONG', 2); -} -if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { - define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); -} -if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { - define('IDNA_ERROR_LEADING_HYPHEN', 8); -} -if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { - define('IDNA_ERROR_TRAILING_HYPHEN', 16); -} -if (!defined('IDNA_ERROR_HYPHEN_3_4')) { - define('IDNA_ERROR_HYPHEN_3_4', 32); -} -if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { - define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); -} -if (!defined('IDNA_ERROR_DISALLOWED')) { - define('IDNA_ERROR_DISALLOWED', 128); -} -if (!defined('IDNA_ERROR_PUNYCODE')) { - define('IDNA_ERROR_PUNYCODE', 256); -} -if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { - define('IDNA_ERROR_LABEL_HAS_DOT', 512); -} -if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { - define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); -} -if (!defined('IDNA_ERROR_BIDI')) { - define('IDNA_ERROR_BIDI', 2048); -} -if (!defined('IDNA_ERROR_CONTEXTJ')) { - define('IDNA_ERROR_CONTEXTJ', 4096); -} - -if (!function_exists('idn_to_ascii')) { - function idn_to_ascii(?string $domain, ?int $flags = 0, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_ascii((string) $domain, (int) $flags, (int) $variant, $idna_info); } -} -if (!function_exists('idn_to_utf8')) { - function idn_to_utf8(?string $domain, ?int $flags = 0, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_utf8((string) $domain, (int) $flags, (int) $variant, $idna_info); } -} diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/LICENSE b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/LICENSE deleted file mode 100644 index 4cd8bdd3..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Normalizer.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Normalizer.php deleted file mode 100644 index 01ae8001..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Normalizer.php +++ /dev/null @@ -1,310 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Doofinder\Symfony\Polyfill\Intl\Normalizer; - -/** - * Normalizer is a PHP fallback implementation of the Normalizer class provided by the intl extension. - * - * It has been validated with Unicode 6.3 Normalization Conformance Test. - * See http://www.unicode.org/reports/tr15/ for detailed info about Unicode normalizations. - * - * @author Nicolas Grekas - * - * @internal - */ -class Normalizer -{ - public const FORM_D = \Normalizer::FORM_D; - public const FORM_KD = \Normalizer::FORM_KD; - public const FORM_C = \Normalizer::FORM_C; - public const FORM_KC = \Normalizer::FORM_KC; - public const NFD = \Normalizer::NFD; - public const NFKD = \Normalizer::NFKD; - public const NFC = \Normalizer::NFC; - public const NFKC = \Normalizer::NFKC; - - private static $C; - private static $D; - private static $KD; - private static $cC; - private static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - private static $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; - - public static function isNormalized(string $s, int $form = self::FORM_C) - { - if (!\in_array($form, [self::NFD, self::NFKD, self::NFC, self::NFKC])) { - return false; - } - if (!isset($s[strspn($s, self::$ASCII)])) { - return true; - } - if (self::NFC == $form && preg_match('//u', $s) && !preg_match('/[^\x00-\x{2FF}]/u', $s)) { - return true; - } - - return self::normalize($s, $form) === $s; - } - - public static function normalize(string $s, int $form = self::FORM_C) - { - if (!preg_match('//u', $s)) { - return false; - } - - switch ($form) { - case self::NFC: $C = true; $K = false; break; - case self::NFD: $C = false; $K = false; break; - case self::NFKC: $C = true; $K = true; break; - case self::NFKD: $C = false; $K = true; break; - default: - if (\defined('Normalizer::NONE') && \Normalizer::NONE == $form) { - return $s; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError('normalizer_normalize(): Argument #2 ($form) must be a a valid normalization form'); - } - - if ('' === $s) { - return ''; - } - - if ($K && null === self::$KD) { - self::$KD = self::getData('compatibilityDecomposition'); - } - - if (null === self::$D) { - self::$D = self::getData('canonicalDecomposition'); - self::$cC = self::getData('combiningClass'); - } - - if (null !== $mbEncoding = (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) ? mb_internal_encoding() : null) { - mb_internal_encoding('8bit'); - } - - $r = self::decompose($s, $K); - - if ($C) { - if (null === self::$C) { - self::$C = self::getData('canonicalComposition'); - } - - $r = self::recompose($r); - } - if (null !== $mbEncoding) { - mb_internal_encoding($mbEncoding); - } - - return $r; - } - - private static function recompose($s) - { - $ASCII = self::$ASCII; - $compMap = self::$C; - $combClass = self::$cC; - $ulenMask = self::$ulenMask; - - $result = $tail = ''; - - $i = $s[0] < "\x80" ? 1 : $ulenMask[$s[0] & "\xF0"]; - $len = \strlen($s); - - $lastUchr = substr($s, 0, $i); - $lastUcls = isset($combClass[$lastUchr]) ? 256 : 0; - - while ($i < $len) { - if ($s[$i] < "\x80") { - // ASCII chars - - if ($tail) { - $lastUchr .= $tail; - $tail = ''; - } - - if ($j = strspn($s, $ASCII, $i + 1)) { - $lastUchr .= substr($s, $i, $j); - $i += $j; - } - - $result .= $lastUchr; - $lastUchr = $s[$i]; - $lastUcls = 0; - ++$i; - continue; - } - - $ulen = $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - - if ($lastUchr < "\xE1\x84\x80" || "\xE1\x84\x92" < $lastUchr - || $uchr < "\xE1\x85\xA1" || "\xE1\x85\xB5" < $uchr - || $lastUcls) { - // Table lookup and combining chars composition - - $ucls = $combClass[$uchr] ?? 0; - - if (isset($compMap[$lastUchr.$uchr]) && (!$lastUcls || $lastUcls < $ucls)) { - $lastUchr = $compMap[$lastUchr.$uchr]; - } elseif ($lastUcls = $ucls) { - $tail .= $uchr; - } else { - if ($tail) { - $lastUchr .= $tail; - $tail = ''; - } - - $result .= $lastUchr; - $lastUchr = $uchr; - } - } else { - // Hangul chars - - $L = \ord($lastUchr[2]) - 0x80; - $V = \ord($uchr[2]) - 0xA1; - $T = 0; - - $uchr = substr($s, $i + $ulen, 3); - - if ("\xE1\x86\xA7" <= $uchr && $uchr <= "\xE1\x87\x82") { - $T = \ord($uchr[2]) - 0xA7; - 0 > $T && $T += 0x40; - $ulen += 3; - } - - $L = 0xAC00 + ($L * 21 + $V) * 28 + $T; - $lastUchr = \chr(0xE0 | $L >> 12).\chr(0x80 | $L >> 6 & 0x3F).\chr(0x80 | $L & 0x3F); - } - - $i += $ulen; - } - - return $result.$lastUchr.$tail; - } - - private static function decompose($s, $c) - { - $result = ''; - - $ASCII = self::$ASCII; - $decompMap = self::$D; - $combClass = self::$cC; - $ulenMask = self::$ulenMask; - if ($c) { - $compatMap = self::$KD; - } - - $c = []; - $i = 0; - $len = \strlen($s); - - while ($i < $len) { - if ($s[$i] < "\x80") { - // ASCII chars - - if ($c) { - ksort($c); - $result .= implode('', $c); - $c = []; - } - - $j = 1 + strspn($s, $ASCII, $i + 1); - $result .= substr($s, $i, $j); - $i += $j; - continue; - } - - $ulen = $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - - if ($uchr < "\xEA\xB0\x80" || "\xED\x9E\xA3" < $uchr) { - // Table lookup - - if ($uchr !== $j = $compatMap[$uchr] ?? ($decompMap[$uchr] ?? $uchr)) { - $uchr = $j; - - $j = \strlen($uchr); - $ulen = $uchr[0] < "\x80" ? 1 : $ulenMask[$uchr[0] & "\xF0"]; - - if ($ulen != $j) { - // Put trailing chars in $s - - $j -= $ulen; - $i -= $j; - - if (0 > $i) { - $s = str_repeat(' ', -$i).$s; - $len -= $i; - $i = 0; - } - - while ($j--) { - $s[$i + $j] = $uchr[$ulen + $j]; - } - - $uchr = substr($uchr, 0, $ulen); - } - } - if (isset($combClass[$uchr])) { - // Combining chars, for sorting - - if (!isset($c[$combClass[$uchr]])) { - $c[$combClass[$uchr]] = ''; - } - $c[$combClass[$uchr]] .= $uchr; - continue; - } - } else { - // Hangul chars - - $uchr = unpack('C*', $uchr); - $j = (($uchr[1] - 224) << 12) + (($uchr[2] - 128) << 6) + $uchr[3] - 0xAC80; - - $uchr = "\xE1\x84".\chr(0x80 + (int) ($j / 588)) - ."\xE1\x85".\chr(0xA1 + (int) (($j % 588) / 28)); - - if ($j %= 28) { - $uchr .= $j < 25 - ? ("\xE1\x86".\chr(0xA7 + $j)) - : ("\xE1\x87".\chr(0x67 + $j)); - } - } - if ($c) { - ksort($c); - $result .= implode('', $c); - $c = []; - } - - $result .= $uchr; - } - - if ($c) { - ksort($c); - $result .= implode('', $c); - } - - return $result; - } - - private static function getData($file) - { - if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { - return require $file; - } - - return false; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php deleted file mode 100644 index 67f8014e..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php +++ /dev/null @@ -1,17 +0,0 @@ - 'À', - 'Á' => 'Á', - 'Â' => 'Â', - 'Ã' => 'Ã', - 'Ä' => 'Ä', - 'Å' => 'Å', - 'Ç' => 'Ç', - 'È' => 'È', - 'É' => 'É', - 'Ê' => 'Ê', - 'Ë' => 'Ë', - 'Ì' => 'Ì', - 'Í' => 'Í', - 'Î' => 'Î', - 'Ï' => 'Ï', - 'Ñ' => 'Ñ', - 'Ò' => 'Ò', - 'Ó' => 'Ó', - 'Ô' => 'Ô', - 'Õ' => 'Õ', - 'Ö' => 'Ö', - 'Ù' => 'Ù', - 'Ú' => 'Ú', - 'Û' => 'Û', - 'Ü' => 'Ü', - 'Ý' => 'Ý', - 'à' => 'à', - 'á' => 'á', - 'â' => 'â', - 'ã' => 'ã', - 'ä' => 'ä', - 'å' => 'å', - 'ç' => 'ç', - 'è' => 'è', - 'é' => 'é', - 'ê' => 'ê', - 'ë' => 'ë', - 'ì' => 'ì', - 'í' => 'í', - 'î' => 'î', - 'ï' => 'ï', - 'ñ' => 'ñ', - 'ò' => 'ò', - 'ó' => 'ó', - 'ô' => 'ô', - 'õ' => 'õ', - 'ö' => 'ö', - 'ù' => 'ù', - 'ú' => 'ú', - 'û' => 'û', - 'ü' => 'ü', - 'ý' => 'ý', - 'ÿ' => 'ÿ', - 'Ā' => 'Ā', - 'ā' => 'ā', - 'Ă' => 'Ă', - 'ă' => 'ă', - 'Ą' => 'Ą', - 'ą' => 'ą', - 'Ć' => 'Ć', - 'ć' => 'ć', - 'Ĉ' => 'Ĉ', - 'ĉ' => 'ĉ', - 'Ċ' => 'Ċ', - 'ċ' => 'ċ', - 'Č' => 'Č', - 'č' => 'č', - 'Ď' => 'Ď', - 'ď' => 'ď', - 'Ē' => 'Ē', - 'ē' => 'ē', - 'Ĕ' => 'Ĕ', - 'ĕ' => 'ĕ', - 'Ė' => 'Ė', - 'ė' => 'ė', - 'Ę' => 'Ę', - 'ę' => 'ę', - 'Ě' => 'Ě', - 'ě' => 'ě', - 'Ĝ' => 'Ĝ', - 'ĝ' => 'ĝ', - 'Ğ' => 'Ğ', - 'ğ' => 'ğ', - 'Ġ' => 'Ġ', - 'ġ' => 'ġ', - 'Ģ' => 'Ģ', - 'ģ' => 'ģ', - 'Ĥ' => 'Ĥ', - 'ĥ' => 'ĥ', - 'Ĩ' => 'Ĩ', - 'ĩ' => 'ĩ', - 'Ī' => 'Ī', - 'ī' => 'ī', - 'Ĭ' => 'Ĭ', - 'ĭ' => 'ĭ', - 'Į' => 'Į', - 'į' => 'į', - 'İ' => 'İ', - 'Ĵ' => 'Ĵ', - 'ĵ' => 'ĵ', - 'Ķ' => 'Ķ', - 'ķ' => 'ķ', - 'Ĺ' => 'Ĺ', - 'ĺ' => 'ĺ', - 'Ļ' => 'Ļ', - 'ļ' => 'ļ', - 'Ľ' => 'Ľ', - 'ľ' => 'ľ', - 'Ń' => 'Ń', - 'ń' => 'ń', - 'Ņ' => 'Ņ', - 'ņ' => 'ņ', - 'Ň' => 'Ň', - 'ň' => 'ň', - 'Ō' => 'Ō', - 'ō' => 'ō', - 'Ŏ' => 'Ŏ', - 'ŏ' => 'ŏ', - 'Ő' => 'Ő', - 'ő' => 'ő', - 'Ŕ' => 'Ŕ', - 'ŕ' => 'ŕ', - 'Ŗ' => 'Ŗ', - 'ŗ' => 'ŗ', - 'Ř' => 'Ř', - 'ř' => 'ř', - 'Ś' => 'Ś', - 'ś' => 'ś', - 'Ŝ' => 'Ŝ', - 'ŝ' => 'ŝ', - 'Ş' => 'Ş', - 'ş' => 'ş', - 'Š' => 'Š', - 'š' => 'š', - 'Ţ' => 'Ţ', - 'ţ' => 'ţ', - 'Ť' => 'Ť', - 'ť' => 'ť', - 'Ũ' => 'Ũ', - 'ũ' => 'ũ', - 'Ū' => 'Ū', - 'ū' => 'ū', - 'Ŭ' => 'Ŭ', - 'ŭ' => 'ŭ', - 'Ů' => 'Ů', - 'ů' => 'ů', - 'Ű' => 'Ű', - 'ű' => 'ű', - 'Ų' => 'Ų', - 'ų' => 'ų', - 'Ŵ' => 'Ŵ', - 'ŵ' => 'ŵ', - 'Ŷ' => 'Ŷ', - 'ŷ' => 'ŷ', - 'Ÿ' => 'Ÿ', - 'Ź' => 'Ź', - 'ź' => 'ź', - 'Ż' => 'Ż', - 'ż' => 'ż', - 'Ž' => 'Ž', - 'ž' => 'ž', - 'Ơ' => 'Ơ', - 'ơ' => 'ơ', - 'Ư' => 'Ư', - 'ư' => 'ư', - 'Ǎ' => 'Ǎ', - 'ǎ' => 'ǎ', - 'Ǐ' => 'Ǐ', - 'ǐ' => 'ǐ', - 'Ǒ' => 'Ǒ', - 'ǒ' => 'ǒ', - 'Ǔ' => 'Ǔ', - 'ǔ' => 'ǔ', - 'Ǖ' => 'Ǖ', - 'ǖ' => 'ǖ', - 'Ǘ' => 'Ǘ', - 'ǘ' => 'ǘ', - 'Ǚ' => 'Ǚ', - 'ǚ' => 'ǚ', - 'Ǜ' => 'Ǜ', - 'ǜ' => 'ǜ', - 'Ǟ' => 'Ǟ', - 'ǟ' => 'ǟ', - 'Ǡ' => 'Ǡ', - 'ǡ' => 'ǡ', - 'Ǣ' => 'Ǣ', - 'ǣ' => 'ǣ', - 'Ǧ' => 'Ǧ', - 'ǧ' => 'ǧ', - 'Ǩ' => 'Ǩ', - 'ǩ' => 'ǩ', - 'Ǫ' => 'Ǫ', - 'ǫ' => 'ǫ', - 'Ǭ' => 'Ǭ', - 'ǭ' => 'ǭ', - 'Ǯ' => 'Ǯ', - 'ǯ' => 'ǯ', - 'ǰ' => 'ǰ', - 'Ǵ' => 'Ǵ', - 'ǵ' => 'ǵ', - 'Ǹ' => 'Ǹ', - 'ǹ' => 'ǹ', - 'Ǻ' => 'Ǻ', - 'ǻ' => 'ǻ', - 'Ǽ' => 'Ǽ', - 'ǽ' => 'ǽ', - 'Ǿ' => 'Ǿ', - 'ǿ' => 'ǿ', - 'Ȁ' => 'Ȁ', - 'ȁ' => 'ȁ', - 'Ȃ' => 'Ȃ', - 'ȃ' => 'ȃ', - 'Ȅ' => 'Ȅ', - 'ȅ' => 'ȅ', - 'Ȇ' => 'Ȇ', - 'ȇ' => 'ȇ', - 'Ȉ' => 'Ȉ', - 'ȉ' => 'ȉ', - 'Ȋ' => 'Ȋ', - 'ȋ' => 'ȋ', - 'Ȍ' => 'Ȍ', - 'ȍ' => 'ȍ', - 'Ȏ' => 'Ȏ', - 'ȏ' => 'ȏ', - 'Ȑ' => 'Ȑ', - 'ȑ' => 'ȑ', - 'Ȓ' => 'Ȓ', - 'ȓ' => 'ȓ', - 'Ȕ' => 'Ȕ', - 'ȕ' => 'ȕ', - 'Ȗ' => 'Ȗ', - 'ȗ' => 'ȗ', - 'Ș' => 'Ș', - 'ș' => 'ș', - 'Ț' => 'Ț', - 'ț' => 'ț', - 'Ȟ' => 'Ȟ', - 'ȟ' => 'ȟ', - 'Ȧ' => 'Ȧ', - 'ȧ' => 'ȧ', - 'Ȩ' => 'Ȩ', - 'ȩ' => 'ȩ', - 'Ȫ' => 'Ȫ', - 'ȫ' => 'ȫ', - 'Ȭ' => 'Ȭ', - 'ȭ' => 'ȭ', - 'Ȯ' => 'Ȯ', - 'ȯ' => 'ȯ', - 'Ȱ' => 'Ȱ', - 'ȱ' => 'ȱ', - 'Ȳ' => 'Ȳ', - 'ȳ' => 'ȳ', - '΅' => '΅', - 'Ά' => 'Ά', - 'Έ' => 'Έ', - 'Ή' => 'Ή', - 'Ί' => 'Ί', - 'Ό' => 'Ό', - 'Ύ' => 'Ύ', - 'Ώ' => 'Ώ', - 'ΐ' => 'ΐ', - 'Ϊ' => 'Ϊ', - 'Ϋ' => 'Ϋ', - 'ά' => 'ά', - 'έ' => 'έ', - 'ή' => 'ή', - 'ί' => 'ί', - 'ΰ' => 'ΰ', - 'ϊ' => 'ϊ', - 'ϋ' => 'ϋ', - 'ό' => 'ό', - 'ύ' => 'ύ', - 'ώ' => 'ώ', - 'ϓ' => 'ϓ', - 'ϔ' => 'ϔ', - 'Ѐ' => 'Ѐ', - 'Ё' => 'Ё', - 'Ѓ' => 'Ѓ', - 'Ї' => 'Ї', - 'Ќ' => 'Ќ', - 'Ѝ' => 'Ѝ', - 'Ў' => 'Ў', - 'Й' => 'Й', - 'й' => 'й', - 'ѐ' => 'ѐ', - 'ё' => 'ё', - 'ѓ' => 'ѓ', - 'ї' => 'ї', - 'ќ' => 'ќ', - 'ѝ' => 'ѝ', - 'ў' => 'ў', - 'Ѷ' => 'Ѷ', - 'ѷ' => 'ѷ', - 'Ӂ' => 'Ӂ', - 'ӂ' => 'ӂ', - 'Ӑ' => 'Ӑ', - 'ӑ' => 'ӑ', - 'Ӓ' => 'Ӓ', - 'ӓ' => 'ӓ', - 'Ӗ' => 'Ӗ', - 'ӗ' => 'ӗ', - 'Ӛ' => 'Ӛ', - 'ӛ' => 'ӛ', - 'Ӝ' => 'Ӝ', - 'ӝ' => 'ӝ', - 'Ӟ' => 'Ӟ', - 'ӟ' => 'ӟ', - 'Ӣ' => 'Ӣ', - 'ӣ' => 'ӣ', - 'Ӥ' => 'Ӥ', - 'ӥ' => 'ӥ', - 'Ӧ' => 'Ӧ', - 'ӧ' => 'ӧ', - 'Ӫ' => 'Ӫ', - 'ӫ' => 'ӫ', - 'Ӭ' => 'Ӭ', - 'ӭ' => 'ӭ', - 'Ӯ' => 'Ӯ', - 'ӯ' => 'ӯ', - 'Ӱ' => 'Ӱ', - 'ӱ' => 'ӱ', - 'Ӳ' => 'Ӳ', - 'ӳ' => 'ӳ', - 'Ӵ' => 'Ӵ', - 'ӵ' => 'ӵ', - 'Ӹ' => 'Ӹ', - 'ӹ' => 'ӹ', - 'آ' => 'آ', - 'أ' => 'أ', - 'ؤ' => 'ؤ', - 'إ' => 'إ', - 'ئ' => 'ئ', - 'ۀ' => 'ۀ', - 'ۂ' => 'ۂ', - 'ۓ' => 'ۓ', - 'ऩ' => 'ऩ', - 'ऱ' => 'ऱ', - 'ऴ' => 'ऴ', - 'ো' => 'ো', - 'ৌ' => 'ৌ', - 'ୈ' => 'ୈ', - 'ୋ' => 'ୋ', - 'ୌ' => 'ୌ', - 'ஔ' => 'ஔ', - 'ொ' => 'ொ', - 'ோ' => 'ோ', - 'ௌ' => 'ௌ', - 'ై' => 'ై', - 'ೀ' => 'ೀ', - 'ೇ' => 'ೇ', - 'ೈ' => 'ೈ', - 'ೊ' => 'ೊ', - 'ೋ' => 'ೋ', - 'ൊ' => 'ൊ', - 'ോ' => 'ോ', - 'ൌ' => 'ൌ', - 'ේ' => 'ේ', - 'ො' => 'ො', - 'ෝ' => 'ෝ', - 'ෞ' => 'ෞ', - 'ဦ' => 'ဦ', - 'ᬆ' => 'ᬆ', - 'ᬈ' => 'ᬈ', - 'ᬊ' => 'ᬊ', - 'ᬌ' => 'ᬌ', - 'ᬎ' => 'ᬎ', - 'ᬒ' => 'ᬒ', - 'ᬻ' => 'ᬻ', - 'ᬽ' => 'ᬽ', - 'ᭀ' => 'ᭀ', - 'ᭁ' => 'ᭁ', - 'ᭃ' => 'ᭃ', - 'Ḁ' => 'Ḁ', - 'ḁ' => 'ḁ', - 'Ḃ' => 'Ḃ', - 'ḃ' => 'ḃ', - 'Ḅ' => 'Ḅ', - 'ḅ' => 'ḅ', - 'Ḇ' => 'Ḇ', - 'ḇ' => 'ḇ', - 'Ḉ' => 'Ḉ', - 'ḉ' => 'ḉ', - 'Ḋ' => 'Ḋ', - 'ḋ' => 'ḋ', - 'Ḍ' => 'Ḍ', - 'ḍ' => 'ḍ', - 'Ḏ' => 'Ḏ', - 'ḏ' => 'ḏ', - 'Ḑ' => 'Ḑ', - 'ḑ' => 'ḑ', - 'Ḓ' => 'Ḓ', - 'ḓ' => 'ḓ', - 'Ḕ' => 'Ḕ', - 'ḕ' => 'ḕ', - 'Ḗ' => 'Ḗ', - 'ḗ' => 'ḗ', - 'Ḙ' => 'Ḙ', - 'ḙ' => 'ḙ', - 'Ḛ' => 'Ḛ', - 'ḛ' => 'ḛ', - 'Ḝ' => 'Ḝ', - 'ḝ' => 'ḝ', - 'Ḟ' => 'Ḟ', - 'ḟ' => 'ḟ', - 'Ḡ' => 'Ḡ', - 'ḡ' => 'ḡ', - 'Ḣ' => 'Ḣ', - 'ḣ' => 'ḣ', - 'Ḥ' => 'Ḥ', - 'ḥ' => 'ḥ', - 'Ḧ' => 'Ḧ', - 'ḧ' => 'ḧ', - 'Ḩ' => 'Ḩ', - 'ḩ' => 'ḩ', - 'Ḫ' => 'Ḫ', - 'ḫ' => 'ḫ', - 'Ḭ' => 'Ḭ', - 'ḭ' => 'ḭ', - 'Ḯ' => 'Ḯ', - 'ḯ' => 'ḯ', - 'Ḱ' => 'Ḱ', - 'ḱ' => 'ḱ', - 'Ḳ' => 'Ḳ', - 'ḳ' => 'ḳ', - 'Ḵ' => 'Ḵ', - 'ḵ' => 'ḵ', - 'Ḷ' => 'Ḷ', - 'ḷ' => 'ḷ', - 'Ḹ' => 'Ḹ', - 'ḹ' => 'ḹ', - 'Ḻ' => 'Ḻ', - 'ḻ' => 'ḻ', - 'Ḽ' => 'Ḽ', - 'ḽ' => 'ḽ', - 'Ḿ' => 'Ḿ', - 'ḿ' => 'ḿ', - 'Ṁ' => 'Ṁ', - 'ṁ' => 'ṁ', - 'Ṃ' => 'Ṃ', - 'ṃ' => 'ṃ', - 'Ṅ' => 'Ṅ', - 'ṅ' => 'ṅ', - 'Ṇ' => 'Ṇ', - 'ṇ' => 'ṇ', - 'Ṉ' => 'Ṉ', - 'ṉ' => 'ṉ', - 'Ṋ' => 'Ṋ', - 'ṋ' => 'ṋ', - 'Ṍ' => 'Ṍ', - 'ṍ' => 'ṍ', - 'Ṏ' => 'Ṏ', - 'ṏ' => 'ṏ', - 'Ṑ' => 'Ṑ', - 'ṑ' => 'ṑ', - 'Ṓ' => 'Ṓ', - 'ṓ' => 'ṓ', - 'Ṕ' => 'Ṕ', - 'ṕ' => 'ṕ', - 'Ṗ' => 'Ṗ', - 'ṗ' => 'ṗ', - 'Ṙ' => 'Ṙ', - 'ṙ' => 'ṙ', - 'Ṛ' => 'Ṛ', - 'ṛ' => 'ṛ', - 'Ṝ' => 'Ṝ', - 'ṝ' => 'ṝ', - 'Ṟ' => 'Ṟ', - 'ṟ' => 'ṟ', - 'Ṡ' => 'Ṡ', - 'ṡ' => 'ṡ', - 'Ṣ' => 'Ṣ', - 'ṣ' => 'ṣ', - 'Ṥ' => 'Ṥ', - 'ṥ' => 'ṥ', - 'Ṧ' => 'Ṧ', - 'ṧ' => 'ṧ', - 'Ṩ' => 'Ṩ', - 'ṩ' => 'ṩ', - 'Ṫ' => 'Ṫ', - 'ṫ' => 'ṫ', - 'Ṭ' => 'Ṭ', - 'ṭ' => 'ṭ', - 'Ṯ' => 'Ṯ', - 'ṯ' => 'ṯ', - 'Ṱ' => 'Ṱ', - 'ṱ' => 'ṱ', - 'Ṳ' => 'Ṳ', - 'ṳ' => 'ṳ', - 'Ṵ' => 'Ṵ', - 'ṵ' => 'ṵ', - 'Ṷ' => 'Ṷ', - 'ṷ' => 'ṷ', - 'Ṹ' => 'Ṹ', - 'ṹ' => 'ṹ', - 'Ṻ' => 'Ṻ', - 'ṻ' => 'ṻ', - 'Ṽ' => 'Ṽ', - 'ṽ' => 'ṽ', - 'Ṿ' => 'Ṿ', - 'ṿ' => 'ṿ', - 'Ẁ' => 'Ẁ', - 'ẁ' => 'ẁ', - 'Ẃ' => 'Ẃ', - 'ẃ' => 'ẃ', - 'Ẅ' => 'Ẅ', - 'ẅ' => 'ẅ', - 'Ẇ' => 'Ẇ', - 'ẇ' => 'ẇ', - 'Ẉ' => 'Ẉ', - 'ẉ' => 'ẉ', - 'Ẋ' => 'Ẋ', - 'ẋ' => 'ẋ', - 'Ẍ' => 'Ẍ', - 'ẍ' => 'ẍ', - 'Ẏ' => 'Ẏ', - 'ẏ' => 'ẏ', - 'Ẑ' => 'Ẑ', - 'ẑ' => 'ẑ', - 'Ẓ' => 'Ẓ', - 'ẓ' => 'ẓ', - 'Ẕ' => 'Ẕ', - 'ẕ' => 'ẕ', - 'ẖ' => 'ẖ', - 'ẗ' => 'ẗ', - 'ẘ' => 'ẘ', - 'ẙ' => 'ẙ', - 'ẛ' => 'ẛ', - 'Ạ' => 'Ạ', - 'ạ' => 'ạ', - 'Ả' => 'Ả', - 'ả' => 'ả', - 'Ấ' => 'Ấ', - 'ấ' => 'ấ', - 'Ầ' => 'Ầ', - 'ầ' => 'ầ', - 'Ẩ' => 'Ẩ', - 'ẩ' => 'ẩ', - 'Ẫ' => 'Ẫ', - 'ẫ' => 'ẫ', - 'Ậ' => 'Ậ', - 'ậ' => 'ậ', - 'Ắ' => 'Ắ', - 'ắ' => 'ắ', - 'Ằ' => 'Ằ', - 'ằ' => 'ằ', - 'Ẳ' => 'Ẳ', - 'ẳ' => 'ẳ', - 'Ẵ' => 'Ẵ', - 'ẵ' => 'ẵ', - 'Ặ' => 'Ặ', - 'ặ' => 'ặ', - 'Ẹ' => 'Ẹ', - 'ẹ' => 'ẹ', - 'Ẻ' => 'Ẻ', - 'ẻ' => 'ẻ', - 'Ẽ' => 'Ẽ', - 'ẽ' => 'ẽ', - 'Ế' => 'Ế', - 'ế' => 'ế', - 'Ề' => 'Ề', - 'ề' => 'ề', - 'Ể' => 'Ể', - 'ể' => 'ể', - 'Ễ' => 'Ễ', - 'ễ' => 'ễ', - 'Ệ' => 'Ệ', - 'ệ' => 'ệ', - 'Ỉ' => 'Ỉ', - 'ỉ' => 'ỉ', - 'Ị' => 'Ị', - 'ị' => 'ị', - 'Ọ' => 'Ọ', - 'ọ' => 'ọ', - 'Ỏ' => 'Ỏ', - 'ỏ' => 'ỏ', - 'Ố' => 'Ố', - 'ố' => 'ố', - 'Ồ' => 'Ồ', - 'ồ' => 'ồ', - 'Ổ' => 'Ổ', - 'ổ' => 'ổ', - 'Ỗ' => 'Ỗ', - 'ỗ' => 'ỗ', - 'Ộ' => 'Ộ', - 'ộ' => 'ộ', - 'Ớ' => 'Ớ', - 'ớ' => 'ớ', - 'Ờ' => 'Ờ', - 'ờ' => 'ờ', - 'Ở' => 'Ở', - 'ở' => 'ở', - 'Ỡ' => 'Ỡ', - 'ỡ' => 'ỡ', - 'Ợ' => 'Ợ', - 'ợ' => 'ợ', - 'Ụ' => 'Ụ', - 'ụ' => 'ụ', - 'Ủ' => 'Ủ', - 'ủ' => 'ủ', - 'Ứ' => 'Ứ', - 'ứ' => 'ứ', - 'Ừ' => 'Ừ', - 'ừ' => 'ừ', - 'Ử' => 'Ử', - 'ử' => 'ử', - 'Ữ' => 'Ữ', - 'ữ' => 'ữ', - 'Ự' => 'Ự', - 'ự' => 'ự', - 'Ỳ' => 'Ỳ', - 'ỳ' => 'ỳ', - 'Ỵ' => 'Ỵ', - 'ỵ' => 'ỵ', - 'Ỷ' => 'Ỷ', - 'ỷ' => 'ỷ', - 'Ỹ' => 'Ỹ', - 'ỹ' => 'ỹ', - 'ἀ' => 'ἀ', - 'ἁ' => 'ἁ', - 'ἂ' => 'ἂ', - 'ἃ' => 'ἃ', - 'ἄ' => 'ἄ', - 'ἅ' => 'ἅ', - 'ἆ' => 'ἆ', - 'ἇ' => 'ἇ', - 'Ἀ' => 'Ἀ', - 'Ἁ' => 'Ἁ', - 'Ἂ' => 'Ἂ', - 'Ἃ' => 'Ἃ', - 'Ἄ' => 'Ἄ', - 'Ἅ' => 'Ἅ', - 'Ἆ' => 'Ἆ', - 'Ἇ' => 'Ἇ', - 'ἐ' => 'ἐ', - 'ἑ' => 'ἑ', - 'ἒ' => 'ἒ', - 'ἓ' => 'ἓ', - 'ἔ' => 'ἔ', - 'ἕ' => 'ἕ', - 'Ἐ' => 'Ἐ', - 'Ἑ' => 'Ἑ', - 'Ἒ' => 'Ἒ', - 'Ἓ' => 'Ἓ', - 'Ἔ' => 'Ἔ', - 'Ἕ' => 'Ἕ', - 'ἠ' => 'ἠ', - 'ἡ' => 'ἡ', - 'ἢ' => 'ἢ', - 'ἣ' => 'ἣ', - 'ἤ' => 'ἤ', - 'ἥ' => 'ἥ', - 'ἦ' => 'ἦ', - 'ἧ' => 'ἧ', - 'Ἠ' => 'Ἠ', - 'Ἡ' => 'Ἡ', - 'Ἢ' => 'Ἢ', - 'Ἣ' => 'Ἣ', - 'Ἤ' => 'Ἤ', - 'Ἥ' => 'Ἥ', - 'Ἦ' => 'Ἦ', - 'Ἧ' => 'Ἧ', - 'ἰ' => 'ἰ', - 'ἱ' => 'ἱ', - 'ἲ' => 'ἲ', - 'ἳ' => 'ἳ', - 'ἴ' => 'ἴ', - 'ἵ' => 'ἵ', - 'ἶ' => 'ἶ', - 'ἷ' => 'ἷ', - 'Ἰ' => 'Ἰ', - 'Ἱ' => 'Ἱ', - 'Ἲ' => 'Ἲ', - 'Ἳ' => 'Ἳ', - 'Ἴ' => 'Ἴ', - 'Ἵ' => 'Ἵ', - 'Ἶ' => 'Ἶ', - 'Ἷ' => 'Ἷ', - 'ὀ' => 'ὀ', - 'ὁ' => 'ὁ', - 'ὂ' => 'ὂ', - 'ὃ' => 'ὃ', - 'ὄ' => 'ὄ', - 'ὅ' => 'ὅ', - 'Ὀ' => 'Ὀ', - 'Ὁ' => 'Ὁ', - 'Ὂ' => 'Ὂ', - 'Ὃ' => 'Ὃ', - 'Ὄ' => 'Ὄ', - 'Ὅ' => 'Ὅ', - 'ὐ' => 'ὐ', - 'ὑ' => 'ὑ', - 'ὒ' => 'ὒ', - 'ὓ' => 'ὓ', - 'ὔ' => 'ὔ', - 'ὕ' => 'ὕ', - 'ὖ' => 'ὖ', - 'ὗ' => 'ὗ', - 'Ὑ' => 'Ὑ', - 'Ὓ' => 'Ὓ', - 'Ὕ' => 'Ὕ', - 'Ὗ' => 'Ὗ', - 'ὠ' => 'ὠ', - 'ὡ' => 'ὡ', - 'ὢ' => 'ὢ', - 'ὣ' => 'ὣ', - 'ὤ' => 'ὤ', - 'ὥ' => 'ὥ', - 'ὦ' => 'ὦ', - 'ὧ' => 'ὧ', - 'Ὠ' => 'Ὠ', - 'Ὡ' => 'Ὡ', - 'Ὢ' => 'Ὢ', - 'Ὣ' => 'Ὣ', - 'Ὤ' => 'Ὤ', - 'Ὥ' => 'Ὥ', - 'Ὦ' => 'Ὦ', - 'Ὧ' => 'Ὧ', - 'ὰ' => 'ὰ', - 'ὲ' => 'ὲ', - 'ὴ' => 'ὴ', - 'ὶ' => 'ὶ', - 'ὸ' => 'ὸ', - 'ὺ' => 'ὺ', - 'ὼ' => 'ὼ', - 'ᾀ' => 'ᾀ', - 'ᾁ' => 'ᾁ', - 'ᾂ' => 'ᾂ', - 'ᾃ' => 'ᾃ', - 'ᾄ' => 'ᾄ', - 'ᾅ' => 'ᾅ', - 'ᾆ' => 'ᾆ', - 'ᾇ' => 'ᾇ', - 'ᾈ' => 'ᾈ', - 'ᾉ' => 'ᾉ', - 'ᾊ' => 'ᾊ', - 'ᾋ' => 'ᾋ', - 'ᾌ' => 'ᾌ', - 'ᾍ' => 'ᾍ', - 'ᾎ' => 'ᾎ', - 'ᾏ' => 'ᾏ', - 'ᾐ' => 'ᾐ', - 'ᾑ' => 'ᾑ', - 'ᾒ' => 'ᾒ', - 'ᾓ' => 'ᾓ', - 'ᾔ' => 'ᾔ', - 'ᾕ' => 'ᾕ', - 'ᾖ' => 'ᾖ', - 'ᾗ' => 'ᾗ', - 'ᾘ' => 'ᾘ', - 'ᾙ' => 'ᾙ', - 'ᾚ' => 'ᾚ', - 'ᾛ' => 'ᾛ', - 'ᾜ' => 'ᾜ', - 'ᾝ' => 'ᾝ', - 'ᾞ' => 'ᾞ', - 'ᾟ' => 'ᾟ', - 'ᾠ' => 'ᾠ', - 'ᾡ' => 'ᾡ', - 'ᾢ' => 'ᾢ', - 'ᾣ' => 'ᾣ', - 'ᾤ' => 'ᾤ', - 'ᾥ' => 'ᾥ', - 'ᾦ' => 'ᾦ', - 'ᾧ' => 'ᾧ', - 'ᾨ' => 'ᾨ', - 'ᾩ' => 'ᾩ', - 'ᾪ' => 'ᾪ', - 'ᾫ' => 'ᾫ', - 'ᾬ' => 'ᾬ', - 'ᾭ' => 'ᾭ', - 'ᾮ' => 'ᾮ', - 'ᾯ' => 'ᾯ', - 'ᾰ' => 'ᾰ', - 'ᾱ' => 'ᾱ', - 'ᾲ' => 'ᾲ', - 'ᾳ' => 'ᾳ', - 'ᾴ' => 'ᾴ', - 'ᾶ' => 'ᾶ', - 'ᾷ' => 'ᾷ', - 'Ᾰ' => 'Ᾰ', - 'Ᾱ' => 'Ᾱ', - 'Ὰ' => 'Ὰ', - 'ᾼ' => 'ᾼ', - '῁' => '῁', - 'ῂ' => 'ῂ', - 'ῃ' => 'ῃ', - 'ῄ' => 'ῄ', - 'ῆ' => 'ῆ', - 'ῇ' => 'ῇ', - 'Ὲ' => 'Ὲ', - 'Ὴ' => 'Ὴ', - 'ῌ' => 'ῌ', - '῍' => '῍', - '῎' => '῎', - '῏' => '῏', - 'ῐ' => 'ῐ', - 'ῑ' => 'ῑ', - 'ῒ' => 'ῒ', - 'ῖ' => 'ῖ', - 'ῗ' => 'ῗ', - 'Ῐ' => 'Ῐ', - 'Ῑ' => 'Ῑ', - 'Ὶ' => 'Ὶ', - '῝' => '῝', - '῞' => '῞', - '῟' => '῟', - 'ῠ' => 'ῠ', - 'ῡ' => 'ῡ', - 'ῢ' => 'ῢ', - 'ῤ' => 'ῤ', - 'ῥ' => 'ῥ', - 'ῦ' => 'ῦ', - 'ῧ' => 'ῧ', - 'Ῠ' => 'Ῠ', - 'Ῡ' => 'Ῡ', - 'Ὺ' => 'Ὺ', - 'Ῥ' => 'Ῥ', - '῭' => '῭', - 'ῲ' => 'ῲ', - 'ῳ' => 'ῳ', - 'ῴ' => 'ῴ', - 'ῶ' => 'ῶ', - 'ῷ' => 'ῷ', - 'Ὸ' => 'Ὸ', - 'Ὼ' => 'Ὼ', - 'ῼ' => 'ῼ', - '↚' => '↚', - '↛' => '↛', - '↮' => '↮', - '⇍' => '⇍', - '⇎' => '⇎', - '⇏' => '⇏', - '∄' => '∄', - '∉' => '∉', - '∌' => '∌', - '∤' => '∤', - '∦' => '∦', - '≁' => '≁', - '≄' => '≄', - '≇' => '≇', - '≉' => '≉', - '≠' => '≠', - '≢' => '≢', - '≭' => '≭', - '≮' => '≮', - '≯' => '≯', - '≰' => '≰', - '≱' => '≱', - '≴' => '≴', - '≵' => '≵', - '≸' => '≸', - '≹' => '≹', - '⊀' => '⊀', - '⊁' => '⊁', - '⊄' => '⊄', - '⊅' => '⊅', - '⊈' => '⊈', - '⊉' => '⊉', - '⊬' => '⊬', - '⊭' => '⊭', - '⊮' => '⊮', - '⊯' => '⊯', - '⋠' => '⋠', - '⋡' => '⋡', - '⋢' => '⋢', - '⋣' => '⋣', - '⋪' => '⋪', - '⋫' => '⋫', - '⋬' => '⋬', - '⋭' => '⋭', - 'が' => 'が', - 'ぎ' => 'ぎ', - 'ぐ' => 'ぐ', - 'げ' => 'げ', - 'ご' => 'ご', - 'ざ' => 'ざ', - 'じ' => 'じ', - 'ず' => 'ず', - 'ぜ' => 'ぜ', - 'ぞ' => 'ぞ', - 'だ' => 'だ', - 'ぢ' => 'ぢ', - 'づ' => 'づ', - 'で' => 'で', - 'ど' => 'ど', - 'ば' => 'ば', - 'ぱ' => 'ぱ', - 'び' => 'び', - 'ぴ' => 'ぴ', - 'ぶ' => 'ぶ', - 'ぷ' => 'ぷ', - 'べ' => 'べ', - 'ぺ' => 'ぺ', - 'ぼ' => 'ぼ', - 'ぽ' => 'ぽ', - 'ゔ' => 'ゔ', - 'ゞ' => 'ゞ', - 'ガ' => 'ガ', - 'ギ' => 'ギ', - 'グ' => 'グ', - 'ゲ' => 'ゲ', - 'ゴ' => 'ゴ', - 'ザ' => 'ザ', - 'ジ' => 'ジ', - 'ズ' => 'ズ', - 'ゼ' => 'ゼ', - 'ゾ' => 'ゾ', - 'ダ' => 'ダ', - 'ヂ' => 'ヂ', - 'ヅ' => 'ヅ', - 'デ' => 'デ', - 'ド' => 'ド', - 'バ' => 'バ', - 'パ' => 'パ', - 'ビ' => 'ビ', - 'ピ' => 'ピ', - 'ブ' => 'ブ', - 'プ' => 'プ', - 'ベ' => 'ベ', - 'ペ' => 'ペ', - 'ボ' => 'ボ', - 'ポ' => 'ポ', - 'ヴ' => 'ヴ', - 'ヷ' => 'ヷ', - 'ヸ' => 'ヸ', - 'ヹ' => 'ヹ', - 'ヺ' => 'ヺ', - 'ヾ' => 'ヾ', - '𑂚' => '𑂚', - '𑂜' => '𑂜', - '𑂫' => '𑂫', - '𑄮' => '𑄮', - '𑄯' => '𑄯', - '𑍋' => '𑍋', - '𑍌' => '𑍌', - '𑒻' => '𑒻', - '𑒼' => '𑒼', - '𑒾' => '𑒾', - '𑖺' => '𑖺', - '𑖻' => '𑖻', - '𑤸' => '𑤸', -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php deleted file mode 100644 index 5a3e8e09..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php +++ /dev/null @@ -1,2065 +0,0 @@ - 'À', - 'Á' => 'Á', - 'Â' => 'Â', - 'Ã' => 'Ã', - 'Ä' => 'Ä', - 'Å' => 'Å', - 'Ç' => 'Ç', - 'È' => 'È', - 'É' => 'É', - 'Ê' => 'Ê', - 'Ë' => 'Ë', - 'Ì' => 'Ì', - 'Í' => 'Í', - 'Î' => 'Î', - 'Ï' => 'Ï', - 'Ñ' => 'Ñ', - 'Ò' => 'Ò', - 'Ó' => 'Ó', - 'Ô' => 'Ô', - 'Õ' => 'Õ', - 'Ö' => 'Ö', - 'Ù' => 'Ù', - 'Ú' => 'Ú', - 'Û' => 'Û', - 'Ü' => 'Ü', - 'Ý' => 'Ý', - 'à' => 'à', - 'á' => 'á', - 'â' => 'â', - 'ã' => 'ã', - 'ä' => 'ä', - 'å' => 'å', - 'ç' => 'ç', - 'è' => 'è', - 'é' => 'é', - 'ê' => 'ê', - 'ë' => 'ë', - 'ì' => 'ì', - 'í' => 'í', - 'î' => 'î', - 'ï' => 'ï', - 'ñ' => 'ñ', - 'ò' => 'ò', - 'ó' => 'ó', - 'ô' => 'ô', - 'õ' => 'õ', - 'ö' => 'ö', - 'ù' => 'ù', - 'ú' => 'ú', - 'û' => 'û', - 'ü' => 'ü', - 'ý' => 'ý', - 'ÿ' => 'ÿ', - 'Ā' => 'Ā', - 'ā' => 'ā', - 'Ă' => 'Ă', - 'ă' => 'ă', - 'Ą' => 'Ą', - 'ą' => 'ą', - 'Ć' => 'Ć', - 'ć' => 'ć', - 'Ĉ' => 'Ĉ', - 'ĉ' => 'ĉ', - 'Ċ' => 'Ċ', - 'ċ' => 'ċ', - 'Č' => 'Č', - 'č' => 'č', - 'Ď' => 'Ď', - 'ď' => 'ď', - 'Ē' => 'Ē', - 'ē' => 'ē', - 'Ĕ' => 'Ĕ', - 'ĕ' => 'ĕ', - 'Ė' => 'Ė', - 'ė' => 'ė', - 'Ę' => 'Ę', - 'ę' => 'ę', - 'Ě' => 'Ě', - 'ě' => 'ě', - 'Ĝ' => 'Ĝ', - 'ĝ' => 'ĝ', - 'Ğ' => 'Ğ', - 'ğ' => 'ğ', - 'Ġ' => 'Ġ', - 'ġ' => 'ġ', - 'Ģ' => 'Ģ', - 'ģ' => 'ģ', - 'Ĥ' => 'Ĥ', - 'ĥ' => 'ĥ', - 'Ĩ' => 'Ĩ', - 'ĩ' => 'ĩ', - 'Ī' => 'Ī', - 'ī' => 'ī', - 'Ĭ' => 'Ĭ', - 'ĭ' => 'ĭ', - 'Į' => 'Į', - 'į' => 'į', - 'İ' => 'İ', - 'Ĵ' => 'Ĵ', - 'ĵ' => 'ĵ', - 'Ķ' => 'Ķ', - 'ķ' => 'ķ', - 'Ĺ' => 'Ĺ', - 'ĺ' => 'ĺ', - 'Ļ' => 'Ļ', - 'ļ' => 'ļ', - 'Ľ' => 'Ľ', - 'ľ' => 'ľ', - 'Ń' => 'Ń', - 'ń' => 'ń', - 'Ņ' => 'Ņ', - 'ņ' => 'ņ', - 'Ň' => 'Ň', - 'ň' => 'ň', - 'Ō' => 'Ō', - 'ō' => 'ō', - 'Ŏ' => 'Ŏ', - 'ŏ' => 'ŏ', - 'Ő' => 'Ő', - 'ő' => 'ő', - 'Ŕ' => 'Ŕ', - 'ŕ' => 'ŕ', - 'Ŗ' => 'Ŗ', - 'ŗ' => 'ŗ', - 'Ř' => 'Ř', - 'ř' => 'ř', - 'Ś' => 'Ś', - 'ś' => 'ś', - 'Ŝ' => 'Ŝ', - 'ŝ' => 'ŝ', - 'Ş' => 'Ş', - 'ş' => 'ş', - 'Š' => 'Š', - 'š' => 'š', - 'Ţ' => 'Ţ', - 'ţ' => 'ţ', - 'Ť' => 'Ť', - 'ť' => 'ť', - 'Ũ' => 'Ũ', - 'ũ' => 'ũ', - 'Ū' => 'Ū', - 'ū' => 'ū', - 'Ŭ' => 'Ŭ', - 'ŭ' => 'ŭ', - 'Ů' => 'Ů', - 'ů' => 'ů', - 'Ű' => 'Ű', - 'ű' => 'ű', - 'Ų' => 'Ų', - 'ų' => 'ų', - 'Ŵ' => 'Ŵ', - 'ŵ' => 'ŵ', - 'Ŷ' => 'Ŷ', - 'ŷ' => 'ŷ', - 'Ÿ' => 'Ÿ', - 'Ź' => 'Ź', - 'ź' => 'ź', - 'Ż' => 'Ż', - 'ż' => 'ż', - 'Ž' => 'Ž', - 'ž' => 'ž', - 'Ơ' => 'Ơ', - 'ơ' => 'ơ', - 'Ư' => 'Ư', - 'ư' => 'ư', - 'Ǎ' => 'Ǎ', - 'ǎ' => 'ǎ', - 'Ǐ' => 'Ǐ', - 'ǐ' => 'ǐ', - 'Ǒ' => 'Ǒ', - 'ǒ' => 'ǒ', - 'Ǔ' => 'Ǔ', - 'ǔ' => 'ǔ', - 'Ǖ' => 'Ǖ', - 'ǖ' => 'ǖ', - 'Ǘ' => 'Ǘ', - 'ǘ' => 'ǘ', - 'Ǚ' => 'Ǚ', - 'ǚ' => 'ǚ', - 'Ǜ' => 'Ǜ', - 'ǜ' => 'ǜ', - 'Ǟ' => 'Ǟ', - 'ǟ' => 'ǟ', - 'Ǡ' => 'Ǡ', - 'ǡ' => 'ǡ', - 'Ǣ' => 'Ǣ', - 'ǣ' => 'ǣ', - 'Ǧ' => 'Ǧ', - 'ǧ' => 'ǧ', - 'Ǩ' => 'Ǩ', - 'ǩ' => 'ǩ', - 'Ǫ' => 'Ǫ', - 'ǫ' => 'ǫ', - 'Ǭ' => 'Ǭ', - 'ǭ' => 'ǭ', - 'Ǯ' => 'Ǯ', - 'ǯ' => 'ǯ', - 'ǰ' => 'ǰ', - 'Ǵ' => 'Ǵ', - 'ǵ' => 'ǵ', - 'Ǹ' => 'Ǹ', - 'ǹ' => 'ǹ', - 'Ǻ' => 'Ǻ', - 'ǻ' => 'ǻ', - 'Ǽ' => 'Ǽ', - 'ǽ' => 'ǽ', - 'Ǿ' => 'Ǿ', - 'ǿ' => 'ǿ', - 'Ȁ' => 'Ȁ', - 'ȁ' => 'ȁ', - 'Ȃ' => 'Ȃ', - 'ȃ' => 'ȃ', - 'Ȅ' => 'Ȅ', - 'ȅ' => 'ȅ', - 'Ȇ' => 'Ȇ', - 'ȇ' => 'ȇ', - 'Ȉ' => 'Ȉ', - 'ȉ' => 'ȉ', - 'Ȋ' => 'Ȋ', - 'ȋ' => 'ȋ', - 'Ȍ' => 'Ȍ', - 'ȍ' => 'ȍ', - 'Ȏ' => 'Ȏ', - 'ȏ' => 'ȏ', - 'Ȑ' => 'Ȑ', - 'ȑ' => 'ȑ', - 'Ȓ' => 'Ȓ', - 'ȓ' => 'ȓ', - 'Ȕ' => 'Ȕ', - 'ȕ' => 'ȕ', - 'Ȗ' => 'Ȗ', - 'ȗ' => 'ȗ', - 'Ș' => 'Ș', - 'ș' => 'ș', - 'Ț' => 'Ț', - 'ț' => 'ț', - 'Ȟ' => 'Ȟ', - 'ȟ' => 'ȟ', - 'Ȧ' => 'Ȧ', - 'ȧ' => 'ȧ', - 'Ȩ' => 'Ȩ', - 'ȩ' => 'ȩ', - 'Ȫ' => 'Ȫ', - 'ȫ' => 'ȫ', - 'Ȭ' => 'Ȭ', - 'ȭ' => 'ȭ', - 'Ȯ' => 'Ȯ', - 'ȯ' => 'ȯ', - 'Ȱ' => 'Ȱ', - 'ȱ' => 'ȱ', - 'Ȳ' => 'Ȳ', - 'ȳ' => 'ȳ', - '̀' => '̀', - '́' => '́', - '̓' => '̓', - '̈́' => '̈́', - 'ʹ' => 'ʹ', - ';' => ';', - '΅' => '΅', - 'Ά' => 'Ά', - '·' => '·', - 'Έ' => 'Έ', - 'Ή' => 'Ή', - 'Ί' => 'Ί', - 'Ό' => 'Ό', - 'Ύ' => 'Ύ', - 'Ώ' => 'Ώ', - 'ΐ' => 'ΐ', - 'Ϊ' => 'Ϊ', - 'Ϋ' => 'Ϋ', - 'ά' => 'ά', - 'έ' => 'έ', - 'ή' => 'ή', - 'ί' => 'ί', - 'ΰ' => 'ΰ', - 'ϊ' => 'ϊ', - 'ϋ' => 'ϋ', - 'ό' => 'ό', - 'ύ' => 'ύ', - 'ώ' => 'ώ', - 'ϓ' => 'ϓ', - 'ϔ' => 'ϔ', - 'Ѐ' => 'Ѐ', - 'Ё' => 'Ё', - 'Ѓ' => 'Ѓ', - 'Ї' => 'Ї', - 'Ќ' => 'Ќ', - 'Ѝ' => 'Ѝ', - 'Ў' => 'Ў', - 'Й' => 'Й', - 'й' => 'й', - 'ѐ' => 'ѐ', - 'ё' => 'ё', - 'ѓ' => 'ѓ', - 'ї' => 'ї', - 'ќ' => 'ќ', - 'ѝ' => 'ѝ', - 'ў' => 'ў', - 'Ѷ' => 'Ѷ', - 'ѷ' => 'ѷ', - 'Ӂ' => 'Ӂ', - 'ӂ' => 'ӂ', - 'Ӑ' => 'Ӑ', - 'ӑ' => 'ӑ', - 'Ӓ' => 'Ӓ', - 'ӓ' => 'ӓ', - 'Ӗ' => 'Ӗ', - 'ӗ' => 'ӗ', - 'Ӛ' => 'Ӛ', - 'ӛ' => 'ӛ', - 'Ӝ' => 'Ӝ', - 'ӝ' => 'ӝ', - 'Ӟ' => 'Ӟ', - 'ӟ' => 'ӟ', - 'Ӣ' => 'Ӣ', - 'ӣ' => 'ӣ', - 'Ӥ' => 'Ӥ', - 'ӥ' => 'ӥ', - 'Ӧ' => 'Ӧ', - 'ӧ' => 'ӧ', - 'Ӫ' => 'Ӫ', - 'ӫ' => 'ӫ', - 'Ӭ' => 'Ӭ', - 'ӭ' => 'ӭ', - 'Ӯ' => 'Ӯ', - 'ӯ' => 'ӯ', - 'Ӱ' => 'Ӱ', - 'ӱ' => 'ӱ', - 'Ӳ' => 'Ӳ', - 'ӳ' => 'ӳ', - 'Ӵ' => 'Ӵ', - 'ӵ' => 'ӵ', - 'Ӹ' => 'Ӹ', - 'ӹ' => 'ӹ', - 'آ' => 'آ', - 'أ' => 'أ', - 'ؤ' => 'ؤ', - 'إ' => 'إ', - 'ئ' => 'ئ', - 'ۀ' => 'ۀ', - 'ۂ' => 'ۂ', - 'ۓ' => 'ۓ', - 'ऩ' => 'ऩ', - 'ऱ' => 'ऱ', - 'ऴ' => 'ऴ', - 'क़' => 'क़', - 'ख़' => 'ख़', - 'ग़' => 'ग़', - 'ज़' => 'ज़', - 'ड़' => 'ड़', - 'ढ़' => 'ढ़', - 'फ़' => 'फ़', - 'य़' => 'य़', - 'ো' => 'ো', - 'ৌ' => 'ৌ', - 'ড়' => 'ড়', - 'ঢ়' => 'ঢ়', - 'য়' => 'য়', - 'ਲ਼' => 'ਲ਼', - 'ਸ਼' => 'ਸ਼', - 'ਖ਼' => 'ਖ਼', - 'ਗ਼' => 'ਗ਼', - 'ਜ਼' => 'ਜ਼', - 'ਫ਼' => 'ਫ਼', - 'ୈ' => 'ୈ', - 'ୋ' => 'ୋ', - 'ୌ' => 'ୌ', - 'ଡ଼' => 'ଡ଼', - 'ଢ଼' => 'ଢ଼', - 'ஔ' => 'ஔ', - 'ொ' => 'ொ', - 'ோ' => 'ோ', - 'ௌ' => 'ௌ', - 'ై' => 'ై', - 'ೀ' => 'ೀ', - 'ೇ' => 'ೇ', - 'ೈ' => 'ೈ', - 'ೊ' => 'ೊ', - 'ೋ' => 'ೋ', - 'ൊ' => 'ൊ', - 'ോ' => 'ോ', - 'ൌ' => 'ൌ', - 'ේ' => 'ේ', - 'ො' => 'ො', - 'ෝ' => 'ෝ', - 'ෞ' => 'ෞ', - 'གྷ' => 'གྷ', - 'ཌྷ' => 'ཌྷ', - 'དྷ' => 'དྷ', - 'བྷ' => 'བྷ', - 'ཛྷ' => 'ཛྷ', - 'ཀྵ' => 'ཀྵ', - 'ཱི' => 'ཱི', - 'ཱུ' => 'ཱུ', - 'ྲྀ' => 'ྲྀ', - 'ླྀ' => 'ླྀ', - 'ཱྀ' => 'ཱྀ', - 'ྒྷ' => 'ྒྷ', - 'ྜྷ' => 'ྜྷ', - 'ྡྷ' => 'ྡྷ', - 'ྦྷ' => 'ྦྷ', - 'ྫྷ' => 'ྫྷ', - 'ྐྵ' => 'ྐྵ', - 'ဦ' => 'ဦ', - 'ᬆ' => 'ᬆ', - 'ᬈ' => 'ᬈ', - 'ᬊ' => 'ᬊ', - 'ᬌ' => 'ᬌ', - 'ᬎ' => 'ᬎ', - 'ᬒ' => 'ᬒ', - 'ᬻ' => 'ᬻ', - 'ᬽ' => 'ᬽ', - 'ᭀ' => 'ᭀ', - 'ᭁ' => 'ᭁ', - 'ᭃ' => 'ᭃ', - 'Ḁ' => 'Ḁ', - 'ḁ' => 'ḁ', - 'Ḃ' => 'Ḃ', - 'ḃ' => 'ḃ', - 'Ḅ' => 'Ḅ', - 'ḅ' => 'ḅ', - 'Ḇ' => 'Ḇ', - 'ḇ' => 'ḇ', - 'Ḉ' => 'Ḉ', - 'ḉ' => 'ḉ', - 'Ḋ' => 'Ḋ', - 'ḋ' => 'ḋ', - 'Ḍ' => 'Ḍ', - 'ḍ' => 'ḍ', - 'Ḏ' => 'Ḏ', - 'ḏ' => 'ḏ', - 'Ḑ' => 'Ḑ', - 'ḑ' => 'ḑ', - 'Ḓ' => 'Ḓ', - 'ḓ' => 'ḓ', - 'Ḕ' => 'Ḕ', - 'ḕ' => 'ḕ', - 'Ḗ' => 'Ḗ', - 'ḗ' => 'ḗ', - 'Ḙ' => 'Ḙ', - 'ḙ' => 'ḙ', - 'Ḛ' => 'Ḛ', - 'ḛ' => 'ḛ', - 'Ḝ' => 'Ḝ', - 'ḝ' => 'ḝ', - 'Ḟ' => 'Ḟ', - 'ḟ' => 'ḟ', - 'Ḡ' => 'Ḡ', - 'ḡ' => 'ḡ', - 'Ḣ' => 'Ḣ', - 'ḣ' => 'ḣ', - 'Ḥ' => 'Ḥ', - 'ḥ' => 'ḥ', - 'Ḧ' => 'Ḧ', - 'ḧ' => 'ḧ', - 'Ḩ' => 'Ḩ', - 'ḩ' => 'ḩ', - 'Ḫ' => 'Ḫ', - 'ḫ' => 'ḫ', - 'Ḭ' => 'Ḭ', - 'ḭ' => 'ḭ', - 'Ḯ' => 'Ḯ', - 'ḯ' => 'ḯ', - 'Ḱ' => 'Ḱ', - 'ḱ' => 'ḱ', - 'Ḳ' => 'Ḳ', - 'ḳ' => 'ḳ', - 'Ḵ' => 'Ḵ', - 'ḵ' => 'ḵ', - 'Ḷ' => 'Ḷ', - 'ḷ' => 'ḷ', - 'Ḹ' => 'Ḹ', - 'ḹ' => 'ḹ', - 'Ḻ' => 'Ḻ', - 'ḻ' => 'ḻ', - 'Ḽ' => 'Ḽ', - 'ḽ' => 'ḽ', - 'Ḿ' => 'Ḿ', - 'ḿ' => 'ḿ', - 'Ṁ' => 'Ṁ', - 'ṁ' => 'ṁ', - 'Ṃ' => 'Ṃ', - 'ṃ' => 'ṃ', - 'Ṅ' => 'Ṅ', - 'ṅ' => 'ṅ', - 'Ṇ' => 'Ṇ', - 'ṇ' => 'ṇ', - 'Ṉ' => 'Ṉ', - 'ṉ' => 'ṉ', - 'Ṋ' => 'Ṋ', - 'ṋ' => 'ṋ', - 'Ṍ' => 'Ṍ', - 'ṍ' => 'ṍ', - 'Ṏ' => 'Ṏ', - 'ṏ' => 'ṏ', - 'Ṑ' => 'Ṑ', - 'ṑ' => 'ṑ', - 'Ṓ' => 'Ṓ', - 'ṓ' => 'ṓ', - 'Ṕ' => 'Ṕ', - 'ṕ' => 'ṕ', - 'Ṗ' => 'Ṗ', - 'ṗ' => 'ṗ', - 'Ṙ' => 'Ṙ', - 'ṙ' => 'ṙ', - 'Ṛ' => 'Ṛ', - 'ṛ' => 'ṛ', - 'Ṝ' => 'Ṝ', - 'ṝ' => 'ṝ', - 'Ṟ' => 'Ṟ', - 'ṟ' => 'ṟ', - 'Ṡ' => 'Ṡ', - 'ṡ' => 'ṡ', - 'Ṣ' => 'Ṣ', - 'ṣ' => 'ṣ', - 'Ṥ' => 'Ṥ', - 'ṥ' => 'ṥ', - 'Ṧ' => 'Ṧ', - 'ṧ' => 'ṧ', - 'Ṩ' => 'Ṩ', - 'ṩ' => 'ṩ', - 'Ṫ' => 'Ṫ', - 'ṫ' => 'ṫ', - 'Ṭ' => 'Ṭ', - 'ṭ' => 'ṭ', - 'Ṯ' => 'Ṯ', - 'ṯ' => 'ṯ', - 'Ṱ' => 'Ṱ', - 'ṱ' => 'ṱ', - 'Ṳ' => 'Ṳ', - 'ṳ' => 'ṳ', - 'Ṵ' => 'Ṵ', - 'ṵ' => 'ṵ', - 'Ṷ' => 'Ṷ', - 'ṷ' => 'ṷ', - 'Ṹ' => 'Ṹ', - 'ṹ' => 'ṹ', - 'Ṻ' => 'Ṻ', - 'ṻ' => 'ṻ', - 'Ṽ' => 'Ṽ', - 'ṽ' => 'ṽ', - 'Ṿ' => 'Ṿ', - 'ṿ' => 'ṿ', - 'Ẁ' => 'Ẁ', - 'ẁ' => 'ẁ', - 'Ẃ' => 'Ẃ', - 'ẃ' => 'ẃ', - 'Ẅ' => 'Ẅ', - 'ẅ' => 'ẅ', - 'Ẇ' => 'Ẇ', - 'ẇ' => 'ẇ', - 'Ẉ' => 'Ẉ', - 'ẉ' => 'ẉ', - 'Ẋ' => 'Ẋ', - 'ẋ' => 'ẋ', - 'Ẍ' => 'Ẍ', - 'ẍ' => 'ẍ', - 'Ẏ' => 'Ẏ', - 'ẏ' => 'ẏ', - 'Ẑ' => 'Ẑ', - 'ẑ' => 'ẑ', - 'Ẓ' => 'Ẓ', - 'ẓ' => 'ẓ', - 'Ẕ' => 'Ẕ', - 'ẕ' => 'ẕ', - 'ẖ' => 'ẖ', - 'ẗ' => 'ẗ', - 'ẘ' => 'ẘ', - 'ẙ' => 'ẙ', - 'ẛ' => 'ẛ', - 'Ạ' => 'Ạ', - 'ạ' => 'ạ', - 'Ả' => 'Ả', - 'ả' => 'ả', - 'Ấ' => 'Ấ', - 'ấ' => 'ấ', - 'Ầ' => 'Ầ', - 'ầ' => 'ầ', - 'Ẩ' => 'Ẩ', - 'ẩ' => 'ẩ', - 'Ẫ' => 'Ẫ', - 'ẫ' => 'ẫ', - 'Ậ' => 'Ậ', - 'ậ' => 'ậ', - 'Ắ' => 'Ắ', - 'ắ' => 'ắ', - 'Ằ' => 'Ằ', - 'ằ' => 'ằ', - 'Ẳ' => 'Ẳ', - 'ẳ' => 'ẳ', - 'Ẵ' => 'Ẵ', - 'ẵ' => 'ẵ', - 'Ặ' => 'Ặ', - 'ặ' => 'ặ', - 'Ẹ' => 'Ẹ', - 'ẹ' => 'ẹ', - 'Ẻ' => 'Ẻ', - 'ẻ' => 'ẻ', - 'Ẽ' => 'Ẽ', - 'ẽ' => 'ẽ', - 'Ế' => 'Ế', - 'ế' => 'ế', - 'Ề' => 'Ề', - 'ề' => 'ề', - 'Ể' => 'Ể', - 'ể' => 'ể', - 'Ễ' => 'Ễ', - 'ễ' => 'ễ', - 'Ệ' => 'Ệ', - 'ệ' => 'ệ', - 'Ỉ' => 'Ỉ', - 'ỉ' => 'ỉ', - 'Ị' => 'Ị', - 'ị' => 'ị', - 'Ọ' => 'Ọ', - 'ọ' => 'ọ', - 'Ỏ' => 'Ỏ', - 'ỏ' => 'ỏ', - 'Ố' => 'Ố', - 'ố' => 'ố', - 'Ồ' => 'Ồ', - 'ồ' => 'ồ', - 'Ổ' => 'Ổ', - 'ổ' => 'ổ', - 'Ỗ' => 'Ỗ', - 'ỗ' => 'ỗ', - 'Ộ' => 'Ộ', - 'ộ' => 'ộ', - 'Ớ' => 'Ớ', - 'ớ' => 'ớ', - 'Ờ' => 'Ờ', - 'ờ' => 'ờ', - 'Ở' => 'Ở', - 'ở' => 'ở', - 'Ỡ' => 'Ỡ', - 'ỡ' => 'ỡ', - 'Ợ' => 'Ợ', - 'ợ' => 'ợ', - 'Ụ' => 'Ụ', - 'ụ' => 'ụ', - 'Ủ' => 'Ủ', - 'ủ' => 'ủ', - 'Ứ' => 'Ứ', - 'ứ' => 'ứ', - 'Ừ' => 'Ừ', - 'ừ' => 'ừ', - 'Ử' => 'Ử', - 'ử' => 'ử', - 'Ữ' => 'Ữ', - 'ữ' => 'ữ', - 'Ự' => 'Ự', - 'ự' => 'ự', - 'Ỳ' => 'Ỳ', - 'ỳ' => 'ỳ', - 'Ỵ' => 'Ỵ', - 'ỵ' => 'ỵ', - 'Ỷ' => 'Ỷ', - 'ỷ' => 'ỷ', - 'Ỹ' => 'Ỹ', - 'ỹ' => 'ỹ', - 'ἀ' => 'ἀ', - 'ἁ' => 'ἁ', - 'ἂ' => 'ἂ', - 'ἃ' => 'ἃ', - 'ἄ' => 'ἄ', - 'ἅ' => 'ἅ', - 'ἆ' => 'ἆ', - 'ἇ' => 'ἇ', - 'Ἀ' => 'Ἀ', - 'Ἁ' => 'Ἁ', - 'Ἂ' => 'Ἂ', - 'Ἃ' => 'Ἃ', - 'Ἄ' => 'Ἄ', - 'Ἅ' => 'Ἅ', - 'Ἆ' => 'Ἆ', - 'Ἇ' => 'Ἇ', - 'ἐ' => 'ἐ', - 'ἑ' => 'ἑ', - 'ἒ' => 'ἒ', - 'ἓ' => 'ἓ', - 'ἔ' => 'ἔ', - 'ἕ' => 'ἕ', - 'Ἐ' => 'Ἐ', - 'Ἑ' => 'Ἑ', - 'Ἒ' => 'Ἒ', - 'Ἓ' => 'Ἓ', - 'Ἔ' => 'Ἔ', - 'Ἕ' => 'Ἕ', - 'ἠ' => 'ἠ', - 'ἡ' => 'ἡ', - 'ἢ' => 'ἢ', - 'ἣ' => 'ἣ', - 'ἤ' => 'ἤ', - 'ἥ' => 'ἥ', - 'ἦ' => 'ἦ', - 'ἧ' => 'ἧ', - 'Ἠ' => 'Ἠ', - 'Ἡ' => 'Ἡ', - 'Ἢ' => 'Ἢ', - 'Ἣ' => 'Ἣ', - 'Ἤ' => 'Ἤ', - 'Ἥ' => 'Ἥ', - 'Ἦ' => 'Ἦ', - 'Ἧ' => 'Ἧ', - 'ἰ' => 'ἰ', - 'ἱ' => 'ἱ', - 'ἲ' => 'ἲ', - 'ἳ' => 'ἳ', - 'ἴ' => 'ἴ', - 'ἵ' => 'ἵ', - 'ἶ' => 'ἶ', - 'ἷ' => 'ἷ', - 'Ἰ' => 'Ἰ', - 'Ἱ' => 'Ἱ', - 'Ἲ' => 'Ἲ', - 'Ἳ' => 'Ἳ', - 'Ἴ' => 'Ἴ', - 'Ἵ' => 'Ἵ', - 'Ἶ' => 'Ἶ', - 'Ἷ' => 'Ἷ', - 'ὀ' => 'ὀ', - 'ὁ' => 'ὁ', - 'ὂ' => 'ὂ', - 'ὃ' => 'ὃ', - 'ὄ' => 'ὄ', - 'ὅ' => 'ὅ', - 'Ὀ' => 'Ὀ', - 'Ὁ' => 'Ὁ', - 'Ὂ' => 'Ὂ', - 'Ὃ' => 'Ὃ', - 'Ὄ' => 'Ὄ', - 'Ὅ' => 'Ὅ', - 'ὐ' => 'ὐ', - 'ὑ' => 'ὑ', - 'ὒ' => 'ὒ', - 'ὓ' => 'ὓ', - 'ὔ' => 'ὔ', - 'ὕ' => 'ὕ', - 'ὖ' => 'ὖ', - 'ὗ' => 'ὗ', - 'Ὑ' => 'Ὑ', - 'Ὓ' => 'Ὓ', - 'Ὕ' => 'Ὕ', - 'Ὗ' => 'Ὗ', - 'ὠ' => 'ὠ', - 'ὡ' => 'ὡ', - 'ὢ' => 'ὢ', - 'ὣ' => 'ὣ', - 'ὤ' => 'ὤ', - 'ὥ' => 'ὥ', - 'ὦ' => 'ὦ', - 'ὧ' => 'ὧ', - 'Ὠ' => 'Ὠ', - 'Ὡ' => 'Ὡ', - 'Ὢ' => 'Ὢ', - 'Ὣ' => 'Ὣ', - 'Ὤ' => 'Ὤ', - 'Ὥ' => 'Ὥ', - 'Ὦ' => 'Ὦ', - 'Ὧ' => 'Ὧ', - 'ὰ' => 'ὰ', - 'ά' => 'ά', - 'ὲ' => 'ὲ', - 'έ' => 'έ', - 'ὴ' => 'ὴ', - 'ή' => 'ή', - 'ὶ' => 'ὶ', - 'ί' => 'ί', - 'ὸ' => 'ὸ', - 'ό' => 'ό', - 'ὺ' => 'ὺ', - 'ύ' => 'ύ', - 'ὼ' => 'ὼ', - 'ώ' => 'ώ', - 'ᾀ' => 'ᾀ', - 'ᾁ' => 'ᾁ', - 'ᾂ' => 'ᾂ', - 'ᾃ' => 'ᾃ', - 'ᾄ' => 'ᾄ', - 'ᾅ' => 'ᾅ', - 'ᾆ' => 'ᾆ', - 'ᾇ' => 'ᾇ', - 'ᾈ' => 'ᾈ', - 'ᾉ' => 'ᾉ', - 'ᾊ' => 'ᾊ', - 'ᾋ' => 'ᾋ', - 'ᾌ' => 'ᾌ', - 'ᾍ' => 'ᾍ', - 'ᾎ' => 'ᾎ', - 'ᾏ' => 'ᾏ', - 'ᾐ' => 'ᾐ', - 'ᾑ' => 'ᾑ', - 'ᾒ' => 'ᾒ', - 'ᾓ' => 'ᾓ', - 'ᾔ' => 'ᾔ', - 'ᾕ' => 'ᾕ', - 'ᾖ' => 'ᾖ', - 'ᾗ' => 'ᾗ', - 'ᾘ' => 'ᾘ', - 'ᾙ' => 'ᾙ', - 'ᾚ' => 'ᾚ', - 'ᾛ' => 'ᾛ', - 'ᾜ' => 'ᾜ', - 'ᾝ' => 'ᾝ', - 'ᾞ' => 'ᾞ', - 'ᾟ' => 'ᾟ', - 'ᾠ' => 'ᾠ', - 'ᾡ' => 'ᾡ', - 'ᾢ' => 'ᾢ', - 'ᾣ' => 'ᾣ', - 'ᾤ' => 'ᾤ', - 'ᾥ' => 'ᾥ', - 'ᾦ' => 'ᾦ', - 'ᾧ' => 'ᾧ', - 'ᾨ' => 'ᾨ', - 'ᾩ' => 'ᾩ', - 'ᾪ' => 'ᾪ', - 'ᾫ' => 'ᾫ', - 'ᾬ' => 'ᾬ', - 'ᾭ' => 'ᾭ', - 'ᾮ' => 'ᾮ', - 'ᾯ' => 'ᾯ', - 'ᾰ' => 'ᾰ', - 'ᾱ' => 'ᾱ', - 'ᾲ' => 'ᾲ', - 'ᾳ' => 'ᾳ', - 'ᾴ' => 'ᾴ', - 'ᾶ' => 'ᾶ', - 'ᾷ' => 'ᾷ', - 'Ᾰ' => 'Ᾰ', - 'Ᾱ' => 'Ᾱ', - 'Ὰ' => 'Ὰ', - 'Ά' => 'Ά', - 'ᾼ' => 'ᾼ', - 'ι' => 'ι', - '῁' => '῁', - 'ῂ' => 'ῂ', - 'ῃ' => 'ῃ', - 'ῄ' => 'ῄ', - 'ῆ' => 'ῆ', - 'ῇ' => 'ῇ', - 'Ὲ' => 'Ὲ', - 'Έ' => 'Έ', - 'Ὴ' => 'Ὴ', - 'Ή' => 'Ή', - 'ῌ' => 'ῌ', - '῍' => '῍', - '῎' => '῎', - '῏' => '῏', - 'ῐ' => 'ῐ', - 'ῑ' => 'ῑ', - 'ῒ' => 'ῒ', - 'ΐ' => 'ΐ', - 'ῖ' => 'ῖ', - 'ῗ' => 'ῗ', - 'Ῐ' => 'Ῐ', - 'Ῑ' => 'Ῑ', - 'Ὶ' => 'Ὶ', - 'Ί' => 'Ί', - '῝' => '῝', - '῞' => '῞', - '῟' => '῟', - 'ῠ' => 'ῠ', - 'ῡ' => 'ῡ', - 'ῢ' => 'ῢ', - 'ΰ' => 'ΰ', - 'ῤ' => 'ῤ', - 'ῥ' => 'ῥ', - 'ῦ' => 'ῦ', - 'ῧ' => 'ῧ', - 'Ῠ' => 'Ῠ', - 'Ῡ' => 'Ῡ', - 'Ὺ' => 'Ὺ', - 'Ύ' => 'Ύ', - 'Ῥ' => 'Ῥ', - '῭' => '῭', - '΅' => '΅', - '`' => '`', - 'ῲ' => 'ῲ', - 'ῳ' => 'ῳ', - 'ῴ' => 'ῴ', - 'ῶ' => 'ῶ', - 'ῷ' => 'ῷ', - 'Ὸ' => 'Ὸ', - 'Ό' => 'Ό', - 'Ὼ' => 'Ὼ', - 'Ώ' => 'Ώ', - 'ῼ' => 'ῼ', - '´' => '´', - ' ' => ' ', - ' ' => ' ', - 'Ω' => 'Ω', - 'K' => 'K', - 'Å' => 'Å', - '↚' => '↚', - '↛' => '↛', - '↮' => '↮', - '⇍' => '⇍', - '⇎' => '⇎', - '⇏' => '⇏', - '∄' => '∄', - '∉' => '∉', - '∌' => '∌', - '∤' => '∤', - '∦' => '∦', - '≁' => '≁', - '≄' => '≄', - '≇' => '≇', - '≉' => '≉', - '≠' => '≠', - '≢' => '≢', - '≭' => '≭', - '≮' => '≮', - '≯' => '≯', - '≰' => '≰', - '≱' => '≱', - '≴' => '≴', - '≵' => '≵', - '≸' => '≸', - '≹' => '≹', - '⊀' => '⊀', - '⊁' => '⊁', - '⊄' => '⊄', - '⊅' => '⊅', - '⊈' => '⊈', - '⊉' => '⊉', - '⊬' => '⊬', - '⊭' => '⊭', - '⊮' => '⊮', - '⊯' => '⊯', - '⋠' => '⋠', - '⋡' => '⋡', - '⋢' => '⋢', - '⋣' => '⋣', - '⋪' => '⋪', - '⋫' => '⋫', - '⋬' => '⋬', - '⋭' => '⋭', - '〈' => '〈', - '〉' => '〉', - '⫝̸' => '⫝̸', - 'が' => 'が', - 'ぎ' => 'ぎ', - 'ぐ' => 'ぐ', - 'げ' => 'げ', - 'ご' => 'ご', - 'ざ' => 'ざ', - 'じ' => 'じ', - 'ず' => 'ず', - 'ぜ' => 'ぜ', - 'ぞ' => 'ぞ', - 'だ' => 'だ', - 'ぢ' => 'ぢ', - 'づ' => 'づ', - 'で' => 'で', - 'ど' => 'ど', - 'ば' => 'ば', - 'ぱ' => 'ぱ', - 'び' => 'び', - 'ぴ' => 'ぴ', - 'ぶ' => 'ぶ', - 'ぷ' => 'ぷ', - 'べ' => 'べ', - 'ぺ' => 'ぺ', - 'ぼ' => 'ぼ', - 'ぽ' => 'ぽ', - 'ゔ' => 'ゔ', - 'ゞ' => 'ゞ', - 'ガ' => 'ガ', - 'ギ' => 'ギ', - 'グ' => 'グ', - 'ゲ' => 'ゲ', - 'ゴ' => 'ゴ', - 'ザ' => 'ザ', - 'ジ' => 'ジ', - 'ズ' => 'ズ', - 'ゼ' => 'ゼ', - 'ゾ' => 'ゾ', - 'ダ' => 'ダ', - 'ヂ' => 'ヂ', - 'ヅ' => 'ヅ', - 'デ' => 'デ', - 'ド' => 'ド', - 'バ' => 'バ', - 'パ' => 'パ', - 'ビ' => 'ビ', - 'ピ' => 'ピ', - 'ブ' => 'ブ', - 'プ' => 'プ', - 'ベ' => 'ベ', - 'ペ' => 'ペ', - 'ボ' => 'ボ', - 'ポ' => 'ポ', - 'ヴ' => 'ヴ', - 'ヷ' => 'ヷ', - 'ヸ' => 'ヸ', - 'ヹ' => 'ヹ', - 'ヺ' => 'ヺ', - 'ヾ' => 'ヾ', - '豈' => '豈', - '更' => '更', - '車' => '車', - '賈' => '賈', - '滑' => '滑', - '串' => '串', - '句' => '句', - '龜' => '龜', - '龜' => '龜', - '契' => '契', - '金' => '金', - '喇' => '喇', - '奈' => '奈', - '懶' => '懶', - '癩' => '癩', - '羅' => '羅', - '蘿' => '蘿', - '螺' => '螺', - '裸' => '裸', - '邏' => '邏', - '樂' => '樂', - '洛' => '洛', - '烙' => '烙', - '珞' => '珞', - '落' => '落', - '酪' => '酪', - '駱' => '駱', - '亂' => '亂', - '卵' => '卵', - '欄' => '欄', - '爛' => '爛', - '蘭' => '蘭', - '鸞' => '鸞', - '嵐' => '嵐', - '濫' => '濫', - '藍' => '藍', - '襤' => '襤', - '拉' => '拉', - '臘' => '臘', - '蠟' => '蠟', - '廊' => '廊', - '朗' => '朗', - '浪' => '浪', - '狼' => '狼', - '郎' => '郎', - '來' => '來', - '冷' => '冷', - '勞' => '勞', - '擄' => '擄', - '櫓' => '櫓', - '爐' => '爐', - '盧' => '盧', - '老' => '老', - '蘆' => '蘆', - '虜' => '虜', - '路' => '路', - '露' => '露', - '魯' => '魯', - '鷺' => '鷺', - '碌' => '碌', - '祿' => '祿', - '綠' => '綠', - '菉' => '菉', - '錄' => '錄', - '鹿' => '鹿', - '論' => '論', - '壟' => '壟', - '弄' => '弄', - '籠' => '籠', - '聾' => '聾', - '牢' => '牢', - '磊' => '磊', - '賂' => '賂', - '雷' => '雷', - '壘' => '壘', - '屢' => '屢', - '樓' => '樓', - '淚' => '淚', - '漏' => '漏', - '累' => '累', - '縷' => '縷', - '陋' => '陋', - '勒' => '勒', - '肋' => '肋', - '凜' => '凜', - '凌' => '凌', - '稜' => '稜', - '綾' => '綾', - '菱' => '菱', - '陵' => '陵', - '讀' => '讀', - '拏' => '拏', - '樂' => '樂', - '諾' => '諾', - '丹' => '丹', - '寧' => '寧', - '怒' => '怒', - '率' => '率', - '異' => '異', - '北' => '北', - '磻' => '磻', - '便' => '便', - '復' => '復', - '不' => '不', - '泌' => '泌', - '數' => '數', - '索' => '索', - '參' => '參', - '塞' => '塞', - '省' => '省', - '葉' => '葉', - '說' => '說', - '殺' => '殺', - '辰' => '辰', - '沈' => '沈', - '拾' => '拾', - '若' => '若', - '掠' => '掠', - '略' => '略', - '亮' => '亮', - '兩' => '兩', - '凉' => '凉', - '梁' => '梁', - '糧' => '糧', - '良' => '良', - '諒' => '諒', - '量' => '量', - '勵' => '勵', - '呂' => '呂', - '女' => '女', - '廬' => '廬', - '旅' => '旅', - '濾' => '濾', - '礪' => '礪', - '閭' => '閭', - '驪' => '驪', - '麗' => '麗', - '黎' => '黎', - '力' => '力', - '曆' => '曆', - '歷' => '歷', - '轢' => '轢', - '年' => '年', - '憐' => '憐', - '戀' => '戀', - '撚' => '撚', - '漣' => '漣', - '煉' => '煉', - '璉' => '璉', - '秊' => '秊', - '練' => '練', - '聯' => '聯', - '輦' => '輦', - '蓮' => '蓮', - '連' => '連', - '鍊' => '鍊', - '列' => '列', - '劣' => '劣', - '咽' => '咽', - '烈' => '烈', - '裂' => '裂', - '說' => '說', - '廉' => '廉', - '念' => '念', - '捻' => '捻', - '殮' => '殮', - '簾' => '簾', - '獵' => '獵', - '令' => '令', - '囹' => '囹', - '寧' => '寧', - '嶺' => '嶺', - '怜' => '怜', - '玲' => '玲', - '瑩' => '瑩', - '羚' => '羚', - '聆' => '聆', - '鈴' => '鈴', - '零' => '零', - '靈' => '靈', - '領' => '領', - '例' => '例', - '禮' => '禮', - '醴' => '醴', - '隸' => '隸', - '惡' => '惡', - '了' => '了', - '僚' => '僚', - '寮' => '寮', - '尿' => '尿', - '料' => '料', - '樂' => '樂', - '燎' => '燎', - '療' => '療', - '蓼' => '蓼', - '遼' => '遼', - '龍' => '龍', - '暈' => '暈', - '阮' => '阮', - '劉' => '劉', - '杻' => '杻', - '柳' => '柳', - '流' => '流', - '溜' => '溜', - '琉' => '琉', - '留' => '留', - '硫' => '硫', - '紐' => '紐', - '類' => '類', - '六' => '六', - '戮' => '戮', - '陸' => '陸', - '倫' => '倫', - '崙' => '崙', - '淪' => '淪', - '輪' => '輪', - '律' => '律', - '慄' => '慄', - '栗' => '栗', - '率' => '率', - '隆' => '隆', - '利' => '利', - '吏' => '吏', - '履' => '履', - '易' => '易', - '李' => '李', - '梨' => '梨', - '泥' => '泥', - '理' => '理', - '痢' => '痢', - '罹' => '罹', - '裏' => '裏', - '裡' => '裡', - '里' => '里', - '離' => '離', - '匿' => '匿', - '溺' => '溺', - '吝' => '吝', - '燐' => '燐', - '璘' => '璘', - '藺' => '藺', - '隣' => '隣', - '鱗' => '鱗', - '麟' => '麟', - '林' => '林', - '淋' => '淋', - '臨' => '臨', - '立' => '立', - '笠' => '笠', - '粒' => '粒', - '狀' => '狀', - '炙' => '炙', - '識' => '識', - '什' => '什', - '茶' => '茶', - '刺' => '刺', - '切' => '切', - '度' => '度', - '拓' => '拓', - '糖' => '糖', - '宅' => '宅', - '洞' => '洞', - '暴' => '暴', - '輻' => '輻', - '行' => '行', - '降' => '降', - '見' => '見', - '廓' => '廓', - '兀' => '兀', - '嗀' => '嗀', - '塚' => '塚', - '晴' => '晴', - '凞' => '凞', - '猪' => '猪', - '益' => '益', - '礼' => '礼', - '神' => '神', - '祥' => '祥', - '福' => '福', - '靖' => '靖', - '精' => '精', - '羽' => '羽', - '蘒' => '蘒', - '諸' => '諸', - '逸' => '逸', - '都' => '都', - '飯' => '飯', - '飼' => '飼', - '館' => '館', - '鶴' => '鶴', - '郞' => '郞', - '隷' => '隷', - '侮' => '侮', - '僧' => '僧', - '免' => '免', - '勉' => '勉', - '勤' => '勤', - '卑' => '卑', - '喝' => '喝', - '嘆' => '嘆', - '器' => '器', - '塀' => '塀', - '墨' => '墨', - '層' => '層', - '屮' => '屮', - '悔' => '悔', - '慨' => '慨', - '憎' => '憎', - '懲' => '懲', - '敏' => '敏', - '既' => '既', - '暑' => '暑', - '梅' => '梅', - '海' => '海', - '渚' => '渚', - '漢' => '漢', - '煮' => '煮', - '爫' => '爫', - '琢' => '琢', - '碑' => '碑', - '社' => '社', - '祉' => '祉', - '祈' => '祈', - '祐' => '祐', - '祖' => '祖', - '祝' => '祝', - '禍' => '禍', - '禎' => '禎', - '穀' => '穀', - '突' => '突', - '節' => '節', - '練' => '練', - '縉' => '縉', - '繁' => '繁', - '署' => '署', - '者' => '者', - '臭' => '臭', - '艹' => '艹', - '艹' => '艹', - '著' => '著', - '褐' => '褐', - '視' => '視', - '謁' => '謁', - '謹' => '謹', - '賓' => '賓', - '贈' => '贈', - '辶' => '辶', - '逸' => '逸', - '難' => '難', - '響' => '響', - '頻' => '頻', - '恵' => '恵', - '𤋮' => '𤋮', - '舘' => '舘', - '並' => '並', - '况' => '况', - '全' => '全', - '侀' => '侀', - '充' => '充', - '冀' => '冀', - '勇' => '勇', - '勺' => '勺', - '喝' => '喝', - '啕' => '啕', - '喙' => '喙', - '嗢' => '嗢', - '塚' => '塚', - '墳' => '墳', - '奄' => '奄', - '奔' => '奔', - '婢' => '婢', - '嬨' => '嬨', - '廒' => '廒', - '廙' => '廙', - '彩' => '彩', - '徭' => '徭', - '惘' => '惘', - '慎' => '慎', - '愈' => '愈', - '憎' => '憎', - '慠' => '慠', - '懲' => '懲', - '戴' => '戴', - '揄' => '揄', - '搜' => '搜', - '摒' => '摒', - '敖' => '敖', - '晴' => '晴', - '朗' => '朗', - '望' => '望', - '杖' => '杖', - '歹' => '歹', - '殺' => '殺', - '流' => '流', - '滛' => '滛', - '滋' => '滋', - '漢' => '漢', - '瀞' => '瀞', - '煮' => '煮', - '瞧' => '瞧', - '爵' => '爵', - '犯' => '犯', - '猪' => '猪', - '瑱' => '瑱', - '甆' => '甆', - '画' => '画', - '瘝' => '瘝', - '瘟' => '瘟', - '益' => '益', - '盛' => '盛', - '直' => '直', - '睊' => '睊', - '着' => '着', - '磌' => '磌', - '窱' => '窱', - '節' => '節', - '类' => '类', - '絛' => '絛', - '練' => '練', - '缾' => '缾', - '者' => '者', - '荒' => '荒', - '華' => '華', - '蝹' => '蝹', - '襁' => '襁', - '覆' => '覆', - '視' => '視', - '調' => '調', - '諸' => '諸', - '請' => '請', - '謁' => '謁', - '諾' => '諾', - '諭' => '諭', - '謹' => '謹', - '變' => '變', - '贈' => '贈', - '輸' => '輸', - '遲' => '遲', - '醙' => '醙', - '鉶' => '鉶', - '陼' => '陼', - '難' => '難', - '靖' => '靖', - '韛' => '韛', - '響' => '響', - '頋' => '頋', - '頻' => '頻', - '鬒' => '鬒', - '龜' => '龜', - '𢡊' => '𢡊', - '𢡄' => '𢡄', - '𣏕' => '𣏕', - '㮝' => '㮝', - '䀘' => '䀘', - '䀹' => '䀹', - '𥉉' => '𥉉', - '𥳐' => '𥳐', - '𧻓' => '𧻓', - '齃' => '齃', - '龎' => '龎', - 'יִ' => 'יִ', - 'ײַ' => 'ײַ', - 'שׁ' => 'שׁ', - 'שׂ' => 'שׂ', - 'שּׁ' => 'שּׁ', - 'שּׂ' => 'שּׂ', - 'אַ' => 'אַ', - 'אָ' => 'אָ', - 'אּ' => 'אּ', - 'בּ' => 'בּ', - 'גּ' => 'גּ', - 'דּ' => 'דּ', - 'הּ' => 'הּ', - 'וּ' => 'וּ', - 'זּ' => 'זּ', - 'טּ' => 'טּ', - 'יּ' => 'יּ', - 'ךּ' => 'ךּ', - 'כּ' => 'כּ', - 'לּ' => 'לּ', - 'מּ' => 'מּ', - 'נּ' => 'נּ', - 'סּ' => 'סּ', - 'ףּ' => 'ףּ', - 'פּ' => 'פּ', - 'צּ' => 'צּ', - 'קּ' => 'קּ', - 'רּ' => 'רּ', - 'שּ' => 'שּ', - 'תּ' => 'תּ', - 'וֹ' => 'וֹ', - 'בֿ' => 'בֿ', - 'כֿ' => 'כֿ', - 'פֿ' => 'פֿ', - '𑂚' => '𑂚', - '𑂜' => '𑂜', - '𑂫' => '𑂫', - '𑄮' => '𑄮', - '𑄯' => '𑄯', - '𑍋' => '𑍋', - '𑍌' => '𑍌', - '𑒻' => '𑒻', - '𑒼' => '𑒼', - '𑒾' => '𑒾', - '𑖺' => '𑖺', - '𑖻' => '𑖻', - '𑤸' => '𑤸', - '𝅗𝅥' => '𝅗𝅥', - '𝅘𝅥' => '𝅘𝅥', - '𝅘𝅥𝅮' => '𝅘𝅥𝅮', - '𝅘𝅥𝅯' => '𝅘𝅥𝅯', - '𝅘𝅥𝅰' => '𝅘𝅥𝅰', - '𝅘𝅥𝅱' => '𝅘𝅥𝅱', - '𝅘𝅥𝅲' => '𝅘𝅥𝅲', - '𝆹𝅥' => '𝆹𝅥', - '𝆺𝅥' => '𝆺𝅥', - '𝆹𝅥𝅮' => '𝆹𝅥𝅮', - '𝆺𝅥𝅮' => '𝆺𝅥𝅮', - '𝆹𝅥𝅯' => '𝆹𝅥𝅯', - '𝆺𝅥𝅯' => '𝆺𝅥𝅯', - '丽' => '丽', - '丸' => '丸', - '乁' => '乁', - '𠄢' => '𠄢', - '你' => '你', - '侮' => '侮', - '侻' => '侻', - '倂' => '倂', - '偺' => '偺', - '備' => '備', - '僧' => '僧', - '像' => '像', - '㒞' => '㒞', - '𠘺' => '𠘺', - '免' => '免', - '兔' => '兔', - '兤' => '兤', - '具' => '具', - '𠔜' => '𠔜', - '㒹' => '㒹', - '內' => '內', - '再' => '再', - '𠕋' => '𠕋', - '冗' => '冗', - '冤' => '冤', - '仌' => '仌', - '冬' => '冬', - '况' => '况', - '𩇟' => '𩇟', - '凵' => '凵', - '刃' => '刃', - '㓟' => '㓟', - '刻' => '刻', - '剆' => '剆', - '割' => '割', - '剷' => '剷', - '㔕' => '㔕', - '勇' => '勇', - '勉' => '勉', - '勤' => '勤', - '勺' => '勺', - '包' => '包', - '匆' => '匆', - '北' => '北', - '卉' => '卉', - '卑' => '卑', - '博' => '博', - '即' => '即', - '卽' => '卽', - '卿' => '卿', - '卿' => '卿', - '卿' => '卿', - '𠨬' => '𠨬', - '灰' => '灰', - '及' => '及', - '叟' => '叟', - '𠭣' => '𠭣', - '叫' => '叫', - '叱' => '叱', - '吆' => '吆', - '咞' => '咞', - '吸' => '吸', - '呈' => '呈', - '周' => '周', - '咢' => '咢', - '哶' => '哶', - '唐' => '唐', - '啓' => '啓', - '啣' => '啣', - '善' => '善', - '善' => '善', - '喙' => '喙', - '喫' => '喫', - '喳' => '喳', - '嗂' => '嗂', - '圖' => '圖', - '嘆' => '嘆', - '圗' => '圗', - '噑' => '噑', - '噴' => '噴', - '切' => '切', - '壮' => '壮', - '城' => '城', - '埴' => '埴', - '堍' => '堍', - '型' => '型', - '堲' => '堲', - '報' => '報', - '墬' => '墬', - '𡓤' => '𡓤', - '売' => '売', - '壷' => '壷', - '夆' => '夆', - '多' => '多', - '夢' => '夢', - '奢' => '奢', - '𡚨' => '𡚨', - '𡛪' => '𡛪', - '姬' => '姬', - '娛' => '娛', - '娧' => '娧', - '姘' => '姘', - '婦' => '婦', - '㛮' => '㛮', - '㛼' => '㛼', - '嬈' => '嬈', - '嬾' => '嬾', - '嬾' => '嬾', - '𡧈' => '𡧈', - '寃' => '寃', - '寘' => '寘', - '寧' => '寧', - '寳' => '寳', - '𡬘' => '𡬘', - '寿' => '寿', - '将' => '将', - '当' => '当', - '尢' => '尢', - '㞁' => '㞁', - '屠' => '屠', - '屮' => '屮', - '峀' => '峀', - '岍' => '岍', - '𡷤' => '𡷤', - '嵃' => '嵃', - '𡷦' => '𡷦', - '嵮' => '嵮', - '嵫' => '嵫', - '嵼' => '嵼', - '巡' => '巡', - '巢' => '巢', - '㠯' => '㠯', - '巽' => '巽', - '帨' => '帨', - '帽' => '帽', - '幩' => '幩', - '㡢' => '㡢', - '𢆃' => '𢆃', - '㡼' => '㡼', - '庰' => '庰', - '庳' => '庳', - '庶' => '庶', - '廊' => '廊', - '𪎒' => '𪎒', - '廾' => '廾', - '𢌱' => '𢌱', - '𢌱' => '𢌱', - '舁' => '舁', - '弢' => '弢', - '弢' => '弢', - '㣇' => '㣇', - '𣊸' => '𣊸', - '𦇚' => '𦇚', - '形' => '形', - '彫' => '彫', - '㣣' => '㣣', - '徚' => '徚', - '忍' => '忍', - '志' => '志', - '忹' => '忹', - '悁' => '悁', - '㤺' => '㤺', - '㤜' => '㤜', - '悔' => '悔', - '𢛔' => '𢛔', - '惇' => '惇', - '慈' => '慈', - '慌' => '慌', - '慎' => '慎', - '慌' => '慌', - '慺' => '慺', - '憎' => '憎', - '憲' => '憲', - '憤' => '憤', - '憯' => '憯', - '懞' => '懞', - '懲' => '懲', - '懶' => '懶', - '成' => '成', - '戛' => '戛', - '扝' => '扝', - '抱' => '抱', - '拔' => '拔', - '捐' => '捐', - '𢬌' => '𢬌', - '挽' => '挽', - '拼' => '拼', - '捨' => '捨', - '掃' => '掃', - '揤' => '揤', - '𢯱' => '𢯱', - '搢' => '搢', - '揅' => '揅', - '掩' => '掩', - '㨮' => '㨮', - '摩' => '摩', - '摾' => '摾', - '撝' => '撝', - '摷' => '摷', - '㩬' => '㩬', - '敏' => '敏', - '敬' => '敬', - '𣀊' => '𣀊', - '旣' => '旣', - '書' => '書', - '晉' => '晉', - '㬙' => '㬙', - '暑' => '暑', - '㬈' => '㬈', - '㫤' => '㫤', - '冒' => '冒', - '冕' => '冕', - '最' => '最', - '暜' => '暜', - '肭' => '肭', - '䏙' => '䏙', - '朗' => '朗', - '望' => '望', - '朡' => '朡', - '杞' => '杞', - '杓' => '杓', - '𣏃' => '𣏃', - '㭉' => '㭉', - '柺' => '柺', - '枅' => '枅', - '桒' => '桒', - '梅' => '梅', - '𣑭' => '𣑭', - '梎' => '梎', - '栟' => '栟', - '椔' => '椔', - '㮝' => '㮝', - '楂' => '楂', - '榣' => '榣', - '槪' => '槪', - '檨' => '檨', - '𣚣' => '𣚣', - '櫛' => '櫛', - '㰘' => '㰘', - '次' => '次', - '𣢧' => '𣢧', - '歔' => '歔', - '㱎' => '㱎', - '歲' => '歲', - '殟' => '殟', - '殺' => '殺', - '殻' => '殻', - '𣪍' => '𣪍', - '𡴋' => '𡴋', - '𣫺' => '𣫺', - '汎' => '汎', - '𣲼' => '𣲼', - '沿' => '沿', - '泍' => '泍', - '汧' => '汧', - '洖' => '洖', - '派' => '派', - '海' => '海', - '流' => '流', - '浩' => '浩', - '浸' => '浸', - '涅' => '涅', - '𣴞' => '𣴞', - '洴' => '洴', - '港' => '港', - '湮' => '湮', - '㴳' => '㴳', - '滋' => '滋', - '滇' => '滇', - '𣻑' => '𣻑', - '淹' => '淹', - '潮' => '潮', - '𣽞' => '𣽞', - '𣾎' => '𣾎', - '濆' => '濆', - '瀹' => '瀹', - '瀞' => '瀞', - '瀛' => '瀛', - '㶖' => '㶖', - '灊' => '灊', - '災' => '災', - '灷' => '灷', - '炭' => '炭', - '𠔥' => '𠔥', - '煅' => '煅', - '𤉣' => '𤉣', - '熜' => '熜', - '𤎫' => '𤎫', - '爨' => '爨', - '爵' => '爵', - '牐' => '牐', - '𤘈' => '𤘈', - '犀' => '犀', - '犕' => '犕', - '𤜵' => '𤜵', - '𤠔' => '𤠔', - '獺' => '獺', - '王' => '王', - '㺬' => '㺬', - '玥' => '玥', - '㺸' => '㺸', - '㺸' => '㺸', - '瑇' => '瑇', - '瑜' => '瑜', - '瑱' => '瑱', - '璅' => '璅', - '瓊' => '瓊', - '㼛' => '㼛', - '甤' => '甤', - '𤰶' => '𤰶', - '甾' => '甾', - '𤲒' => '𤲒', - '異' => '異', - '𢆟' => '𢆟', - '瘐' => '瘐', - '𤾡' => '𤾡', - '𤾸' => '𤾸', - '𥁄' => '𥁄', - '㿼' => '㿼', - '䀈' => '䀈', - '直' => '直', - '𥃳' => '𥃳', - '𥃲' => '𥃲', - '𥄙' => '𥄙', - '𥄳' => '𥄳', - '眞' => '眞', - '真' => '真', - '真' => '真', - '睊' => '睊', - '䀹' => '䀹', - '瞋' => '瞋', - '䁆' => '䁆', - '䂖' => '䂖', - '𥐝' => '𥐝', - '硎' => '硎', - '碌' => '碌', - '磌' => '磌', - '䃣' => '䃣', - '𥘦' => '𥘦', - '祖' => '祖', - '𥚚' => '𥚚', - '𥛅' => '𥛅', - '福' => '福', - '秫' => '秫', - '䄯' => '䄯', - '穀' => '穀', - '穊' => '穊', - '穏' => '穏', - '𥥼' => '𥥼', - '𥪧' => '𥪧', - '𥪧' => '𥪧', - '竮' => '竮', - '䈂' => '䈂', - '𥮫' => '𥮫', - '篆' => '篆', - '築' => '築', - '䈧' => '䈧', - '𥲀' => '𥲀', - '糒' => '糒', - '䊠' => '䊠', - '糨' => '糨', - '糣' => '糣', - '紀' => '紀', - '𥾆' => '𥾆', - '絣' => '絣', - '䌁' => '䌁', - '緇' => '緇', - '縂' => '縂', - '繅' => '繅', - '䌴' => '䌴', - '𦈨' => '𦈨', - '𦉇' => '𦉇', - '䍙' => '䍙', - '𦋙' => '𦋙', - '罺' => '罺', - '𦌾' => '𦌾', - '羕' => '羕', - '翺' => '翺', - '者' => '者', - '𦓚' => '𦓚', - '𦔣' => '𦔣', - '聠' => '聠', - '𦖨' => '𦖨', - '聰' => '聰', - '𣍟' => '𣍟', - '䏕' => '䏕', - '育' => '育', - '脃' => '脃', - '䐋' => '䐋', - '脾' => '脾', - '媵' => '媵', - '𦞧' => '𦞧', - '𦞵' => '𦞵', - '𣎓' => '𣎓', - '𣎜' => '𣎜', - '舁' => '舁', - '舄' => '舄', - '辞' => '辞', - '䑫' => '䑫', - '芑' => '芑', - '芋' => '芋', - '芝' => '芝', - '劳' => '劳', - '花' => '花', - '芳' => '芳', - '芽' => '芽', - '苦' => '苦', - '𦬼' => '𦬼', - '若' => '若', - '茝' => '茝', - '荣' => '荣', - '莭' => '莭', - '茣' => '茣', - '莽' => '莽', - '菧' => '菧', - '著' => '著', - '荓' => '荓', - '菊' => '菊', - '菌' => '菌', - '菜' => '菜', - '𦰶' => '𦰶', - '𦵫' => '𦵫', - '𦳕' => '𦳕', - '䔫' => '䔫', - '蓱' => '蓱', - '蓳' => '蓳', - '蔖' => '蔖', - '𧏊' => '𧏊', - '蕤' => '蕤', - '𦼬' => '𦼬', - '䕝' => '䕝', - '䕡' => '䕡', - '𦾱' => '𦾱', - '𧃒' => '𧃒', - '䕫' => '䕫', - '虐' => '虐', - '虜' => '虜', - '虧' => '虧', - '虩' => '虩', - '蚩' => '蚩', - '蚈' => '蚈', - '蜎' => '蜎', - '蛢' => '蛢', - '蝹' => '蝹', - '蜨' => '蜨', - '蝫' => '蝫', - '螆' => '螆', - '䗗' => '䗗', - '蟡' => '蟡', - '蠁' => '蠁', - '䗹' => '䗹', - '衠' => '衠', - '衣' => '衣', - '𧙧' => '𧙧', - '裗' => '裗', - '裞' => '裞', - '䘵' => '䘵', - '裺' => '裺', - '㒻' => '㒻', - '𧢮' => '𧢮', - '𧥦' => '𧥦', - '䚾' => '䚾', - '䛇' => '䛇', - '誠' => '誠', - '諭' => '諭', - '變' => '變', - '豕' => '豕', - '𧲨' => '𧲨', - '貫' => '貫', - '賁' => '賁', - '贛' => '贛', - '起' => '起', - '𧼯' => '𧼯', - '𠠄' => '𠠄', - '跋' => '跋', - '趼' => '趼', - '跰' => '跰', - '𠣞' => '𠣞', - '軔' => '軔', - '輸' => '輸', - '𨗒' => '𨗒', - '𨗭' => '𨗭', - '邔' => '邔', - '郱' => '郱', - '鄑' => '鄑', - '𨜮' => '𨜮', - '鄛' => '鄛', - '鈸' => '鈸', - '鋗' => '鋗', - '鋘' => '鋘', - '鉼' => '鉼', - '鏹' => '鏹', - '鐕' => '鐕', - '𨯺' => '𨯺', - '開' => '開', - '䦕' => '䦕', - '閷' => '閷', - '𨵷' => '𨵷', - '䧦' => '䧦', - '雃' => '雃', - '嶲' => '嶲', - '霣' => '霣', - '𩅅' => '𩅅', - '𩈚' => '𩈚', - '䩮' => '䩮', - '䩶' => '䩶', - '韠' => '韠', - '𩐊' => '𩐊', - '䪲' => '䪲', - '𩒖' => '𩒖', - '頋' => '頋', - '頋' => '頋', - '頩' => '頩', - '𩖶' => '𩖶', - '飢' => '飢', - '䬳' => '䬳', - '餩' => '餩', - '馧' => '馧', - '駂' => '駂', - '駾' => '駾', - '䯎' => '䯎', - '𩬰' => '𩬰', - '鬒' => '鬒', - '鱀' => '鱀', - '鳽' => '鳽', - '䳎' => '䳎', - '䳭' => '䳭', - '鵧' => '鵧', - '𪃎' => '𪃎', - '䳸' => '䳸', - '𪄅' => '𪄅', - '𪈎' => '𪈎', - '𪊑' => '𪊑', - '麻' => '麻', - '䵖' => '䵖', - '黹' => '黹', - '黾' => '黾', - '鼅' => '鼅', - '鼏' => '鼏', - '鼖' => '鼖', - '鼻' => '鼻', - '𪘀' => '𪘀', -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php deleted file mode 100644 index ec90f36e..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php +++ /dev/null @@ -1,876 +0,0 @@ - 230, - '́' => 230, - '̂' => 230, - '̃' => 230, - '̄' => 230, - '̅' => 230, - '̆' => 230, - '̇' => 230, - '̈' => 230, - '̉' => 230, - '̊' => 230, - '̋' => 230, - '̌' => 230, - '̍' => 230, - '̎' => 230, - '̏' => 230, - '̐' => 230, - '̑' => 230, - '̒' => 230, - '̓' => 230, - '̔' => 230, - '̕' => 232, - '̖' => 220, - '̗' => 220, - '̘' => 220, - '̙' => 220, - '̚' => 232, - '̛' => 216, - '̜' => 220, - '̝' => 220, - '̞' => 220, - '̟' => 220, - '̠' => 220, - '̡' => 202, - '̢' => 202, - '̣' => 220, - '̤' => 220, - '̥' => 220, - '̦' => 220, - '̧' => 202, - '̨' => 202, - '̩' => 220, - '̪' => 220, - '̫' => 220, - '̬' => 220, - '̭' => 220, - '̮' => 220, - '̯' => 220, - '̰' => 220, - '̱' => 220, - '̲' => 220, - '̳' => 220, - '̴' => 1, - '̵' => 1, - '̶' => 1, - '̷' => 1, - '̸' => 1, - '̹' => 220, - '̺' => 220, - '̻' => 220, - '̼' => 220, - '̽' => 230, - '̾' => 230, - '̿' => 230, - '̀' => 230, - '́' => 230, - '͂' => 230, - '̓' => 230, - '̈́' => 230, - 'ͅ' => 240, - '͆' => 230, - '͇' => 220, - '͈' => 220, - '͉' => 220, - '͊' => 230, - '͋' => 230, - '͌' => 230, - '͍' => 220, - '͎' => 220, - '͐' => 230, - '͑' => 230, - '͒' => 230, - '͓' => 220, - '͔' => 220, - '͕' => 220, - '͖' => 220, - '͗' => 230, - '͘' => 232, - '͙' => 220, - '͚' => 220, - '͛' => 230, - '͜' => 233, - '͝' => 234, - '͞' => 234, - '͟' => 233, - '͠' => 234, - '͡' => 234, - '͢' => 233, - 'ͣ' => 230, - 'ͤ' => 230, - 'ͥ' => 230, - 'ͦ' => 230, - 'ͧ' => 230, - 'ͨ' => 230, - 'ͩ' => 230, - 'ͪ' => 230, - 'ͫ' => 230, - 'ͬ' => 230, - 'ͭ' => 230, - 'ͮ' => 230, - 'ͯ' => 230, - '҃' => 230, - '҄' => 230, - '҅' => 230, - '҆' => 230, - '҇' => 230, - '֑' => 220, - '֒' => 230, - '֓' => 230, - '֔' => 230, - '֕' => 230, - '֖' => 220, - '֗' => 230, - '֘' => 230, - '֙' => 230, - '֚' => 222, - '֛' => 220, - '֜' => 230, - '֝' => 230, - '֞' => 230, - '֟' => 230, - '֠' => 230, - '֡' => 230, - '֢' => 220, - '֣' => 220, - '֤' => 220, - '֥' => 220, - '֦' => 220, - '֧' => 220, - '֨' => 230, - '֩' => 230, - '֪' => 220, - '֫' => 230, - '֬' => 230, - '֭' => 222, - '֮' => 228, - '֯' => 230, - 'ְ' => 10, - 'ֱ' => 11, - 'ֲ' => 12, - 'ֳ' => 13, - 'ִ' => 14, - 'ֵ' => 15, - 'ֶ' => 16, - 'ַ' => 17, - 'ָ' => 18, - 'ֹ' => 19, - 'ֺ' => 19, - 'ֻ' => 20, - 'ּ' => 21, - 'ֽ' => 22, - 'ֿ' => 23, - 'ׁ' => 24, - 'ׂ' => 25, - 'ׄ' => 230, - 'ׅ' => 220, - 'ׇ' => 18, - 'ؐ' => 230, - 'ؑ' => 230, - 'ؒ' => 230, - 'ؓ' => 230, - 'ؔ' => 230, - 'ؕ' => 230, - 'ؖ' => 230, - 'ؗ' => 230, - 'ؘ' => 30, - 'ؙ' => 31, - 'ؚ' => 32, - 'ً' => 27, - 'ٌ' => 28, - 'ٍ' => 29, - 'َ' => 30, - 'ُ' => 31, - 'ِ' => 32, - 'ّ' => 33, - 'ْ' => 34, - 'ٓ' => 230, - 'ٔ' => 230, - 'ٕ' => 220, - 'ٖ' => 220, - 'ٗ' => 230, - '٘' => 230, - 'ٙ' => 230, - 'ٚ' => 230, - 'ٛ' => 230, - 'ٜ' => 220, - 'ٝ' => 230, - 'ٞ' => 230, - 'ٟ' => 220, - 'ٰ' => 35, - 'ۖ' => 230, - 'ۗ' => 230, - 'ۘ' => 230, - 'ۙ' => 230, - 'ۚ' => 230, - 'ۛ' => 230, - 'ۜ' => 230, - '۟' => 230, - '۠' => 230, - 'ۡ' => 230, - 'ۢ' => 230, - 'ۣ' => 220, - 'ۤ' => 230, - 'ۧ' => 230, - 'ۨ' => 230, - '۪' => 220, - '۫' => 230, - '۬' => 230, - 'ۭ' => 220, - 'ܑ' => 36, - 'ܰ' => 230, - 'ܱ' => 220, - 'ܲ' => 230, - 'ܳ' => 230, - 'ܴ' => 220, - 'ܵ' => 230, - 'ܶ' => 230, - 'ܷ' => 220, - 'ܸ' => 220, - 'ܹ' => 220, - 'ܺ' => 230, - 'ܻ' => 220, - 'ܼ' => 220, - 'ܽ' => 230, - 'ܾ' => 220, - 'ܿ' => 230, - '݀' => 230, - '݁' => 230, - '݂' => 220, - '݃' => 230, - '݄' => 220, - '݅' => 230, - '݆' => 220, - '݇' => 230, - '݈' => 220, - '݉' => 230, - '݊' => 230, - '߫' => 230, - '߬' => 230, - '߭' => 230, - '߮' => 230, - '߯' => 230, - '߰' => 230, - '߱' => 230, - '߲' => 220, - '߳' => 230, - '߽' => 220, - 'ࠖ' => 230, - 'ࠗ' => 230, - '࠘' => 230, - '࠙' => 230, - 'ࠛ' => 230, - 'ࠜ' => 230, - 'ࠝ' => 230, - 'ࠞ' => 230, - 'ࠟ' => 230, - 'ࠠ' => 230, - 'ࠡ' => 230, - 'ࠢ' => 230, - 'ࠣ' => 230, - 'ࠥ' => 230, - 'ࠦ' => 230, - 'ࠧ' => 230, - 'ࠩ' => 230, - 'ࠪ' => 230, - 'ࠫ' => 230, - 'ࠬ' => 230, - '࠭' => 230, - '࡙' => 220, - '࡚' => 220, - '࡛' => 220, - '࣓' => 220, - 'ࣔ' => 230, - 'ࣕ' => 230, - 'ࣖ' => 230, - 'ࣗ' => 230, - 'ࣘ' => 230, - 'ࣙ' => 230, - 'ࣚ' => 230, - 'ࣛ' => 230, - 'ࣜ' => 230, - 'ࣝ' => 230, - 'ࣞ' => 230, - 'ࣟ' => 230, - '࣠' => 230, - '࣡' => 230, - 'ࣣ' => 220, - 'ࣤ' => 230, - 'ࣥ' => 230, - 'ࣦ' => 220, - 'ࣧ' => 230, - 'ࣨ' => 230, - 'ࣩ' => 220, - '࣪' => 230, - '࣫' => 230, - '࣬' => 230, - '࣭' => 220, - '࣮' => 220, - '࣯' => 220, - 'ࣰ' => 27, - 'ࣱ' => 28, - 'ࣲ' => 29, - 'ࣳ' => 230, - 'ࣴ' => 230, - 'ࣵ' => 230, - 'ࣶ' => 220, - 'ࣷ' => 230, - 'ࣸ' => 230, - 'ࣹ' => 220, - 'ࣺ' => 220, - 'ࣻ' => 230, - 'ࣼ' => 230, - 'ࣽ' => 230, - 'ࣾ' => 230, - 'ࣿ' => 230, - '़' => 7, - '्' => 9, - '॑' => 230, - '॒' => 220, - '॓' => 230, - '॔' => 230, - '়' => 7, - '্' => 9, - '৾' => 230, - '਼' => 7, - '੍' => 9, - '઼' => 7, - '્' => 9, - '଼' => 7, - '୍' => 9, - '்' => 9, - '్' => 9, - 'ౕ' => 84, - 'ౖ' => 91, - '಼' => 7, - '್' => 9, - '഻' => 9, - '഼' => 9, - '്' => 9, - '්' => 9, - 'ุ' => 103, - 'ู' => 103, - 'ฺ' => 9, - '่' => 107, - '้' => 107, - '๊' => 107, - '๋' => 107, - 'ຸ' => 118, - 'ູ' => 118, - '຺' => 9, - '່' => 122, - '້' => 122, - '໊' => 122, - '໋' => 122, - '༘' => 220, - '༙' => 220, - '༵' => 220, - '༷' => 220, - '༹' => 216, - 'ཱ' => 129, - 'ི' => 130, - 'ུ' => 132, - 'ེ' => 130, - 'ཻ' => 130, - 'ོ' => 130, - 'ཽ' => 130, - 'ྀ' => 130, - 'ྂ' => 230, - 'ྃ' => 230, - '྄' => 9, - '྆' => 230, - '྇' => 230, - '࿆' => 220, - '့' => 7, - '္' => 9, - '်' => 9, - 'ႍ' => 220, - '፝' => 230, - '፞' => 230, - '፟' => 230, - '᜔' => 9, - '᜴' => 9, - '្' => 9, - '៝' => 230, - 'ᢩ' => 228, - '᤹' => 222, - '᤺' => 230, - '᤻' => 220, - 'ᨗ' => 230, - 'ᨘ' => 220, - '᩠' => 9, - '᩵' => 230, - '᩶' => 230, - '᩷' => 230, - '᩸' => 230, - '᩹' => 230, - '᩺' => 230, - '᩻' => 230, - '᩼' => 230, - '᩿' => 220, - '᪰' => 230, - '᪱' => 230, - '᪲' => 230, - '᪳' => 230, - '᪴' => 230, - '᪵' => 220, - '᪶' => 220, - '᪷' => 220, - '᪸' => 220, - '᪹' => 220, - '᪺' => 220, - '᪻' => 230, - '᪼' => 230, - '᪽' => 220, - 'ᪿ' => 220, - 'ᫀ' => 220, - '᬴' => 7, - '᭄' => 9, - '᭫' => 230, - '᭬' => 220, - '᭭' => 230, - '᭮' => 230, - '᭯' => 230, - '᭰' => 230, - '᭱' => 230, - '᭲' => 230, - '᭳' => 230, - '᮪' => 9, - '᮫' => 9, - '᯦' => 7, - '᯲' => 9, - '᯳' => 9, - '᰷' => 7, - '᳐' => 230, - '᳑' => 230, - '᳒' => 230, - '᳔' => 1, - '᳕' => 220, - '᳖' => 220, - '᳗' => 220, - '᳘' => 220, - '᳙' => 220, - '᳚' => 230, - '᳛' => 230, - '᳜' => 220, - '᳝' => 220, - '᳞' => 220, - '᳟' => 220, - '᳠' => 230, - '᳢' => 1, - '᳣' => 1, - '᳤' => 1, - '᳥' => 1, - '᳦' => 1, - '᳧' => 1, - '᳨' => 1, - '᳭' => 220, - '᳴' => 230, - '᳸' => 230, - '᳹' => 230, - '᷀' => 230, - '᷁' => 230, - '᷂' => 220, - '᷃' => 230, - '᷄' => 230, - '᷅' => 230, - '᷆' => 230, - '᷇' => 230, - '᷈' => 230, - '᷉' => 230, - '᷊' => 220, - '᷋' => 230, - '᷌' => 230, - '᷍' => 234, - '᷎' => 214, - '᷏' => 220, - '᷐' => 202, - '᷑' => 230, - '᷒' => 230, - 'ᷓ' => 230, - 'ᷔ' => 230, - 'ᷕ' => 230, - 'ᷖ' => 230, - 'ᷗ' => 230, - 'ᷘ' => 230, - 'ᷙ' => 230, - 'ᷚ' => 230, - 'ᷛ' => 230, - 'ᷜ' => 230, - 'ᷝ' => 230, - 'ᷞ' => 230, - 'ᷟ' => 230, - 'ᷠ' => 230, - 'ᷡ' => 230, - 'ᷢ' => 230, - 'ᷣ' => 230, - 'ᷤ' => 230, - 'ᷥ' => 230, - 'ᷦ' => 230, - 'ᷧ' => 230, - 'ᷨ' => 230, - 'ᷩ' => 230, - 'ᷪ' => 230, - 'ᷫ' => 230, - 'ᷬ' => 230, - 'ᷭ' => 230, - 'ᷮ' => 230, - 'ᷯ' => 230, - 'ᷰ' => 230, - 'ᷱ' => 230, - 'ᷲ' => 230, - 'ᷳ' => 230, - 'ᷴ' => 230, - '᷵' => 230, - '᷶' => 232, - '᷷' => 228, - '᷸' => 228, - '᷹' => 220, - '᷻' => 230, - '᷼' => 233, - '᷽' => 220, - '᷾' => 230, - '᷿' => 220, - '⃐' => 230, - '⃑' => 230, - '⃒' => 1, - '⃓' => 1, - '⃔' => 230, - '⃕' => 230, - '⃖' => 230, - '⃗' => 230, - '⃘' => 1, - '⃙' => 1, - '⃚' => 1, - '⃛' => 230, - '⃜' => 230, - '⃡' => 230, - '⃥' => 1, - '⃦' => 1, - '⃧' => 230, - '⃨' => 220, - '⃩' => 230, - '⃪' => 1, - '⃫' => 1, - '⃬' => 220, - '⃭' => 220, - '⃮' => 220, - '⃯' => 220, - '⃰' => 230, - '⳯' => 230, - '⳰' => 230, - '⳱' => 230, - '⵿' => 9, - 'ⷠ' => 230, - 'ⷡ' => 230, - 'ⷢ' => 230, - 'ⷣ' => 230, - 'ⷤ' => 230, - 'ⷥ' => 230, - 'ⷦ' => 230, - 'ⷧ' => 230, - 'ⷨ' => 230, - 'ⷩ' => 230, - 'ⷪ' => 230, - 'ⷫ' => 230, - 'ⷬ' => 230, - 'ⷭ' => 230, - 'ⷮ' => 230, - 'ⷯ' => 230, - 'ⷰ' => 230, - 'ⷱ' => 230, - 'ⷲ' => 230, - 'ⷳ' => 230, - 'ⷴ' => 230, - 'ⷵ' => 230, - 'ⷶ' => 230, - 'ⷷ' => 230, - 'ⷸ' => 230, - 'ⷹ' => 230, - 'ⷺ' => 230, - 'ⷻ' => 230, - 'ⷼ' => 230, - 'ⷽ' => 230, - 'ⷾ' => 230, - 'ⷿ' => 230, - '〪' => 218, - '〫' => 228, - '〬' => 232, - '〭' => 222, - '〮' => 224, - '〯' => 224, - '゙' => 8, - '゚' => 8, - '꙯' => 230, - 'ꙴ' => 230, - 'ꙵ' => 230, - 'ꙶ' => 230, - 'ꙷ' => 230, - 'ꙸ' => 230, - 'ꙹ' => 230, - 'ꙺ' => 230, - 'ꙻ' => 230, - '꙼' => 230, - '꙽' => 230, - 'ꚞ' => 230, - 'ꚟ' => 230, - '꛰' => 230, - '꛱' => 230, - '꠆' => 9, - '꠬' => 9, - '꣄' => 9, - '꣠' => 230, - '꣡' => 230, - '꣢' => 230, - '꣣' => 230, - '꣤' => 230, - '꣥' => 230, - '꣦' => 230, - '꣧' => 230, - '꣨' => 230, - '꣩' => 230, - '꣪' => 230, - '꣫' => 230, - '꣬' => 230, - '꣭' => 230, - '꣮' => 230, - '꣯' => 230, - '꣰' => 230, - '꣱' => 230, - '꤫' => 220, - '꤬' => 220, - '꤭' => 220, - '꥓' => 9, - '꦳' => 7, - '꧀' => 9, - 'ꪰ' => 230, - 'ꪲ' => 230, - 'ꪳ' => 230, - 'ꪴ' => 220, - 'ꪷ' => 230, - 'ꪸ' => 230, - 'ꪾ' => 230, - '꪿' => 230, - '꫁' => 230, - '꫶' => 9, - '꯭' => 9, - 'ﬞ' => 26, - '︠' => 230, - '︡' => 230, - '︢' => 230, - '︣' => 230, - '︤' => 230, - '︥' => 230, - '︦' => 230, - '︧' => 220, - '︨' => 220, - '︩' => 220, - '︪' => 220, - '︫' => 220, - '︬' => 220, - '︭' => 220, - '︮' => 230, - '︯' => 230, - '𐇽' => 220, - '𐋠' => 220, - '𐍶' => 230, - '𐍷' => 230, - '𐍸' => 230, - '𐍹' => 230, - '𐍺' => 230, - '𐨍' => 220, - '𐨏' => 230, - '𐨸' => 230, - '𐨹' => 1, - '𐨺' => 220, - '𐨿' => 9, - '𐫥' => 230, - '𐫦' => 220, - '𐴤' => 230, - '𐴥' => 230, - '𐴦' => 230, - '𐴧' => 230, - '𐺫' => 230, - '𐺬' => 230, - '𐽆' => 220, - '𐽇' => 220, - '𐽈' => 230, - '𐽉' => 230, - '𐽊' => 230, - '𐽋' => 220, - '𐽌' => 230, - '𐽍' => 220, - '𐽎' => 220, - '𐽏' => 220, - '𐽐' => 220, - '𑁆' => 9, - '𑁿' => 9, - '𑂹' => 9, - '𑂺' => 7, - '𑄀' => 230, - '𑄁' => 230, - '𑄂' => 230, - '𑄳' => 9, - '𑄴' => 9, - '𑅳' => 7, - '𑇀' => 9, - '𑇊' => 7, - '𑈵' => 9, - '𑈶' => 7, - '𑋩' => 7, - '𑋪' => 9, - '𑌻' => 7, - '𑌼' => 7, - '𑍍' => 9, - '𑍦' => 230, - '𑍧' => 230, - '𑍨' => 230, - '𑍩' => 230, - '𑍪' => 230, - '𑍫' => 230, - '𑍬' => 230, - '𑍰' => 230, - '𑍱' => 230, - '𑍲' => 230, - '𑍳' => 230, - '𑍴' => 230, - '𑑂' => 9, - '𑑆' => 7, - '𑑞' => 230, - '𑓂' => 9, - '𑓃' => 7, - '𑖿' => 9, - '𑗀' => 7, - '𑘿' => 9, - '𑚶' => 9, - '𑚷' => 7, - '𑜫' => 9, - '𑠹' => 9, - '𑠺' => 7, - '𑤽' => 9, - '𑤾' => 9, - '𑥃' => 7, - '𑧠' => 9, - '𑨴' => 9, - '𑩇' => 9, - '𑪙' => 9, - '𑰿' => 9, - '𑵂' => 7, - '𑵄' => 9, - '𑵅' => 9, - '𑶗' => 9, - '𖫰' => 1, - '𖫱' => 1, - '𖫲' => 1, - '𖫳' => 1, - '𖫴' => 1, - '𖬰' => 230, - '𖬱' => 230, - '𖬲' => 230, - '𖬳' => 230, - '𖬴' => 230, - '𖬵' => 230, - '𖬶' => 230, - '𖿰' => 6, - '𖿱' => 6, - '𛲞' => 1, - '𝅥' => 216, - '𝅦' => 216, - '𝅧' => 1, - '𝅨' => 1, - '𝅩' => 1, - '𝅭' => 226, - '𝅮' => 216, - '𝅯' => 216, - '𝅰' => 216, - '𝅱' => 216, - '𝅲' => 216, - '𝅻' => 220, - '𝅼' => 220, - '𝅽' => 220, - '𝅾' => 220, - '𝅿' => 220, - '𝆀' => 220, - '𝆁' => 220, - '𝆂' => 220, - '𝆅' => 230, - '𝆆' => 230, - '𝆇' => 230, - '𝆈' => 230, - '𝆉' => 230, - '𝆊' => 220, - '𝆋' => 220, - '𝆪' => 230, - '𝆫' => 230, - '𝆬' => 230, - '𝆭' => 230, - '𝉂' => 230, - '𝉃' => 230, - '𝉄' => 230, - '𞀀' => 230, - '𞀁' => 230, - '𞀂' => 230, - '𞀃' => 230, - '𞀄' => 230, - '𞀅' => 230, - '𞀆' => 230, - '𞀈' => 230, - '𞀉' => 230, - '𞀊' => 230, - '𞀋' => 230, - '𞀌' => 230, - '𞀍' => 230, - '𞀎' => 230, - '𞀏' => 230, - '𞀐' => 230, - '𞀑' => 230, - '𞀒' => 230, - '𞀓' => 230, - '𞀔' => 230, - '𞀕' => 230, - '𞀖' => 230, - '𞀗' => 230, - '𞀘' => 230, - '𞀛' => 230, - '𞀜' => 230, - '𞀝' => 230, - '𞀞' => 230, - '𞀟' => 230, - '𞀠' => 230, - '𞀡' => 230, - '𞀣' => 230, - '𞀤' => 230, - '𞀦' => 230, - '𞀧' => 230, - '𞀨' => 230, - '𞀩' => 230, - '𞀪' => 230, - '𞄰' => 230, - '𞄱' => 230, - '𞄲' => 230, - '𞄳' => 230, - '𞄴' => 230, - '𞄵' => 230, - '𞄶' => 230, - '𞋬' => 230, - '𞋭' => 230, - '𞋮' => 230, - '𞋯' => 230, - '𞣐' => 220, - '𞣑' => 220, - '𞣒' => 220, - '𞣓' => 220, - '𞣔' => 220, - '𞣕' => 220, - '𞣖' => 220, - '𞥄' => 230, - '𞥅' => 230, - '𞥆' => 230, - '𞥇' => 230, - '𞥈' => 230, - '𞥉' => 230, - '𞥊' => 7, -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php deleted file mode 100644 index 15749028..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php +++ /dev/null @@ -1,3695 +0,0 @@ - ' ', - '¨' => ' ̈', - 'ª' => 'a', - '¯' => ' ̄', - '²' => '2', - '³' => '3', - '´' => ' ́', - 'µ' => 'μ', - '¸' => ' ̧', - '¹' => '1', - 'º' => 'o', - '¼' => '1⁄4', - '½' => '1⁄2', - '¾' => '3⁄4', - 'IJ' => 'IJ', - 'ij' => 'ij', - 'Ŀ' => 'L·', - 'ŀ' => 'l·', - 'ʼn' => 'ʼn', - 'ſ' => 's', - 'DŽ' => 'DŽ', - 'Dž' => 'Dž', - 'dž' => 'dž', - 'LJ' => 'LJ', - 'Lj' => 'Lj', - 'lj' => 'lj', - 'NJ' => 'NJ', - 'Nj' => 'Nj', - 'nj' => 'nj', - 'DZ' => 'DZ', - 'Dz' => 'Dz', - 'dz' => 'dz', - 'ʰ' => 'h', - 'ʱ' => 'ɦ', - 'ʲ' => 'j', - 'ʳ' => 'r', - 'ʴ' => 'ɹ', - 'ʵ' => 'ɻ', - 'ʶ' => 'ʁ', - 'ʷ' => 'w', - 'ʸ' => 'y', - '˘' => ' ̆', - '˙' => ' ̇', - '˚' => ' ̊', - '˛' => ' ̨', - '˜' => ' ̃', - '˝' => ' ̋', - 'ˠ' => 'ɣ', - 'ˡ' => 'l', - 'ˢ' => 's', - 'ˣ' => 'x', - 'ˤ' => 'ʕ', - 'ͺ' => ' ͅ', - '΄' => ' ́', - '΅' => ' ̈́', - 'ϐ' => 'β', - 'ϑ' => 'θ', - 'ϒ' => 'Υ', - 'ϓ' => 'Ύ', - 'ϔ' => 'Ϋ', - 'ϕ' => 'φ', - 'ϖ' => 'π', - 'ϰ' => 'κ', - 'ϱ' => 'ρ', - 'ϲ' => 'ς', - 'ϴ' => 'Θ', - 'ϵ' => 'ε', - 'Ϲ' => 'Σ', - 'և' => 'եւ', - 'ٵ' => 'اٴ', - 'ٶ' => 'وٴ', - 'ٷ' => 'ۇٴ', - 'ٸ' => 'يٴ', - 'ำ' => 'ํา', - 'ຳ' => 'ໍາ', - 'ໜ' => 'ຫນ', - 'ໝ' => 'ຫມ', - '༌' => '་', - 'ཷ' => 'ྲཱྀ', - 'ཹ' => 'ླཱྀ', - 'ჼ' => 'ნ', - 'ᴬ' => 'A', - 'ᴭ' => 'Æ', - 'ᴮ' => 'B', - 'ᴰ' => 'D', - 'ᴱ' => 'E', - 'ᴲ' => 'Ǝ', - 'ᴳ' => 'G', - 'ᴴ' => 'H', - 'ᴵ' => 'I', - 'ᴶ' => 'J', - 'ᴷ' => 'K', - 'ᴸ' => 'L', - 'ᴹ' => 'M', - 'ᴺ' => 'N', - 'ᴼ' => 'O', - 'ᴽ' => 'Ȣ', - 'ᴾ' => 'P', - 'ᴿ' => 'R', - 'ᵀ' => 'T', - 'ᵁ' => 'U', - 'ᵂ' => 'W', - 'ᵃ' => 'a', - 'ᵄ' => 'ɐ', - 'ᵅ' => 'ɑ', - 'ᵆ' => 'ᴂ', - 'ᵇ' => 'b', - 'ᵈ' => 'd', - 'ᵉ' => 'e', - 'ᵊ' => 'ə', - 'ᵋ' => 'ɛ', - 'ᵌ' => 'ɜ', - 'ᵍ' => 'g', - 'ᵏ' => 'k', - 'ᵐ' => 'm', - 'ᵑ' => 'ŋ', - 'ᵒ' => 'o', - 'ᵓ' => 'ɔ', - 'ᵔ' => 'ᴖ', - 'ᵕ' => 'ᴗ', - 'ᵖ' => 'p', - 'ᵗ' => 't', - 'ᵘ' => 'u', - 'ᵙ' => 'ᴝ', - 'ᵚ' => 'ɯ', - 'ᵛ' => 'v', - 'ᵜ' => 'ᴥ', - 'ᵝ' => 'β', - 'ᵞ' => 'γ', - 'ᵟ' => 'δ', - 'ᵠ' => 'φ', - 'ᵡ' => 'χ', - 'ᵢ' => 'i', - 'ᵣ' => 'r', - 'ᵤ' => 'u', - 'ᵥ' => 'v', - 'ᵦ' => 'β', - 'ᵧ' => 'γ', - 'ᵨ' => 'ρ', - 'ᵩ' => 'φ', - 'ᵪ' => 'χ', - 'ᵸ' => 'н', - 'ᶛ' => 'ɒ', - 'ᶜ' => 'c', - 'ᶝ' => 'ɕ', - 'ᶞ' => 'ð', - 'ᶟ' => 'ɜ', - 'ᶠ' => 'f', - 'ᶡ' => 'ɟ', - 'ᶢ' => 'ɡ', - 'ᶣ' => 'ɥ', - 'ᶤ' => 'ɨ', - 'ᶥ' => 'ɩ', - 'ᶦ' => 'ɪ', - 'ᶧ' => 'ᵻ', - 'ᶨ' => 'ʝ', - 'ᶩ' => 'ɭ', - 'ᶪ' => 'ᶅ', - 'ᶫ' => 'ʟ', - 'ᶬ' => 'ɱ', - 'ᶭ' => 'ɰ', - 'ᶮ' => 'ɲ', - 'ᶯ' => 'ɳ', - 'ᶰ' => 'ɴ', - 'ᶱ' => 'ɵ', - 'ᶲ' => 'ɸ', - 'ᶳ' => 'ʂ', - 'ᶴ' => 'ʃ', - 'ᶵ' => 'ƫ', - 'ᶶ' => 'ʉ', - 'ᶷ' => 'ʊ', - 'ᶸ' => 'ᴜ', - 'ᶹ' => 'ʋ', - 'ᶺ' => 'ʌ', - 'ᶻ' => 'z', - 'ᶼ' => 'ʐ', - 'ᶽ' => 'ʑ', - 'ᶾ' => 'ʒ', - 'ᶿ' => 'θ', - 'ẚ' => 'aʾ', - 'ẛ' => 'ṡ', - '᾽' => ' ̓', - '᾿' => ' ̓', - '῀' => ' ͂', - '῁' => ' ̈͂', - '῍' => ' ̓̀', - '῎' => ' ̓́', - '῏' => ' ̓͂', - '῝' => ' ̔̀', - '῞' => ' ̔́', - '῟' => ' ̔͂', - '῭' => ' ̈̀', - '΅' => ' ̈́', - '´' => ' ́', - '῾' => ' ̔', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - ' ' => ' ', - '‑' => '‐', - '‗' => ' ̳', - '․' => '.', - '‥' => '..', - '…' => '...', - ' ' => ' ', - '″' => '′′', - '‴' => '′′′', - '‶' => '‵‵', - '‷' => '‵‵‵', - '‼' => '!!', - '‾' => ' ̅', - '⁇' => '??', - '⁈' => '?!', - '⁉' => '!?', - '⁗' => '′′′′', - ' ' => ' ', - '⁰' => '0', - 'ⁱ' => 'i', - '⁴' => '4', - '⁵' => '5', - '⁶' => '6', - '⁷' => '7', - '⁸' => '8', - '⁹' => '9', - '⁺' => '+', - '⁻' => '−', - '⁼' => '=', - '⁽' => '(', - '⁾' => ')', - 'ⁿ' => 'n', - '₀' => '0', - '₁' => '1', - '₂' => '2', - '₃' => '3', - '₄' => '4', - '₅' => '5', - '₆' => '6', - '₇' => '7', - '₈' => '8', - '₉' => '9', - '₊' => '+', - '₋' => '−', - '₌' => '=', - '₍' => '(', - '₎' => ')', - 'ₐ' => 'a', - 'ₑ' => 'e', - 'ₒ' => 'o', - 'ₓ' => 'x', - 'ₔ' => 'ə', - 'ₕ' => 'h', - 'ₖ' => 'k', - 'ₗ' => 'l', - 'ₘ' => 'm', - 'ₙ' => 'n', - 'ₚ' => 'p', - 'ₛ' => 's', - 'ₜ' => 't', - '₨' => 'Rs', - '℀' => 'a/c', - '℁' => 'a/s', - 'ℂ' => 'C', - '℃' => '°C', - '℅' => 'c/o', - '℆' => 'c/u', - 'ℇ' => 'Ɛ', - '℉' => '°F', - 'ℊ' => 'g', - 'ℋ' => 'H', - 'ℌ' => 'H', - 'ℍ' => 'H', - 'ℎ' => 'h', - 'ℏ' => 'ħ', - 'ℐ' => 'I', - 'ℑ' => 'I', - 'ℒ' => 'L', - 'ℓ' => 'l', - 'ℕ' => 'N', - '№' => 'No', - 'ℙ' => 'P', - 'ℚ' => 'Q', - 'ℛ' => 'R', - 'ℜ' => 'R', - 'ℝ' => 'R', - '℠' => 'SM', - '℡' => 'TEL', - '™' => 'TM', - 'ℤ' => 'Z', - 'ℨ' => 'Z', - 'ℬ' => 'B', - 'ℭ' => 'C', - 'ℯ' => 'e', - 'ℰ' => 'E', - 'ℱ' => 'F', - 'ℳ' => 'M', - 'ℴ' => 'o', - 'ℵ' => 'א', - 'ℶ' => 'ב', - 'ℷ' => 'ג', - 'ℸ' => 'ד', - 'ℹ' => 'i', - '℻' => 'FAX', - 'ℼ' => 'π', - 'ℽ' => 'γ', - 'ℾ' => 'Γ', - 'ℿ' => 'Π', - '⅀' => '∑', - 'ⅅ' => 'D', - 'ⅆ' => 'd', - 'ⅇ' => 'e', - 'ⅈ' => 'i', - 'ⅉ' => 'j', - '⅐' => '1⁄7', - '⅑' => '1⁄9', - '⅒' => '1⁄10', - '⅓' => '1⁄3', - '⅔' => '2⁄3', - '⅕' => '1⁄5', - '⅖' => '2⁄5', - '⅗' => '3⁄5', - '⅘' => '4⁄5', - '⅙' => '1⁄6', - '⅚' => '5⁄6', - '⅛' => '1⁄8', - '⅜' => '3⁄8', - '⅝' => '5⁄8', - '⅞' => '7⁄8', - '⅟' => '1⁄', - 'Ⅰ' => 'I', - 'Ⅱ' => 'II', - 'Ⅲ' => 'III', - 'Ⅳ' => 'IV', - 'Ⅴ' => 'V', - 'Ⅵ' => 'VI', - 'Ⅶ' => 'VII', - 'Ⅷ' => 'VIII', - 'Ⅸ' => 'IX', - 'Ⅹ' => 'X', - 'Ⅺ' => 'XI', - 'Ⅻ' => 'XII', - 'Ⅼ' => 'L', - 'Ⅽ' => 'C', - 'Ⅾ' => 'D', - 'Ⅿ' => 'M', - 'ⅰ' => 'i', - 'ⅱ' => 'ii', - 'ⅲ' => 'iii', - 'ⅳ' => 'iv', - 'ⅴ' => 'v', - 'ⅵ' => 'vi', - 'ⅶ' => 'vii', - 'ⅷ' => 'viii', - 'ⅸ' => 'ix', - 'ⅹ' => 'x', - 'ⅺ' => 'xi', - 'ⅻ' => 'xii', - 'ⅼ' => 'l', - 'ⅽ' => 'c', - 'ⅾ' => 'd', - 'ⅿ' => 'm', - '↉' => '0⁄3', - '∬' => '∫∫', - '∭' => '∫∫∫', - '∯' => '∮∮', - '∰' => '∮∮∮', - '①' => '1', - '②' => '2', - '③' => '3', - '④' => '4', - '⑤' => '5', - '⑥' => '6', - '⑦' => '7', - '⑧' => '8', - '⑨' => '9', - '⑩' => '10', - '⑪' => '11', - '⑫' => '12', - '⑬' => '13', - '⑭' => '14', - '⑮' => '15', - '⑯' => '16', - '⑰' => '17', - '⑱' => '18', - '⑲' => '19', - '⑳' => '20', - '⑴' => '(1)', - '⑵' => '(2)', - '⑶' => '(3)', - '⑷' => '(4)', - '⑸' => '(5)', - '⑹' => '(6)', - '⑺' => '(7)', - '⑻' => '(8)', - '⑼' => '(9)', - '⑽' => '(10)', - '⑾' => '(11)', - '⑿' => '(12)', - '⒀' => '(13)', - '⒁' => '(14)', - '⒂' => '(15)', - '⒃' => '(16)', - '⒄' => '(17)', - '⒅' => '(18)', - '⒆' => '(19)', - '⒇' => '(20)', - '⒈' => '1.', - '⒉' => '2.', - '⒊' => '3.', - '⒋' => '4.', - '⒌' => '5.', - '⒍' => '6.', - '⒎' => '7.', - '⒏' => '8.', - '⒐' => '9.', - '⒑' => '10.', - '⒒' => '11.', - '⒓' => '12.', - '⒔' => '13.', - '⒕' => '14.', - '⒖' => '15.', - '⒗' => '16.', - '⒘' => '17.', - '⒙' => '18.', - '⒚' => '19.', - '⒛' => '20.', - '⒜' => '(a)', - '⒝' => '(b)', - '⒞' => '(c)', - '⒟' => '(d)', - '⒠' => '(e)', - '⒡' => '(f)', - '⒢' => '(g)', - '⒣' => '(h)', - '⒤' => '(i)', - '⒥' => '(j)', - '⒦' => '(k)', - '⒧' => '(l)', - '⒨' => '(m)', - '⒩' => '(n)', - '⒪' => '(o)', - '⒫' => '(p)', - '⒬' => '(q)', - '⒭' => '(r)', - '⒮' => '(s)', - '⒯' => '(t)', - '⒰' => '(u)', - '⒱' => '(v)', - '⒲' => '(w)', - '⒳' => '(x)', - '⒴' => '(y)', - '⒵' => '(z)', - 'Ⓐ' => 'A', - 'Ⓑ' => 'B', - 'Ⓒ' => 'C', - 'Ⓓ' => 'D', - 'Ⓔ' => 'E', - 'Ⓕ' => 'F', - 'Ⓖ' => 'G', - 'Ⓗ' => 'H', - 'Ⓘ' => 'I', - 'Ⓙ' => 'J', - 'Ⓚ' => 'K', - 'Ⓛ' => 'L', - 'Ⓜ' => 'M', - 'Ⓝ' => 'N', - 'Ⓞ' => 'O', - 'Ⓟ' => 'P', - 'Ⓠ' => 'Q', - 'Ⓡ' => 'R', - 'Ⓢ' => 'S', - 'Ⓣ' => 'T', - 'Ⓤ' => 'U', - 'Ⓥ' => 'V', - 'Ⓦ' => 'W', - 'Ⓧ' => 'X', - 'Ⓨ' => 'Y', - 'Ⓩ' => 'Z', - 'ⓐ' => 'a', - 'ⓑ' => 'b', - 'ⓒ' => 'c', - 'ⓓ' => 'd', - 'ⓔ' => 'e', - 'ⓕ' => 'f', - 'ⓖ' => 'g', - 'ⓗ' => 'h', - 'ⓘ' => 'i', - 'ⓙ' => 'j', - 'ⓚ' => 'k', - 'ⓛ' => 'l', - 'ⓜ' => 'm', - 'ⓝ' => 'n', - 'ⓞ' => 'o', - 'ⓟ' => 'p', - 'ⓠ' => 'q', - 'ⓡ' => 'r', - 'ⓢ' => 's', - 'ⓣ' => 't', - 'ⓤ' => 'u', - 'ⓥ' => 'v', - 'ⓦ' => 'w', - 'ⓧ' => 'x', - 'ⓨ' => 'y', - 'ⓩ' => 'z', - '⓪' => '0', - '⨌' => '∫∫∫∫', - '⩴' => '::=', - '⩵' => '==', - '⩶' => '===', - 'ⱼ' => 'j', - 'ⱽ' => 'V', - 'ⵯ' => 'ⵡ', - '⺟' => '母', - '⻳' => '龟', - '⼀' => '一', - '⼁' => '丨', - '⼂' => '丶', - '⼃' => '丿', - '⼄' => '乙', - '⼅' => '亅', - '⼆' => '二', - '⼇' => '亠', - '⼈' => '人', - '⼉' => '儿', - '⼊' => '入', - '⼋' => '八', - '⼌' => '冂', - '⼍' => '冖', - '⼎' => '冫', - '⼏' => '几', - '⼐' => '凵', - '⼑' => '刀', - '⼒' => '力', - '⼓' => '勹', - '⼔' => '匕', - '⼕' => '匚', - '⼖' => '匸', - '⼗' => '十', - '⼘' => '卜', - '⼙' => '卩', - '⼚' => '厂', - '⼛' => '厶', - '⼜' => '又', - '⼝' => '口', - '⼞' => '囗', - '⼟' => '土', - '⼠' => '士', - '⼡' => '夂', - '⼢' => '夊', - '⼣' => '夕', - '⼤' => '大', - '⼥' => '女', - '⼦' => '子', - '⼧' => '宀', - '⼨' => '寸', - '⼩' => '小', - '⼪' => '尢', - '⼫' => '尸', - '⼬' => '屮', - '⼭' => '山', - '⼮' => '巛', - '⼯' => '工', - '⼰' => '己', - '⼱' => '巾', - '⼲' => '干', - '⼳' => '幺', - '⼴' => '广', - '⼵' => '廴', - '⼶' => '廾', - '⼷' => '弋', - '⼸' => '弓', - '⼹' => '彐', - '⼺' => '彡', - '⼻' => '彳', - '⼼' => '心', - '⼽' => '戈', - '⼾' => '戶', - '⼿' => '手', - '⽀' => '支', - '⽁' => '攴', - '⽂' => '文', - '⽃' => '斗', - '⽄' => '斤', - '⽅' => '方', - '⽆' => '无', - '⽇' => '日', - '⽈' => '曰', - '⽉' => '月', - '⽊' => '木', - '⽋' => '欠', - '⽌' => '止', - '⽍' => '歹', - '⽎' => '殳', - '⽏' => '毋', - '⽐' => '比', - '⽑' => '毛', - '⽒' => '氏', - '⽓' => '气', - '⽔' => '水', - '⽕' => '火', - '⽖' => '爪', - '⽗' => '父', - '⽘' => '爻', - '⽙' => '爿', - '⽚' => '片', - '⽛' => '牙', - '⽜' => '牛', - '⽝' => '犬', - '⽞' => '玄', - '⽟' => '玉', - '⽠' => '瓜', - '⽡' => '瓦', - '⽢' => '甘', - '⽣' => '生', - '⽤' => '用', - '⽥' => '田', - '⽦' => '疋', - '⽧' => '疒', - '⽨' => '癶', - '⽩' => '白', - '⽪' => '皮', - '⽫' => '皿', - '⽬' => '目', - '⽭' => '矛', - '⽮' => '矢', - '⽯' => '石', - '⽰' => '示', - '⽱' => '禸', - '⽲' => '禾', - '⽳' => '穴', - '⽴' => '立', - '⽵' => '竹', - '⽶' => '米', - '⽷' => '糸', - '⽸' => '缶', - '⽹' => '网', - '⽺' => '羊', - '⽻' => '羽', - '⽼' => '老', - '⽽' => '而', - '⽾' => '耒', - '⽿' => '耳', - '⾀' => '聿', - '⾁' => '肉', - '⾂' => '臣', - '⾃' => '自', - '⾄' => '至', - '⾅' => '臼', - '⾆' => '舌', - '⾇' => '舛', - '⾈' => '舟', - '⾉' => '艮', - '⾊' => '色', - '⾋' => '艸', - '⾌' => '虍', - '⾍' => '虫', - '⾎' => '血', - '⾏' => '行', - '⾐' => '衣', - '⾑' => '襾', - '⾒' => '見', - '⾓' => '角', - '⾔' => '言', - '⾕' => '谷', - '⾖' => '豆', - '⾗' => '豕', - '⾘' => '豸', - '⾙' => '貝', - '⾚' => '赤', - '⾛' => '走', - '⾜' => '足', - '⾝' => '身', - '⾞' => '車', - '⾟' => '辛', - '⾠' => '辰', - '⾡' => '辵', - '⾢' => '邑', - '⾣' => '酉', - '⾤' => '釆', - '⾥' => '里', - '⾦' => '金', - '⾧' => '長', - '⾨' => '門', - '⾩' => '阜', - '⾪' => '隶', - '⾫' => '隹', - '⾬' => '雨', - '⾭' => '靑', - '⾮' => '非', - '⾯' => '面', - '⾰' => '革', - '⾱' => '韋', - '⾲' => '韭', - '⾳' => '音', - '⾴' => '頁', - '⾵' => '風', - '⾶' => '飛', - '⾷' => '食', - '⾸' => '首', - '⾹' => '香', - '⾺' => '馬', - '⾻' => '骨', - '⾼' => '高', - '⾽' => '髟', - '⾾' => '鬥', - '⾿' => '鬯', - '⿀' => '鬲', - '⿁' => '鬼', - '⿂' => '魚', - '⿃' => '鳥', - '⿄' => '鹵', - '⿅' => '鹿', - '⿆' => '麥', - '⿇' => '麻', - '⿈' => '黃', - '⿉' => '黍', - '⿊' => '黑', - '⿋' => '黹', - '⿌' => '黽', - '⿍' => '鼎', - '⿎' => '鼓', - '⿏' => '鼠', - '⿐' => '鼻', - '⿑' => '齊', - '⿒' => '齒', - '⿓' => '龍', - '⿔' => '龜', - '⿕' => '龠', - ' ' => ' ', - '〶' => '〒', - '〸' => '十', - '〹' => '卄', - '〺' => '卅', - '゛' => ' ゙', - '゜' => ' ゚', - 'ゟ' => 'より', - 'ヿ' => 'コト', - 'ㄱ' => 'ᄀ', - 'ㄲ' => 'ᄁ', - 'ㄳ' => 'ᆪ', - 'ㄴ' => 'ᄂ', - 'ㄵ' => 'ᆬ', - 'ㄶ' => 'ᆭ', - 'ㄷ' => 'ᄃ', - 'ㄸ' => 'ᄄ', - 'ㄹ' => 'ᄅ', - 'ㄺ' => 'ᆰ', - 'ㄻ' => 'ᆱ', - 'ㄼ' => 'ᆲ', - 'ㄽ' => 'ᆳ', - 'ㄾ' => 'ᆴ', - 'ㄿ' => 'ᆵ', - 'ㅀ' => 'ᄚ', - 'ㅁ' => 'ᄆ', - 'ㅂ' => 'ᄇ', - 'ㅃ' => 'ᄈ', - 'ㅄ' => 'ᄡ', - 'ㅅ' => 'ᄉ', - 'ㅆ' => 'ᄊ', - 'ㅇ' => 'ᄋ', - 'ㅈ' => 'ᄌ', - 'ㅉ' => 'ᄍ', - 'ㅊ' => 'ᄎ', - 'ㅋ' => 'ᄏ', - 'ㅌ' => 'ᄐ', - 'ㅍ' => 'ᄑ', - 'ㅎ' => 'ᄒ', - 'ㅏ' => 'ᅡ', - 'ㅐ' => 'ᅢ', - 'ㅑ' => 'ᅣ', - 'ㅒ' => 'ᅤ', - 'ㅓ' => 'ᅥ', - 'ㅔ' => 'ᅦ', - 'ㅕ' => 'ᅧ', - 'ㅖ' => 'ᅨ', - 'ㅗ' => 'ᅩ', - 'ㅘ' => 'ᅪ', - 'ㅙ' => 'ᅫ', - 'ㅚ' => 'ᅬ', - 'ㅛ' => 'ᅭ', - 'ㅜ' => 'ᅮ', - 'ㅝ' => 'ᅯ', - 'ㅞ' => 'ᅰ', - 'ㅟ' => 'ᅱ', - 'ㅠ' => 'ᅲ', - 'ㅡ' => 'ᅳ', - 'ㅢ' => 'ᅴ', - 'ㅣ' => 'ᅵ', - 'ㅤ' => 'ᅠ', - 'ㅥ' => 'ᄔ', - 'ㅦ' => 'ᄕ', - 'ㅧ' => 'ᇇ', - 'ㅨ' => 'ᇈ', - 'ㅩ' => 'ᇌ', - 'ㅪ' => 'ᇎ', - 'ㅫ' => 'ᇓ', - 'ㅬ' => 'ᇗ', - 'ㅭ' => 'ᇙ', - 'ㅮ' => 'ᄜ', - 'ㅯ' => 'ᇝ', - 'ㅰ' => 'ᇟ', - 'ㅱ' => 'ᄝ', - 'ㅲ' => 'ᄞ', - 'ㅳ' => 'ᄠ', - 'ㅴ' => 'ᄢ', - 'ㅵ' => 'ᄣ', - 'ㅶ' => 'ᄧ', - 'ㅷ' => 'ᄩ', - 'ㅸ' => 'ᄫ', - 'ㅹ' => 'ᄬ', - 'ㅺ' => 'ᄭ', - 'ㅻ' => 'ᄮ', - 'ㅼ' => 'ᄯ', - 'ㅽ' => 'ᄲ', - 'ㅾ' => 'ᄶ', - 'ㅿ' => 'ᅀ', - 'ㆀ' => 'ᅇ', - 'ㆁ' => 'ᅌ', - 'ㆂ' => 'ᇱ', - 'ㆃ' => 'ᇲ', - 'ㆄ' => 'ᅗ', - 'ㆅ' => 'ᅘ', - 'ㆆ' => 'ᅙ', - 'ㆇ' => 'ᆄ', - 'ㆈ' => 'ᆅ', - 'ㆉ' => 'ᆈ', - 'ㆊ' => 'ᆑ', - 'ㆋ' => 'ᆒ', - 'ㆌ' => 'ᆔ', - 'ㆍ' => 'ᆞ', - 'ㆎ' => 'ᆡ', - '㆒' => '一', - '㆓' => '二', - '㆔' => '三', - '㆕' => '四', - '㆖' => '上', - '㆗' => '中', - '㆘' => '下', - '㆙' => '甲', - '㆚' => '乙', - '㆛' => '丙', - '㆜' => '丁', - '㆝' => '天', - '㆞' => '地', - '㆟' => '人', - '㈀' => '(ᄀ)', - '㈁' => '(ᄂ)', - '㈂' => '(ᄃ)', - '㈃' => '(ᄅ)', - '㈄' => '(ᄆ)', - '㈅' => '(ᄇ)', - '㈆' => '(ᄉ)', - '㈇' => '(ᄋ)', - '㈈' => '(ᄌ)', - '㈉' => '(ᄎ)', - '㈊' => '(ᄏ)', - '㈋' => '(ᄐ)', - '㈌' => '(ᄑ)', - '㈍' => '(ᄒ)', - '㈎' => '(가)', - '㈏' => '(나)', - '㈐' => '(다)', - '㈑' => '(라)', - '㈒' => '(마)', - '㈓' => '(바)', - '㈔' => '(사)', - '㈕' => '(아)', - '㈖' => '(자)', - '㈗' => '(차)', - '㈘' => '(카)', - '㈙' => '(타)', - '㈚' => '(파)', - '㈛' => '(하)', - '㈜' => '(주)', - '㈝' => '(오전)', - '㈞' => '(오후)', - '㈠' => '(一)', - '㈡' => '(二)', - '㈢' => '(三)', - '㈣' => '(四)', - '㈤' => '(五)', - '㈥' => '(六)', - '㈦' => '(七)', - '㈧' => '(八)', - '㈨' => '(九)', - '㈩' => '(十)', - '㈪' => '(月)', - '㈫' => '(火)', - '㈬' => '(水)', - '㈭' => '(木)', - '㈮' => '(金)', - '㈯' => '(土)', - '㈰' => '(日)', - '㈱' => '(株)', - '㈲' => '(有)', - '㈳' => '(社)', - '㈴' => '(名)', - '㈵' => '(特)', - '㈶' => '(財)', - '㈷' => '(祝)', - '㈸' => '(労)', - '㈹' => '(代)', - '㈺' => '(呼)', - '㈻' => '(学)', - '㈼' => '(監)', - '㈽' => '(企)', - '㈾' => '(資)', - '㈿' => '(協)', - '㉀' => '(祭)', - '㉁' => '(休)', - '㉂' => '(自)', - '㉃' => '(至)', - '㉄' => '問', - '㉅' => '幼', - '㉆' => '文', - '㉇' => '箏', - '㉐' => 'PTE', - '㉑' => '21', - '㉒' => '22', - '㉓' => '23', - '㉔' => '24', - '㉕' => '25', - '㉖' => '26', - '㉗' => '27', - '㉘' => '28', - '㉙' => '29', - '㉚' => '30', - '㉛' => '31', - '㉜' => '32', - '㉝' => '33', - '㉞' => '34', - '㉟' => '35', - '㉠' => 'ᄀ', - '㉡' => 'ᄂ', - '㉢' => 'ᄃ', - '㉣' => 'ᄅ', - '㉤' => 'ᄆ', - '㉥' => 'ᄇ', - '㉦' => 'ᄉ', - '㉧' => 'ᄋ', - '㉨' => 'ᄌ', - '㉩' => 'ᄎ', - '㉪' => 'ᄏ', - '㉫' => 'ᄐ', - '㉬' => 'ᄑ', - '㉭' => 'ᄒ', - '㉮' => '가', - '㉯' => '나', - '㉰' => '다', - '㉱' => '라', - '㉲' => '마', - '㉳' => '바', - '㉴' => '사', - '㉵' => '아', - '㉶' => '자', - '㉷' => '차', - '㉸' => '카', - '㉹' => '타', - '㉺' => '파', - '㉻' => '하', - '㉼' => '참고', - '㉽' => '주의', - '㉾' => '우', - '㊀' => '一', - '㊁' => '二', - '㊂' => '三', - '㊃' => '四', - '㊄' => '五', - '㊅' => '六', - '㊆' => '七', - '㊇' => '八', - '㊈' => '九', - '㊉' => '十', - '㊊' => '月', - '㊋' => '火', - '㊌' => '水', - '㊍' => '木', - '㊎' => '金', - '㊏' => '土', - '㊐' => '日', - '㊑' => '株', - '㊒' => '有', - '㊓' => '社', - '㊔' => '名', - '㊕' => '特', - '㊖' => '財', - '㊗' => '祝', - '㊘' => '労', - '㊙' => '秘', - '㊚' => '男', - '㊛' => '女', - '㊜' => '適', - '㊝' => '優', - '㊞' => '印', - '㊟' => '注', - '㊠' => '項', - '㊡' => '休', - '㊢' => '写', - '㊣' => '正', - '㊤' => '上', - '㊥' => '中', - '㊦' => '下', - '㊧' => '左', - '㊨' => '右', - '㊩' => '医', - '㊪' => '宗', - '㊫' => '学', - '㊬' => '監', - '㊭' => '企', - '㊮' => '資', - '㊯' => '協', - '㊰' => '夜', - '㊱' => '36', - '㊲' => '37', - '㊳' => '38', - '㊴' => '39', - '㊵' => '40', - '㊶' => '41', - '㊷' => '42', - '㊸' => '43', - '㊹' => '44', - '㊺' => '45', - '㊻' => '46', - '㊼' => '47', - '㊽' => '48', - '㊾' => '49', - '㊿' => '50', - '㋀' => '1月', - '㋁' => '2月', - '㋂' => '3月', - '㋃' => '4月', - '㋄' => '5月', - '㋅' => '6月', - '㋆' => '7月', - '㋇' => '8月', - '㋈' => '9月', - '㋉' => '10月', - '㋊' => '11月', - '㋋' => '12月', - '㋌' => 'Hg', - '㋍' => 'erg', - '㋎' => 'eV', - '㋏' => 'LTD', - '㋐' => 'ア', - '㋑' => 'イ', - '㋒' => 'ウ', - '㋓' => 'エ', - '㋔' => 'オ', - '㋕' => 'カ', - '㋖' => 'キ', - '㋗' => 'ク', - '㋘' => 'ケ', - '㋙' => 'コ', - '㋚' => 'サ', - '㋛' => 'シ', - '㋜' => 'ス', - '㋝' => 'セ', - '㋞' => 'ソ', - '㋟' => 'タ', - '㋠' => 'チ', - '㋡' => 'ツ', - '㋢' => 'テ', - '㋣' => 'ト', - '㋤' => 'ナ', - '㋥' => 'ニ', - '㋦' => 'ヌ', - '㋧' => 'ネ', - '㋨' => 'ノ', - '㋩' => 'ハ', - '㋪' => 'ヒ', - '㋫' => 'フ', - '㋬' => 'ヘ', - '㋭' => 'ホ', - '㋮' => 'マ', - '㋯' => 'ミ', - '㋰' => 'ム', - '㋱' => 'メ', - '㋲' => 'モ', - '㋳' => 'ヤ', - '㋴' => 'ユ', - '㋵' => 'ヨ', - '㋶' => 'ラ', - '㋷' => 'リ', - '㋸' => 'ル', - '㋹' => 'レ', - '㋺' => 'ロ', - '㋻' => 'ワ', - '㋼' => 'ヰ', - '㋽' => 'ヱ', - '㋾' => 'ヲ', - '㋿' => '令和', - '㌀' => 'アパート', - '㌁' => 'アルファ', - '㌂' => 'アンペア', - '㌃' => 'アール', - '㌄' => 'イニング', - '㌅' => 'インチ', - '㌆' => 'ウォン', - '㌇' => 'エスクード', - '㌈' => 'エーカー', - '㌉' => 'オンス', - '㌊' => 'オーム', - '㌋' => 'カイリ', - '㌌' => 'カラット', - '㌍' => 'カロリー', - '㌎' => 'ガロン', - '㌏' => 'ガンマ', - '㌐' => 'ギガ', - '㌑' => 'ギニー', - '㌒' => 'キュリー', - '㌓' => 'ギルダー', - '㌔' => 'キロ', - '㌕' => 'キログラム', - '㌖' => 'キロメートル', - '㌗' => 'キロワット', - '㌘' => 'グラム', - '㌙' => 'グラムトン', - '㌚' => 'クルゼイロ', - '㌛' => 'クローネ', - '㌜' => 'ケース', - '㌝' => 'コルナ', - '㌞' => 'コーポ', - '㌟' => 'サイクル', - '㌠' => 'サンチーム', - '㌡' => 'シリング', - '㌢' => 'センチ', - '㌣' => 'セント', - '㌤' => 'ダース', - '㌥' => 'デシ', - '㌦' => 'ドル', - '㌧' => 'トン', - '㌨' => 'ナノ', - '㌩' => 'ノット', - '㌪' => 'ハイツ', - '㌫' => 'パーセント', - '㌬' => 'パーツ', - '㌭' => 'バーレル', - '㌮' => 'ピアストル', - '㌯' => 'ピクル', - '㌰' => 'ピコ', - '㌱' => 'ビル', - '㌲' => 'ファラッド', - '㌳' => 'フィート', - '㌴' => 'ブッシェル', - '㌵' => 'フラン', - '㌶' => 'ヘクタール', - '㌷' => 'ペソ', - '㌸' => 'ペニヒ', - '㌹' => 'ヘルツ', - '㌺' => 'ペンス', - '㌻' => 'ページ', - '㌼' => 'ベータ', - '㌽' => 'ポイント', - '㌾' => 'ボルト', - '㌿' => 'ホン', - '㍀' => 'ポンド', - '㍁' => 'ホール', - '㍂' => 'ホーン', - '㍃' => 'マイクロ', - '㍄' => 'マイル', - '㍅' => 'マッハ', - '㍆' => 'マルク', - '㍇' => 'マンション', - '㍈' => 'ミクロン', - '㍉' => 'ミリ', - '㍊' => 'ミリバール', - '㍋' => 'メガ', - '㍌' => 'メガトン', - '㍍' => 'メートル', - '㍎' => 'ヤード', - '㍏' => 'ヤール', - '㍐' => 'ユアン', - '㍑' => 'リットル', - '㍒' => 'リラ', - '㍓' => 'ルピー', - '㍔' => 'ルーブル', - '㍕' => 'レム', - '㍖' => 'レントゲン', - '㍗' => 'ワット', - '㍘' => '0点', - '㍙' => '1点', - '㍚' => '2点', - '㍛' => '3点', - '㍜' => '4点', - '㍝' => '5点', - '㍞' => '6点', - '㍟' => '7点', - '㍠' => '8点', - '㍡' => '9点', - '㍢' => '10点', - '㍣' => '11点', - '㍤' => '12点', - '㍥' => '13点', - '㍦' => '14点', - '㍧' => '15点', - '㍨' => '16点', - '㍩' => '17点', - '㍪' => '18点', - '㍫' => '19点', - '㍬' => '20点', - '㍭' => '21点', - '㍮' => '22点', - '㍯' => '23点', - '㍰' => '24点', - '㍱' => 'hPa', - '㍲' => 'da', - '㍳' => 'AU', - '㍴' => 'bar', - '㍵' => 'oV', - '㍶' => 'pc', - '㍷' => 'dm', - '㍸' => 'dm2', - '㍹' => 'dm3', - '㍺' => 'IU', - '㍻' => '平成', - '㍼' => '昭和', - '㍽' => '大正', - '㍾' => '明治', - '㍿' => '株式会社', - '㎀' => 'pA', - '㎁' => 'nA', - '㎂' => 'μA', - '㎃' => 'mA', - '㎄' => 'kA', - '㎅' => 'KB', - '㎆' => 'MB', - '㎇' => 'GB', - '㎈' => 'cal', - '㎉' => 'kcal', - '㎊' => 'pF', - '㎋' => 'nF', - '㎌' => 'μF', - '㎍' => 'μg', - '㎎' => 'mg', - '㎏' => 'kg', - '㎐' => 'Hz', - '㎑' => 'kHz', - '㎒' => 'MHz', - '㎓' => 'GHz', - '㎔' => 'THz', - '㎕' => 'μl', - '㎖' => 'ml', - '㎗' => 'dl', - '㎘' => 'kl', - '㎙' => 'fm', - '㎚' => 'nm', - '㎛' => 'μm', - '㎜' => 'mm', - '㎝' => 'cm', - '㎞' => 'km', - '㎟' => 'mm2', - '㎠' => 'cm2', - '㎡' => 'm2', - '㎢' => 'km2', - '㎣' => 'mm3', - '㎤' => 'cm3', - '㎥' => 'm3', - '㎦' => 'km3', - '㎧' => 'm∕s', - '㎨' => 'm∕s2', - '㎩' => 'Pa', - '㎪' => 'kPa', - '㎫' => 'MPa', - '㎬' => 'GPa', - '㎭' => 'rad', - '㎮' => 'rad∕s', - '㎯' => 'rad∕s2', - '㎰' => 'ps', - '㎱' => 'ns', - '㎲' => 'μs', - '㎳' => 'ms', - '㎴' => 'pV', - '㎵' => 'nV', - '㎶' => 'μV', - '㎷' => 'mV', - '㎸' => 'kV', - '㎹' => 'MV', - '㎺' => 'pW', - '㎻' => 'nW', - '㎼' => 'μW', - '㎽' => 'mW', - '㎾' => 'kW', - '㎿' => 'MW', - '㏀' => 'kΩ', - '㏁' => 'MΩ', - '㏂' => 'a.m.', - '㏃' => 'Bq', - '㏄' => 'cc', - '㏅' => 'cd', - '㏆' => 'C∕kg', - '㏇' => 'Co.', - '㏈' => 'dB', - '㏉' => 'Gy', - '㏊' => 'ha', - '㏋' => 'HP', - '㏌' => 'in', - '㏍' => 'KK', - '㏎' => 'KM', - '㏏' => 'kt', - '㏐' => 'lm', - '㏑' => 'ln', - '㏒' => 'log', - '㏓' => 'lx', - '㏔' => 'mb', - '㏕' => 'mil', - '㏖' => 'mol', - '㏗' => 'PH', - '㏘' => 'p.m.', - '㏙' => 'PPM', - '㏚' => 'PR', - '㏛' => 'sr', - '㏜' => 'Sv', - '㏝' => 'Wb', - '㏞' => 'V∕m', - '㏟' => 'A∕m', - '㏠' => '1日', - '㏡' => '2日', - '㏢' => '3日', - '㏣' => '4日', - '㏤' => '5日', - '㏥' => '6日', - '㏦' => '7日', - '㏧' => '8日', - '㏨' => '9日', - '㏩' => '10日', - '㏪' => '11日', - '㏫' => '12日', - '㏬' => '13日', - '㏭' => '14日', - '㏮' => '15日', - '㏯' => '16日', - '㏰' => '17日', - '㏱' => '18日', - '㏲' => '19日', - '㏳' => '20日', - '㏴' => '21日', - '㏵' => '22日', - '㏶' => '23日', - '㏷' => '24日', - '㏸' => '25日', - '㏹' => '26日', - '㏺' => '27日', - '㏻' => '28日', - '㏼' => '29日', - '㏽' => '30日', - '㏾' => '31日', - '㏿' => 'gal', - 'ꚜ' => 'ъ', - 'ꚝ' => 'ь', - 'ꝰ' => 'ꝯ', - 'ꟸ' => 'Ħ', - 'ꟹ' => 'œ', - 'ꭜ' => 'ꜧ', - 'ꭝ' => 'ꬷ', - 'ꭞ' => 'ɫ', - 'ꭟ' => 'ꭒ', - 'ꭩ' => 'ʍ', - 'ff' => 'ff', - 'fi' => 'fi', - 'fl' => 'fl', - 'ffi' => 'ffi', - 'ffl' => 'ffl', - 'ſt' => 'st', - 'st' => 'st', - 'ﬓ' => 'մն', - 'ﬔ' => 'մե', - 'ﬕ' => 'մի', - 'ﬖ' => 'վն', - 'ﬗ' => 'մխ', - 'ﬠ' => 'ע', - 'ﬡ' => 'א', - 'ﬢ' => 'ד', - 'ﬣ' => 'ה', - 'ﬤ' => 'כ', - 'ﬥ' => 'ל', - 'ﬦ' => 'ם', - 'ﬧ' => 'ר', - 'ﬨ' => 'ת', - '﬩' => '+', - 'ﭏ' => 'אל', - 'ﭐ' => 'ٱ', - 'ﭑ' => 'ٱ', - 'ﭒ' => 'ٻ', - 'ﭓ' => 'ٻ', - 'ﭔ' => 'ٻ', - 'ﭕ' => 'ٻ', - 'ﭖ' => 'پ', - 'ﭗ' => 'پ', - 'ﭘ' => 'پ', - 'ﭙ' => 'پ', - 'ﭚ' => 'ڀ', - 'ﭛ' => 'ڀ', - 'ﭜ' => 'ڀ', - 'ﭝ' => 'ڀ', - 'ﭞ' => 'ٺ', - 'ﭟ' => 'ٺ', - 'ﭠ' => 'ٺ', - 'ﭡ' => 'ٺ', - 'ﭢ' => 'ٿ', - 'ﭣ' => 'ٿ', - 'ﭤ' => 'ٿ', - 'ﭥ' => 'ٿ', - 'ﭦ' => 'ٹ', - 'ﭧ' => 'ٹ', - 'ﭨ' => 'ٹ', - 'ﭩ' => 'ٹ', - 'ﭪ' => 'ڤ', - 'ﭫ' => 'ڤ', - 'ﭬ' => 'ڤ', - 'ﭭ' => 'ڤ', - 'ﭮ' => 'ڦ', - 'ﭯ' => 'ڦ', - 'ﭰ' => 'ڦ', - 'ﭱ' => 'ڦ', - 'ﭲ' => 'ڄ', - 'ﭳ' => 'ڄ', - 'ﭴ' => 'ڄ', - 'ﭵ' => 'ڄ', - 'ﭶ' => 'ڃ', - 'ﭷ' => 'ڃ', - 'ﭸ' => 'ڃ', - 'ﭹ' => 'ڃ', - 'ﭺ' => 'چ', - 'ﭻ' => 'چ', - 'ﭼ' => 'چ', - 'ﭽ' => 'چ', - 'ﭾ' => 'ڇ', - 'ﭿ' => 'ڇ', - 'ﮀ' => 'ڇ', - 'ﮁ' => 'ڇ', - 'ﮂ' => 'ڍ', - 'ﮃ' => 'ڍ', - 'ﮄ' => 'ڌ', - 'ﮅ' => 'ڌ', - 'ﮆ' => 'ڎ', - 'ﮇ' => 'ڎ', - 'ﮈ' => 'ڈ', - 'ﮉ' => 'ڈ', - 'ﮊ' => 'ژ', - 'ﮋ' => 'ژ', - 'ﮌ' => 'ڑ', - 'ﮍ' => 'ڑ', - 'ﮎ' => 'ک', - 'ﮏ' => 'ک', - 'ﮐ' => 'ک', - 'ﮑ' => 'ک', - 'ﮒ' => 'گ', - 'ﮓ' => 'گ', - 'ﮔ' => 'گ', - 'ﮕ' => 'گ', - 'ﮖ' => 'ڳ', - 'ﮗ' => 'ڳ', - 'ﮘ' => 'ڳ', - 'ﮙ' => 'ڳ', - 'ﮚ' => 'ڱ', - 'ﮛ' => 'ڱ', - 'ﮜ' => 'ڱ', - 'ﮝ' => 'ڱ', - 'ﮞ' => 'ں', - 'ﮟ' => 'ں', - 'ﮠ' => 'ڻ', - 'ﮡ' => 'ڻ', - 'ﮢ' => 'ڻ', - 'ﮣ' => 'ڻ', - 'ﮤ' => 'ۀ', - 'ﮥ' => 'ۀ', - 'ﮦ' => 'ہ', - 'ﮧ' => 'ہ', - 'ﮨ' => 'ہ', - 'ﮩ' => 'ہ', - 'ﮪ' => 'ھ', - 'ﮫ' => 'ھ', - 'ﮬ' => 'ھ', - 'ﮭ' => 'ھ', - 'ﮮ' => 'ے', - 'ﮯ' => 'ے', - 'ﮰ' => 'ۓ', - 'ﮱ' => 'ۓ', - 'ﯓ' => 'ڭ', - 'ﯔ' => 'ڭ', - 'ﯕ' => 'ڭ', - 'ﯖ' => 'ڭ', - 'ﯗ' => 'ۇ', - 'ﯘ' => 'ۇ', - 'ﯙ' => 'ۆ', - 'ﯚ' => 'ۆ', - 'ﯛ' => 'ۈ', - 'ﯜ' => 'ۈ', - 'ﯝ' => 'ۇٴ', - 'ﯞ' => 'ۋ', - 'ﯟ' => 'ۋ', - 'ﯠ' => 'ۅ', - 'ﯡ' => 'ۅ', - 'ﯢ' => 'ۉ', - 'ﯣ' => 'ۉ', - 'ﯤ' => 'ې', - 'ﯥ' => 'ې', - 'ﯦ' => 'ې', - 'ﯧ' => 'ې', - 'ﯨ' => 'ى', - 'ﯩ' => 'ى', - 'ﯪ' => 'ئا', - 'ﯫ' => 'ئا', - 'ﯬ' => 'ئە', - 'ﯭ' => 'ئە', - 'ﯮ' => 'ئو', - 'ﯯ' => 'ئو', - 'ﯰ' => 'ئۇ', - 'ﯱ' => 'ئۇ', - 'ﯲ' => 'ئۆ', - 'ﯳ' => 'ئۆ', - 'ﯴ' => 'ئۈ', - 'ﯵ' => 'ئۈ', - 'ﯶ' => 'ئې', - 'ﯷ' => 'ئې', - 'ﯸ' => 'ئې', - 'ﯹ' => 'ئى', - 'ﯺ' => 'ئى', - 'ﯻ' => 'ئى', - 'ﯼ' => 'ی', - 'ﯽ' => 'ی', - 'ﯾ' => 'ی', - 'ﯿ' => 'ی', - 'ﰀ' => 'ئج', - 'ﰁ' => 'ئح', - 'ﰂ' => 'ئم', - 'ﰃ' => 'ئى', - 'ﰄ' => 'ئي', - 'ﰅ' => 'بج', - 'ﰆ' => 'بح', - 'ﰇ' => 'بخ', - 'ﰈ' => 'بم', - 'ﰉ' => 'بى', - 'ﰊ' => 'بي', - 'ﰋ' => 'تج', - 'ﰌ' => 'تح', - 'ﰍ' => 'تخ', - 'ﰎ' => 'تم', - 'ﰏ' => 'تى', - 'ﰐ' => 'تي', - 'ﰑ' => 'ثج', - 'ﰒ' => 'ثم', - 'ﰓ' => 'ثى', - 'ﰔ' => 'ثي', - 'ﰕ' => 'جح', - 'ﰖ' => 'جم', - 'ﰗ' => 'حج', - 'ﰘ' => 'حم', - 'ﰙ' => 'خج', - 'ﰚ' => 'خح', - 'ﰛ' => 'خم', - 'ﰜ' => 'سج', - 'ﰝ' => 'سح', - 'ﰞ' => 'سخ', - 'ﰟ' => 'سم', - 'ﰠ' => 'صح', - 'ﰡ' => 'صم', - 'ﰢ' => 'ضج', - 'ﰣ' => 'ضح', - 'ﰤ' => 'ضخ', - 'ﰥ' => 'ضم', - 'ﰦ' => 'طح', - 'ﰧ' => 'طم', - 'ﰨ' => 'ظم', - 'ﰩ' => 'عج', - 'ﰪ' => 'عم', - 'ﰫ' => 'غج', - 'ﰬ' => 'غم', - 'ﰭ' => 'فج', - 'ﰮ' => 'فح', - 'ﰯ' => 'فخ', - 'ﰰ' => 'فم', - 'ﰱ' => 'فى', - 'ﰲ' => 'في', - 'ﰳ' => 'قح', - 'ﰴ' => 'قم', - 'ﰵ' => 'قى', - 'ﰶ' => 'قي', - 'ﰷ' => 'كا', - 'ﰸ' => 'كج', - 'ﰹ' => 'كح', - 'ﰺ' => 'كخ', - 'ﰻ' => 'كل', - 'ﰼ' => 'كم', - 'ﰽ' => 'كى', - 'ﰾ' => 'كي', - 'ﰿ' => 'لج', - 'ﱀ' => 'لح', - 'ﱁ' => 'لخ', - 'ﱂ' => 'لم', - 'ﱃ' => 'لى', - 'ﱄ' => 'لي', - 'ﱅ' => 'مج', - 'ﱆ' => 'مح', - 'ﱇ' => 'مخ', - 'ﱈ' => 'مم', - 'ﱉ' => 'مى', - 'ﱊ' => 'مي', - 'ﱋ' => 'نج', - 'ﱌ' => 'نح', - 'ﱍ' => 'نخ', - 'ﱎ' => 'نم', - 'ﱏ' => 'نى', - 'ﱐ' => 'ني', - 'ﱑ' => 'هج', - 'ﱒ' => 'هم', - 'ﱓ' => 'هى', - 'ﱔ' => 'هي', - 'ﱕ' => 'يج', - 'ﱖ' => 'يح', - 'ﱗ' => 'يخ', - 'ﱘ' => 'يم', - 'ﱙ' => 'يى', - 'ﱚ' => 'يي', - 'ﱛ' => 'ذٰ', - 'ﱜ' => 'رٰ', - 'ﱝ' => 'ىٰ', - 'ﱞ' => ' ٌّ', - 'ﱟ' => ' ٍّ', - 'ﱠ' => ' َّ', - 'ﱡ' => ' ُّ', - 'ﱢ' => ' ِّ', - 'ﱣ' => ' ّٰ', - 'ﱤ' => 'ئر', - 'ﱥ' => 'ئز', - 'ﱦ' => 'ئم', - 'ﱧ' => 'ئن', - 'ﱨ' => 'ئى', - 'ﱩ' => 'ئي', - 'ﱪ' => 'بر', - 'ﱫ' => 'بز', - 'ﱬ' => 'بم', - 'ﱭ' => 'بن', - 'ﱮ' => 'بى', - 'ﱯ' => 'بي', - 'ﱰ' => 'تر', - 'ﱱ' => 'تز', - 'ﱲ' => 'تم', - 'ﱳ' => 'تن', - 'ﱴ' => 'تى', - 'ﱵ' => 'تي', - 'ﱶ' => 'ثر', - 'ﱷ' => 'ثز', - 'ﱸ' => 'ثم', - 'ﱹ' => 'ثن', - 'ﱺ' => 'ثى', - 'ﱻ' => 'ثي', - 'ﱼ' => 'فى', - 'ﱽ' => 'في', - 'ﱾ' => 'قى', - 'ﱿ' => 'قي', - 'ﲀ' => 'كا', - 'ﲁ' => 'كل', - 'ﲂ' => 'كم', - 'ﲃ' => 'كى', - 'ﲄ' => 'كي', - 'ﲅ' => 'لم', - 'ﲆ' => 'لى', - 'ﲇ' => 'لي', - 'ﲈ' => 'ما', - 'ﲉ' => 'مم', - 'ﲊ' => 'نر', - 'ﲋ' => 'نز', - 'ﲌ' => 'نم', - 'ﲍ' => 'نن', - 'ﲎ' => 'نى', - 'ﲏ' => 'ني', - 'ﲐ' => 'ىٰ', - 'ﲑ' => 'ير', - 'ﲒ' => 'يز', - 'ﲓ' => 'يم', - 'ﲔ' => 'ين', - 'ﲕ' => 'يى', - 'ﲖ' => 'يي', - 'ﲗ' => 'ئج', - 'ﲘ' => 'ئح', - 'ﲙ' => 'ئخ', - 'ﲚ' => 'ئم', - 'ﲛ' => 'ئه', - 'ﲜ' => 'بج', - 'ﲝ' => 'بح', - 'ﲞ' => 'بخ', - 'ﲟ' => 'بم', - 'ﲠ' => 'به', - 'ﲡ' => 'تج', - 'ﲢ' => 'تح', - 'ﲣ' => 'تخ', - 'ﲤ' => 'تم', - 'ﲥ' => 'ته', - 'ﲦ' => 'ثم', - 'ﲧ' => 'جح', - 'ﲨ' => 'جم', - 'ﲩ' => 'حج', - 'ﲪ' => 'حم', - 'ﲫ' => 'خج', - 'ﲬ' => 'خم', - 'ﲭ' => 'سج', - 'ﲮ' => 'سح', - 'ﲯ' => 'سخ', - 'ﲰ' => 'سم', - 'ﲱ' => 'صح', - 'ﲲ' => 'صخ', - 'ﲳ' => 'صم', - 'ﲴ' => 'ضج', - 'ﲵ' => 'ضح', - 'ﲶ' => 'ضخ', - 'ﲷ' => 'ضم', - 'ﲸ' => 'طح', - 'ﲹ' => 'ظم', - 'ﲺ' => 'عج', - 'ﲻ' => 'عم', - 'ﲼ' => 'غج', - 'ﲽ' => 'غم', - 'ﲾ' => 'فج', - 'ﲿ' => 'فح', - 'ﳀ' => 'فخ', - 'ﳁ' => 'فم', - 'ﳂ' => 'قح', - 'ﳃ' => 'قم', - 'ﳄ' => 'كج', - 'ﳅ' => 'كح', - 'ﳆ' => 'كخ', - 'ﳇ' => 'كل', - 'ﳈ' => 'كم', - 'ﳉ' => 'لج', - 'ﳊ' => 'لح', - 'ﳋ' => 'لخ', - 'ﳌ' => 'لم', - 'ﳍ' => 'له', - 'ﳎ' => 'مج', - 'ﳏ' => 'مح', - 'ﳐ' => 'مخ', - 'ﳑ' => 'مم', - 'ﳒ' => 'نج', - 'ﳓ' => 'نح', - 'ﳔ' => 'نخ', - 'ﳕ' => 'نم', - 'ﳖ' => 'نه', - 'ﳗ' => 'هج', - 'ﳘ' => 'هم', - 'ﳙ' => 'هٰ', - 'ﳚ' => 'يج', - 'ﳛ' => 'يح', - 'ﳜ' => 'يخ', - 'ﳝ' => 'يم', - 'ﳞ' => 'يه', - 'ﳟ' => 'ئم', - 'ﳠ' => 'ئه', - 'ﳡ' => 'بم', - 'ﳢ' => 'به', - 'ﳣ' => 'تم', - 'ﳤ' => 'ته', - 'ﳥ' => 'ثم', - 'ﳦ' => 'ثه', - 'ﳧ' => 'سم', - 'ﳨ' => 'سه', - 'ﳩ' => 'شم', - 'ﳪ' => 'شه', - 'ﳫ' => 'كل', - 'ﳬ' => 'كم', - 'ﳭ' => 'لم', - 'ﳮ' => 'نم', - 'ﳯ' => 'نه', - 'ﳰ' => 'يم', - 'ﳱ' => 'يه', - 'ﳲ' => 'ـَّ', - 'ﳳ' => 'ـُّ', - 'ﳴ' => 'ـِّ', - 'ﳵ' => 'طى', - 'ﳶ' => 'طي', - 'ﳷ' => 'عى', - 'ﳸ' => 'عي', - 'ﳹ' => 'غى', - 'ﳺ' => 'غي', - 'ﳻ' => 'سى', - 'ﳼ' => 'سي', - 'ﳽ' => 'شى', - 'ﳾ' => 'شي', - 'ﳿ' => 'حى', - 'ﴀ' => 'حي', - 'ﴁ' => 'جى', - 'ﴂ' => 'جي', - 'ﴃ' => 'خى', - 'ﴄ' => 'خي', - 'ﴅ' => 'صى', - 'ﴆ' => 'صي', - 'ﴇ' => 'ضى', - 'ﴈ' => 'ضي', - 'ﴉ' => 'شج', - 'ﴊ' => 'شح', - 'ﴋ' => 'شخ', - 'ﴌ' => 'شم', - 'ﴍ' => 'شر', - 'ﴎ' => 'سر', - 'ﴏ' => 'صر', - 'ﴐ' => 'ضر', - 'ﴑ' => 'طى', - 'ﴒ' => 'طي', - 'ﴓ' => 'عى', - 'ﴔ' => 'عي', - 'ﴕ' => 'غى', - 'ﴖ' => 'غي', - 'ﴗ' => 'سى', - 'ﴘ' => 'سي', - 'ﴙ' => 'شى', - 'ﴚ' => 'شي', - 'ﴛ' => 'حى', - 'ﴜ' => 'حي', - 'ﴝ' => 'جى', - 'ﴞ' => 'جي', - 'ﴟ' => 'خى', - 'ﴠ' => 'خي', - 'ﴡ' => 'صى', - 'ﴢ' => 'صي', - 'ﴣ' => 'ضى', - 'ﴤ' => 'ضي', - 'ﴥ' => 'شج', - 'ﴦ' => 'شح', - 'ﴧ' => 'شخ', - 'ﴨ' => 'شم', - 'ﴩ' => 'شر', - 'ﴪ' => 'سر', - 'ﴫ' => 'صر', - 'ﴬ' => 'ضر', - 'ﴭ' => 'شج', - 'ﴮ' => 'شح', - 'ﴯ' => 'شخ', - 'ﴰ' => 'شم', - 'ﴱ' => 'سه', - 'ﴲ' => 'شه', - 'ﴳ' => 'طم', - 'ﴴ' => 'سج', - 'ﴵ' => 'سح', - 'ﴶ' => 'سخ', - 'ﴷ' => 'شج', - 'ﴸ' => 'شح', - 'ﴹ' => 'شخ', - 'ﴺ' => 'طم', - 'ﴻ' => 'ظم', - 'ﴼ' => 'اً', - 'ﴽ' => 'اً', - 'ﵐ' => 'تجم', - 'ﵑ' => 'تحج', - 'ﵒ' => 'تحج', - 'ﵓ' => 'تحم', - 'ﵔ' => 'تخم', - 'ﵕ' => 'تمج', - 'ﵖ' => 'تمح', - 'ﵗ' => 'تمخ', - 'ﵘ' => 'جمح', - 'ﵙ' => 'جمح', - 'ﵚ' => 'حمي', - 'ﵛ' => 'حمى', - 'ﵜ' => 'سحج', - 'ﵝ' => 'سجح', - 'ﵞ' => 'سجى', - 'ﵟ' => 'سمح', - 'ﵠ' => 'سمح', - 'ﵡ' => 'سمج', - 'ﵢ' => 'سمم', - 'ﵣ' => 'سمم', - 'ﵤ' => 'صحح', - 'ﵥ' => 'صحح', - 'ﵦ' => 'صمم', - 'ﵧ' => 'شحم', - 'ﵨ' => 'شحم', - 'ﵩ' => 'شجي', - 'ﵪ' => 'شمخ', - 'ﵫ' => 'شمخ', - 'ﵬ' => 'شمم', - 'ﵭ' => 'شمم', - 'ﵮ' => 'ضحى', - 'ﵯ' => 'ضخم', - 'ﵰ' => 'ضخم', - 'ﵱ' => 'طمح', - 'ﵲ' => 'طمح', - 'ﵳ' => 'طمم', - 'ﵴ' => 'طمي', - 'ﵵ' => 'عجم', - 'ﵶ' => 'عمم', - 'ﵷ' => 'عمم', - 'ﵸ' => 'عمى', - 'ﵹ' => 'غمم', - 'ﵺ' => 'غمي', - 'ﵻ' => 'غمى', - 'ﵼ' => 'فخم', - 'ﵽ' => 'فخم', - 'ﵾ' => 'قمح', - 'ﵿ' => 'قمم', - 'ﶀ' => 'لحم', - 'ﶁ' => 'لحي', - 'ﶂ' => 'لحى', - 'ﶃ' => 'لجج', - 'ﶄ' => 'لجج', - 'ﶅ' => 'لخم', - 'ﶆ' => 'لخم', - 'ﶇ' => 'لمح', - 'ﶈ' => 'لمح', - 'ﶉ' => 'محج', - 'ﶊ' => 'محم', - 'ﶋ' => 'محي', - 'ﶌ' => 'مجح', - 'ﶍ' => 'مجم', - 'ﶎ' => 'مخج', - 'ﶏ' => 'مخم', - 'ﶒ' => 'مجخ', - 'ﶓ' => 'همج', - 'ﶔ' => 'همم', - 'ﶕ' => 'نحم', - 'ﶖ' => 'نحى', - 'ﶗ' => 'نجم', - 'ﶘ' => 'نجم', - 'ﶙ' => 'نجى', - 'ﶚ' => 'نمي', - 'ﶛ' => 'نمى', - 'ﶜ' => 'يمم', - 'ﶝ' => 'يمم', - 'ﶞ' => 'بخي', - 'ﶟ' => 'تجي', - 'ﶠ' => 'تجى', - 'ﶡ' => 'تخي', - 'ﶢ' => 'تخى', - 'ﶣ' => 'تمي', - 'ﶤ' => 'تمى', - 'ﶥ' => 'جمي', - 'ﶦ' => 'جحى', - 'ﶧ' => 'جمى', - 'ﶨ' => 'سخى', - 'ﶩ' => 'صحي', - 'ﶪ' => 'شحي', - 'ﶫ' => 'ضحي', - 'ﶬ' => 'لجي', - 'ﶭ' => 'لمي', - 'ﶮ' => 'يحي', - 'ﶯ' => 'يجي', - 'ﶰ' => 'يمي', - 'ﶱ' => 'ممي', - 'ﶲ' => 'قمي', - 'ﶳ' => 'نحي', - 'ﶴ' => 'قمح', - 'ﶵ' => 'لحم', - 'ﶶ' => 'عمي', - 'ﶷ' => 'كمي', - 'ﶸ' => 'نجح', - 'ﶹ' => 'مخي', - 'ﶺ' => 'لجم', - 'ﶻ' => 'كمم', - 'ﶼ' => 'لجم', - 'ﶽ' => 'نجح', - 'ﶾ' => 'جحي', - 'ﶿ' => 'حجي', - 'ﷀ' => 'مجي', - 'ﷁ' => 'فمي', - 'ﷂ' => 'بحي', - 'ﷃ' => 'كمم', - 'ﷄ' => 'عجم', - 'ﷅ' => 'صمم', - 'ﷆ' => 'سخي', - 'ﷇ' => 'نجي', - 'ﷰ' => 'صلے', - 'ﷱ' => 'قلے', - 'ﷲ' => 'الله', - 'ﷳ' => 'اكبر', - 'ﷴ' => 'محمد', - 'ﷵ' => 'صلعم', - 'ﷶ' => 'رسول', - 'ﷷ' => 'عليه', - 'ﷸ' => 'وسلم', - 'ﷹ' => 'صلى', - 'ﷺ' => 'صلى الله عليه وسلم', - 'ﷻ' => 'جل جلاله', - '﷼' => 'ریال', - '︐' => ',', - '︑' => '、', - '︒' => '。', - '︓' => ':', - '︔' => ';', - '︕' => '!', - '︖' => '?', - '︗' => '〖', - '︘' => '〗', - '︙' => '...', - '︰' => '..', - '︱' => '—', - '︲' => '–', - '︳' => '_', - '︴' => '_', - '︵' => '(', - '︶' => ')', - '︷' => '{', - '︸' => '}', - '︹' => '〔', - '︺' => '〕', - '︻' => '【', - '︼' => '】', - '︽' => '《', - '︾' => '》', - '︿' => '〈', - '﹀' => '〉', - '﹁' => '「', - '﹂' => '」', - '﹃' => '『', - '﹄' => '』', - '﹇' => '[', - '﹈' => ']', - '﹉' => ' ̅', - '﹊' => ' ̅', - '﹋' => ' ̅', - '﹌' => ' ̅', - '﹍' => '_', - '﹎' => '_', - '﹏' => '_', - '﹐' => ',', - '﹑' => '、', - '﹒' => '.', - '﹔' => ';', - '﹕' => ':', - '﹖' => '?', - '﹗' => '!', - '﹘' => '—', - '﹙' => '(', - '﹚' => ')', - '﹛' => '{', - '﹜' => '}', - '﹝' => '〔', - '﹞' => '〕', - '﹟' => '#', - '﹠' => '&', - '﹡' => '*', - '﹢' => '+', - '﹣' => '-', - '﹤' => '<', - '﹥' => '>', - '﹦' => '=', - '﹨' => '\\', - '﹩' => '$', - '﹪' => '%', - '﹫' => '@', - 'ﹰ' => ' ً', - 'ﹱ' => 'ـً', - 'ﹲ' => ' ٌ', - 'ﹴ' => ' ٍ', - 'ﹶ' => ' َ', - 'ﹷ' => 'ـَ', - 'ﹸ' => ' ُ', - 'ﹹ' => 'ـُ', - 'ﹺ' => ' ِ', - 'ﹻ' => 'ـِ', - 'ﹼ' => ' ّ', - 'ﹽ' => 'ـّ', - 'ﹾ' => ' ْ', - 'ﹿ' => 'ـْ', - 'ﺀ' => 'ء', - 'ﺁ' => 'آ', - 'ﺂ' => 'آ', - 'ﺃ' => 'أ', - 'ﺄ' => 'أ', - 'ﺅ' => 'ؤ', - 'ﺆ' => 'ؤ', - 'ﺇ' => 'إ', - 'ﺈ' => 'إ', - 'ﺉ' => 'ئ', - 'ﺊ' => 'ئ', - 'ﺋ' => 'ئ', - 'ﺌ' => 'ئ', - 'ﺍ' => 'ا', - 'ﺎ' => 'ا', - 'ﺏ' => 'ب', - 'ﺐ' => 'ب', - 'ﺑ' => 'ب', - 'ﺒ' => 'ب', - 'ﺓ' => 'ة', - 'ﺔ' => 'ة', - 'ﺕ' => 'ت', - 'ﺖ' => 'ت', - 'ﺗ' => 'ت', - 'ﺘ' => 'ت', - 'ﺙ' => 'ث', - 'ﺚ' => 'ث', - 'ﺛ' => 'ث', - 'ﺜ' => 'ث', - 'ﺝ' => 'ج', - 'ﺞ' => 'ج', - 'ﺟ' => 'ج', - 'ﺠ' => 'ج', - 'ﺡ' => 'ح', - 'ﺢ' => 'ح', - 'ﺣ' => 'ح', - 'ﺤ' => 'ح', - 'ﺥ' => 'خ', - 'ﺦ' => 'خ', - 'ﺧ' => 'خ', - 'ﺨ' => 'خ', - 'ﺩ' => 'د', - 'ﺪ' => 'د', - 'ﺫ' => 'ذ', - 'ﺬ' => 'ذ', - 'ﺭ' => 'ر', - 'ﺮ' => 'ر', - 'ﺯ' => 'ز', - 'ﺰ' => 'ز', - 'ﺱ' => 'س', - 'ﺲ' => 'س', - 'ﺳ' => 'س', - 'ﺴ' => 'س', - 'ﺵ' => 'ش', - 'ﺶ' => 'ش', - 'ﺷ' => 'ش', - 'ﺸ' => 'ش', - 'ﺹ' => 'ص', - 'ﺺ' => 'ص', - 'ﺻ' => 'ص', - 'ﺼ' => 'ص', - 'ﺽ' => 'ض', - 'ﺾ' => 'ض', - 'ﺿ' => 'ض', - 'ﻀ' => 'ض', - 'ﻁ' => 'ط', - 'ﻂ' => 'ط', - 'ﻃ' => 'ط', - 'ﻄ' => 'ط', - 'ﻅ' => 'ظ', - 'ﻆ' => 'ظ', - 'ﻇ' => 'ظ', - 'ﻈ' => 'ظ', - 'ﻉ' => 'ع', - 'ﻊ' => 'ع', - 'ﻋ' => 'ع', - 'ﻌ' => 'ع', - 'ﻍ' => 'غ', - 'ﻎ' => 'غ', - 'ﻏ' => 'غ', - 'ﻐ' => 'غ', - 'ﻑ' => 'ف', - 'ﻒ' => 'ف', - 'ﻓ' => 'ف', - 'ﻔ' => 'ف', - 'ﻕ' => 'ق', - 'ﻖ' => 'ق', - 'ﻗ' => 'ق', - 'ﻘ' => 'ق', - 'ﻙ' => 'ك', - 'ﻚ' => 'ك', - 'ﻛ' => 'ك', - 'ﻜ' => 'ك', - 'ﻝ' => 'ل', - 'ﻞ' => 'ل', - 'ﻟ' => 'ل', - 'ﻠ' => 'ل', - 'ﻡ' => 'م', - 'ﻢ' => 'م', - 'ﻣ' => 'م', - 'ﻤ' => 'م', - 'ﻥ' => 'ن', - 'ﻦ' => 'ن', - 'ﻧ' => 'ن', - 'ﻨ' => 'ن', - 'ﻩ' => 'ه', - 'ﻪ' => 'ه', - 'ﻫ' => 'ه', - 'ﻬ' => 'ه', - 'ﻭ' => 'و', - 'ﻮ' => 'و', - 'ﻯ' => 'ى', - 'ﻰ' => 'ى', - 'ﻱ' => 'ي', - 'ﻲ' => 'ي', - 'ﻳ' => 'ي', - 'ﻴ' => 'ي', - 'ﻵ' => 'لآ', - 'ﻶ' => 'لآ', - 'ﻷ' => 'لأ', - 'ﻸ' => 'لأ', - 'ﻹ' => 'لإ', - 'ﻺ' => 'لإ', - 'ﻻ' => 'لا', - 'ﻼ' => 'لا', - '!' => '!', - '"' => '"', - '#' => '#', - '$' => '$', - '%' => '%', - '&' => '&', - ''' => '\'', - '(' => '(', - ')' => ')', - '*' => '*', - '+' => '+', - ',' => ',', - '-' => '-', - '.' => '.', - '/' => '/', - '0' => '0', - '1' => '1', - '2' => '2', - '3' => '3', - '4' => '4', - '5' => '5', - '6' => '6', - '7' => '7', - '8' => '8', - '9' => '9', - ':' => ':', - ';' => ';', - '<' => '<', - '=' => '=', - '>' => '>', - '?' => '?', - '@' => '@', - 'A' => 'A', - 'B' => 'B', - 'C' => 'C', - 'D' => 'D', - 'E' => 'E', - 'F' => 'F', - 'G' => 'G', - 'H' => 'H', - 'I' => 'I', - 'J' => 'J', - 'K' => 'K', - 'L' => 'L', - 'M' => 'M', - 'N' => 'N', - 'O' => 'O', - 'P' => 'P', - 'Q' => 'Q', - 'R' => 'R', - 'S' => 'S', - 'T' => 'T', - 'U' => 'U', - 'V' => 'V', - 'W' => 'W', - 'X' => 'X', - 'Y' => 'Y', - 'Z' => 'Z', - '[' => '[', - '\' => '\\', - ']' => ']', - '^' => '^', - '_' => '_', - '`' => '`', - 'a' => 'a', - 'b' => 'b', - 'c' => 'c', - 'd' => 'd', - 'e' => 'e', - 'f' => 'f', - 'g' => 'g', - 'h' => 'h', - 'i' => 'i', - 'j' => 'j', - 'k' => 'k', - 'l' => 'l', - 'm' => 'm', - 'n' => 'n', - 'o' => 'o', - 'p' => 'p', - 'q' => 'q', - 'r' => 'r', - 's' => 's', - 't' => 't', - 'u' => 'u', - 'v' => 'v', - 'w' => 'w', - 'x' => 'x', - 'y' => 'y', - 'z' => 'z', - '{' => '{', - '|' => '|', - '}' => '}', - '~' => '~', - '⦅' => '⦅', - '⦆' => '⦆', - '。' => '。', - '「' => '「', - '」' => '」', - '、' => '、', - '・' => '・', - 'ヲ' => 'ヲ', - 'ァ' => 'ァ', - 'ィ' => 'ィ', - 'ゥ' => 'ゥ', - 'ェ' => 'ェ', - 'ォ' => 'ォ', - 'ャ' => 'ャ', - 'ュ' => 'ュ', - 'ョ' => 'ョ', - 'ッ' => 'ッ', - 'ー' => 'ー', - 'ア' => 'ア', - 'イ' => 'イ', - 'ウ' => 'ウ', - 'エ' => 'エ', - 'オ' => 'オ', - 'カ' => 'カ', - 'キ' => 'キ', - 'ク' => 'ク', - 'ケ' => 'ケ', - 'コ' => 'コ', - 'サ' => 'サ', - 'シ' => 'シ', - 'ス' => 'ス', - 'セ' => 'セ', - 'ソ' => 'ソ', - 'タ' => 'タ', - 'チ' => 'チ', - 'ツ' => 'ツ', - 'テ' => 'テ', - 'ト' => 'ト', - 'ナ' => 'ナ', - 'ニ' => 'ニ', - 'ヌ' => 'ヌ', - 'ネ' => 'ネ', - 'ノ' => 'ノ', - 'ハ' => 'ハ', - 'ヒ' => 'ヒ', - 'フ' => 'フ', - 'ヘ' => 'ヘ', - 'ホ' => 'ホ', - 'マ' => 'マ', - 'ミ' => 'ミ', - 'ム' => 'ム', - 'メ' => 'メ', - 'モ' => 'モ', - 'ヤ' => 'ヤ', - 'ユ' => 'ユ', - 'ヨ' => 'ヨ', - 'ラ' => 'ラ', - 'リ' => 'リ', - 'ル' => 'ル', - 'レ' => 'レ', - 'ロ' => 'ロ', - 'ワ' => 'ワ', - 'ン' => 'ン', - '゙' => '゙', - '゚' => '゚', - 'ᅠ' => 'ᅠ', - 'ᄀ' => 'ᄀ', - 'ᄁ' => 'ᄁ', - 'ᆪ' => 'ᆪ', - 'ᄂ' => 'ᄂ', - 'ᆬ' => 'ᆬ', - 'ᆭ' => 'ᆭ', - 'ᄃ' => 'ᄃ', - 'ᄄ' => 'ᄄ', - 'ᄅ' => 'ᄅ', - 'ᆰ' => 'ᆰ', - 'ᆱ' => 'ᆱ', - 'ᆲ' => 'ᆲ', - 'ᆳ' => 'ᆳ', - 'ᆴ' => 'ᆴ', - 'ᆵ' => 'ᆵ', - 'ᄚ' => 'ᄚ', - 'ᄆ' => 'ᄆ', - 'ᄇ' => 'ᄇ', - 'ᄈ' => 'ᄈ', - 'ᄡ' => 'ᄡ', - 'ᄉ' => 'ᄉ', - 'ᄊ' => 'ᄊ', - 'ᄋ' => 'ᄋ', - 'ᄌ' => 'ᄌ', - 'ᄍ' => 'ᄍ', - 'ᄎ' => 'ᄎ', - 'ᄏ' => 'ᄏ', - 'ᄐ' => 'ᄐ', - 'ᄑ' => 'ᄑ', - 'ᄒ' => 'ᄒ', - 'ᅡ' => 'ᅡ', - 'ᅢ' => 'ᅢ', - 'ᅣ' => 'ᅣ', - 'ᅤ' => 'ᅤ', - 'ᅥ' => 'ᅥ', - 'ᅦ' => 'ᅦ', - 'ᅧ' => 'ᅧ', - 'ᅨ' => 'ᅨ', - 'ᅩ' => 'ᅩ', - 'ᅪ' => 'ᅪ', - 'ᅫ' => 'ᅫ', - 'ᅬ' => 'ᅬ', - 'ᅭ' => 'ᅭ', - 'ᅮ' => 'ᅮ', - 'ᅯ' => 'ᅯ', - 'ᅰ' => 'ᅰ', - 'ᅱ' => 'ᅱ', - 'ᅲ' => 'ᅲ', - 'ᅳ' => 'ᅳ', - 'ᅴ' => 'ᅴ', - 'ᅵ' => 'ᅵ', - '¢' => '¢', - '£' => '£', - '¬' => '¬', - ' ̄' => ' ̄', - '¦' => '¦', - '¥' => '¥', - '₩' => '₩', - '│' => '│', - '←' => '←', - '↑' => '↑', - '→' => '→', - '↓' => '↓', - '■' => '■', - '○' => '○', - '𝐀' => 'A', - '𝐁' => 'B', - '𝐂' => 'C', - '𝐃' => 'D', - '𝐄' => 'E', - '𝐅' => 'F', - '𝐆' => 'G', - '𝐇' => 'H', - '𝐈' => 'I', - '𝐉' => 'J', - '𝐊' => 'K', - '𝐋' => 'L', - '𝐌' => 'M', - '𝐍' => 'N', - '𝐎' => 'O', - '𝐏' => 'P', - '𝐐' => 'Q', - '𝐑' => 'R', - '𝐒' => 'S', - '𝐓' => 'T', - '𝐔' => 'U', - '𝐕' => 'V', - '𝐖' => 'W', - '𝐗' => 'X', - '𝐘' => 'Y', - '𝐙' => 'Z', - '𝐚' => 'a', - '𝐛' => 'b', - '𝐜' => 'c', - '𝐝' => 'd', - '𝐞' => 'e', - '𝐟' => 'f', - '𝐠' => 'g', - '𝐡' => 'h', - '𝐢' => 'i', - '𝐣' => 'j', - '𝐤' => 'k', - '𝐥' => 'l', - '𝐦' => 'm', - '𝐧' => 'n', - '𝐨' => 'o', - '𝐩' => 'p', - '𝐪' => 'q', - '𝐫' => 'r', - '𝐬' => 's', - '𝐭' => 't', - '𝐮' => 'u', - '𝐯' => 'v', - '𝐰' => 'w', - '𝐱' => 'x', - '𝐲' => 'y', - '𝐳' => 'z', - '𝐴' => 'A', - '𝐵' => 'B', - '𝐶' => 'C', - '𝐷' => 'D', - '𝐸' => 'E', - '𝐹' => 'F', - '𝐺' => 'G', - '𝐻' => 'H', - '𝐼' => 'I', - '𝐽' => 'J', - '𝐾' => 'K', - '𝐿' => 'L', - '𝑀' => 'M', - '𝑁' => 'N', - '𝑂' => 'O', - '𝑃' => 'P', - '𝑄' => 'Q', - '𝑅' => 'R', - '𝑆' => 'S', - '𝑇' => 'T', - '𝑈' => 'U', - '𝑉' => 'V', - '𝑊' => 'W', - '𝑋' => 'X', - '𝑌' => 'Y', - '𝑍' => 'Z', - '𝑎' => 'a', - '𝑏' => 'b', - '𝑐' => 'c', - '𝑑' => 'd', - '𝑒' => 'e', - '𝑓' => 'f', - '𝑔' => 'g', - '𝑖' => 'i', - '𝑗' => 'j', - '𝑘' => 'k', - '𝑙' => 'l', - '𝑚' => 'm', - '𝑛' => 'n', - '𝑜' => 'o', - '𝑝' => 'p', - '𝑞' => 'q', - '𝑟' => 'r', - '𝑠' => 's', - '𝑡' => 't', - '𝑢' => 'u', - '𝑣' => 'v', - '𝑤' => 'w', - '𝑥' => 'x', - '𝑦' => 'y', - '𝑧' => 'z', - '𝑨' => 'A', - '𝑩' => 'B', - '𝑪' => 'C', - '𝑫' => 'D', - '𝑬' => 'E', - '𝑭' => 'F', - '𝑮' => 'G', - '𝑯' => 'H', - '𝑰' => 'I', - '𝑱' => 'J', - '𝑲' => 'K', - '𝑳' => 'L', - '𝑴' => 'M', - '𝑵' => 'N', - '𝑶' => 'O', - '𝑷' => 'P', - '𝑸' => 'Q', - '𝑹' => 'R', - '𝑺' => 'S', - '𝑻' => 'T', - '𝑼' => 'U', - '𝑽' => 'V', - '𝑾' => 'W', - '𝑿' => 'X', - '𝒀' => 'Y', - '𝒁' => 'Z', - '𝒂' => 'a', - '𝒃' => 'b', - '𝒄' => 'c', - '𝒅' => 'd', - '𝒆' => 'e', - '𝒇' => 'f', - '𝒈' => 'g', - '𝒉' => 'h', - '𝒊' => 'i', - '𝒋' => 'j', - '𝒌' => 'k', - '𝒍' => 'l', - '𝒎' => 'm', - '𝒏' => 'n', - '𝒐' => 'o', - '𝒑' => 'p', - '𝒒' => 'q', - '𝒓' => 'r', - '𝒔' => 's', - '𝒕' => 't', - '𝒖' => 'u', - '𝒗' => 'v', - '𝒘' => 'w', - '𝒙' => 'x', - '𝒚' => 'y', - '𝒛' => 'z', - '𝒜' => 'A', - '𝒞' => 'C', - '𝒟' => 'D', - '𝒢' => 'G', - '𝒥' => 'J', - '𝒦' => 'K', - '𝒩' => 'N', - '𝒪' => 'O', - '𝒫' => 'P', - '𝒬' => 'Q', - '𝒮' => 'S', - '𝒯' => 'T', - '𝒰' => 'U', - '𝒱' => 'V', - '𝒲' => 'W', - '𝒳' => 'X', - '𝒴' => 'Y', - '𝒵' => 'Z', - '𝒶' => 'a', - '𝒷' => 'b', - '𝒸' => 'c', - '𝒹' => 'd', - '𝒻' => 'f', - '𝒽' => 'h', - '𝒾' => 'i', - '𝒿' => 'j', - '𝓀' => 'k', - '𝓁' => 'l', - '𝓂' => 'm', - '𝓃' => 'n', - '𝓅' => 'p', - '𝓆' => 'q', - '𝓇' => 'r', - '𝓈' => 's', - '𝓉' => 't', - '𝓊' => 'u', - '𝓋' => 'v', - '𝓌' => 'w', - '𝓍' => 'x', - '𝓎' => 'y', - '𝓏' => 'z', - '𝓐' => 'A', - '𝓑' => 'B', - '𝓒' => 'C', - '𝓓' => 'D', - '𝓔' => 'E', - '𝓕' => 'F', - '𝓖' => 'G', - '𝓗' => 'H', - '𝓘' => 'I', - '𝓙' => 'J', - '𝓚' => 'K', - '𝓛' => 'L', - '𝓜' => 'M', - '𝓝' => 'N', - '𝓞' => 'O', - '𝓟' => 'P', - '𝓠' => 'Q', - '𝓡' => 'R', - '𝓢' => 'S', - '𝓣' => 'T', - '𝓤' => 'U', - '𝓥' => 'V', - '𝓦' => 'W', - '𝓧' => 'X', - '𝓨' => 'Y', - '𝓩' => 'Z', - '𝓪' => 'a', - '𝓫' => 'b', - '𝓬' => 'c', - '𝓭' => 'd', - '𝓮' => 'e', - '𝓯' => 'f', - '𝓰' => 'g', - '𝓱' => 'h', - '𝓲' => 'i', - '𝓳' => 'j', - '𝓴' => 'k', - '𝓵' => 'l', - '𝓶' => 'm', - '𝓷' => 'n', - '𝓸' => 'o', - '𝓹' => 'p', - '𝓺' => 'q', - '𝓻' => 'r', - '𝓼' => 's', - '𝓽' => 't', - '𝓾' => 'u', - '𝓿' => 'v', - '𝔀' => 'w', - '𝔁' => 'x', - '𝔂' => 'y', - '𝔃' => 'z', - '𝔄' => 'A', - '𝔅' => 'B', - '𝔇' => 'D', - '𝔈' => 'E', - '𝔉' => 'F', - '𝔊' => 'G', - '𝔍' => 'J', - '𝔎' => 'K', - '𝔏' => 'L', - '𝔐' => 'M', - '𝔑' => 'N', - '𝔒' => 'O', - '𝔓' => 'P', - '𝔔' => 'Q', - '𝔖' => 'S', - '𝔗' => 'T', - '𝔘' => 'U', - '𝔙' => 'V', - '𝔚' => 'W', - '𝔛' => 'X', - '𝔜' => 'Y', - '𝔞' => 'a', - '𝔟' => 'b', - '𝔠' => 'c', - '𝔡' => 'd', - '𝔢' => 'e', - '𝔣' => 'f', - '𝔤' => 'g', - '𝔥' => 'h', - '𝔦' => 'i', - '𝔧' => 'j', - '𝔨' => 'k', - '𝔩' => 'l', - '𝔪' => 'm', - '𝔫' => 'n', - '𝔬' => 'o', - '𝔭' => 'p', - '𝔮' => 'q', - '𝔯' => 'r', - '𝔰' => 's', - '𝔱' => 't', - '𝔲' => 'u', - '𝔳' => 'v', - '𝔴' => 'w', - '𝔵' => 'x', - '𝔶' => 'y', - '𝔷' => 'z', - '𝔸' => 'A', - '𝔹' => 'B', - '𝔻' => 'D', - '𝔼' => 'E', - '𝔽' => 'F', - '𝔾' => 'G', - '𝕀' => 'I', - '𝕁' => 'J', - '𝕂' => 'K', - '𝕃' => 'L', - '𝕄' => 'M', - '𝕆' => 'O', - '𝕊' => 'S', - '𝕋' => 'T', - '𝕌' => 'U', - '𝕍' => 'V', - '𝕎' => 'W', - '𝕏' => 'X', - '𝕐' => 'Y', - '𝕒' => 'a', - '𝕓' => 'b', - '𝕔' => 'c', - '𝕕' => 'd', - '𝕖' => 'e', - '𝕗' => 'f', - '𝕘' => 'g', - '𝕙' => 'h', - '𝕚' => 'i', - '𝕛' => 'j', - '𝕜' => 'k', - '𝕝' => 'l', - '𝕞' => 'm', - '𝕟' => 'n', - '𝕠' => 'o', - '𝕡' => 'p', - '𝕢' => 'q', - '𝕣' => 'r', - '𝕤' => 's', - '𝕥' => 't', - '𝕦' => 'u', - '𝕧' => 'v', - '𝕨' => 'w', - '𝕩' => 'x', - '𝕪' => 'y', - '𝕫' => 'z', - '𝕬' => 'A', - '𝕭' => 'B', - '𝕮' => 'C', - '𝕯' => 'D', - '𝕰' => 'E', - '𝕱' => 'F', - '𝕲' => 'G', - '𝕳' => 'H', - '𝕴' => 'I', - '𝕵' => 'J', - '𝕶' => 'K', - '𝕷' => 'L', - '𝕸' => 'M', - '𝕹' => 'N', - '𝕺' => 'O', - '𝕻' => 'P', - '𝕼' => 'Q', - '𝕽' => 'R', - '𝕾' => 'S', - '𝕿' => 'T', - '𝖀' => 'U', - '𝖁' => 'V', - '𝖂' => 'W', - '𝖃' => 'X', - '𝖄' => 'Y', - '𝖅' => 'Z', - '𝖆' => 'a', - '𝖇' => 'b', - '𝖈' => 'c', - '𝖉' => 'd', - '𝖊' => 'e', - '𝖋' => 'f', - '𝖌' => 'g', - '𝖍' => 'h', - '𝖎' => 'i', - '𝖏' => 'j', - '𝖐' => 'k', - '𝖑' => 'l', - '𝖒' => 'm', - '𝖓' => 'n', - '𝖔' => 'o', - '𝖕' => 'p', - '𝖖' => 'q', - '𝖗' => 'r', - '𝖘' => 's', - '𝖙' => 't', - '𝖚' => 'u', - '𝖛' => 'v', - '𝖜' => 'w', - '𝖝' => 'x', - '𝖞' => 'y', - '𝖟' => 'z', - '𝖠' => 'A', - '𝖡' => 'B', - '𝖢' => 'C', - '𝖣' => 'D', - '𝖤' => 'E', - '𝖥' => 'F', - '𝖦' => 'G', - '𝖧' => 'H', - '𝖨' => 'I', - '𝖩' => 'J', - '𝖪' => 'K', - '𝖫' => 'L', - '𝖬' => 'M', - '𝖭' => 'N', - '𝖮' => 'O', - '𝖯' => 'P', - '𝖰' => 'Q', - '𝖱' => 'R', - '𝖲' => 'S', - '𝖳' => 'T', - '𝖴' => 'U', - '𝖵' => 'V', - '𝖶' => 'W', - '𝖷' => 'X', - '𝖸' => 'Y', - '𝖹' => 'Z', - '𝖺' => 'a', - '𝖻' => 'b', - '𝖼' => 'c', - '𝖽' => 'd', - '𝖾' => 'e', - '𝖿' => 'f', - '𝗀' => 'g', - '𝗁' => 'h', - '𝗂' => 'i', - '𝗃' => 'j', - '𝗄' => 'k', - '𝗅' => 'l', - '𝗆' => 'm', - '𝗇' => 'n', - '𝗈' => 'o', - '𝗉' => 'p', - '𝗊' => 'q', - '𝗋' => 'r', - '𝗌' => 's', - '𝗍' => 't', - '𝗎' => 'u', - '𝗏' => 'v', - '𝗐' => 'w', - '𝗑' => 'x', - '𝗒' => 'y', - '𝗓' => 'z', - '𝗔' => 'A', - '𝗕' => 'B', - '𝗖' => 'C', - '𝗗' => 'D', - '𝗘' => 'E', - '𝗙' => 'F', - '𝗚' => 'G', - '𝗛' => 'H', - '𝗜' => 'I', - '𝗝' => 'J', - '𝗞' => 'K', - '𝗟' => 'L', - '𝗠' => 'M', - '𝗡' => 'N', - '𝗢' => 'O', - '𝗣' => 'P', - '𝗤' => 'Q', - '𝗥' => 'R', - '𝗦' => 'S', - '𝗧' => 'T', - '𝗨' => 'U', - '𝗩' => 'V', - '𝗪' => 'W', - '𝗫' => 'X', - '𝗬' => 'Y', - '𝗭' => 'Z', - '𝗮' => 'a', - '𝗯' => 'b', - '𝗰' => 'c', - '𝗱' => 'd', - '𝗲' => 'e', - '𝗳' => 'f', - '𝗴' => 'g', - '𝗵' => 'h', - '𝗶' => 'i', - '𝗷' => 'j', - '𝗸' => 'k', - '𝗹' => 'l', - '𝗺' => 'm', - '𝗻' => 'n', - '𝗼' => 'o', - '𝗽' => 'p', - '𝗾' => 'q', - '𝗿' => 'r', - '𝘀' => 's', - '𝘁' => 't', - '𝘂' => 'u', - '𝘃' => 'v', - '𝘄' => 'w', - '𝘅' => 'x', - '𝘆' => 'y', - '𝘇' => 'z', - '𝘈' => 'A', - '𝘉' => 'B', - '𝘊' => 'C', - '𝘋' => 'D', - '𝘌' => 'E', - '𝘍' => 'F', - '𝘎' => 'G', - '𝘏' => 'H', - '𝘐' => 'I', - '𝘑' => 'J', - '𝘒' => 'K', - '𝘓' => 'L', - '𝘔' => 'M', - '𝘕' => 'N', - '𝘖' => 'O', - '𝘗' => 'P', - '𝘘' => 'Q', - '𝘙' => 'R', - '𝘚' => 'S', - '𝘛' => 'T', - '𝘜' => 'U', - '𝘝' => 'V', - '𝘞' => 'W', - '𝘟' => 'X', - '𝘠' => 'Y', - '𝘡' => 'Z', - '𝘢' => 'a', - '𝘣' => 'b', - '𝘤' => 'c', - '𝘥' => 'd', - '𝘦' => 'e', - '𝘧' => 'f', - '𝘨' => 'g', - '𝘩' => 'h', - '𝘪' => 'i', - '𝘫' => 'j', - '𝘬' => 'k', - '𝘭' => 'l', - '𝘮' => 'm', - '𝘯' => 'n', - '𝘰' => 'o', - '𝘱' => 'p', - '𝘲' => 'q', - '𝘳' => 'r', - '𝘴' => 's', - '𝘵' => 't', - '𝘶' => 'u', - '𝘷' => 'v', - '𝘸' => 'w', - '𝘹' => 'x', - '𝘺' => 'y', - '𝘻' => 'z', - '𝘼' => 'A', - '𝘽' => 'B', - '𝘾' => 'C', - '𝘿' => 'D', - '𝙀' => 'E', - '𝙁' => 'F', - '𝙂' => 'G', - '𝙃' => 'H', - '𝙄' => 'I', - '𝙅' => 'J', - '𝙆' => 'K', - '𝙇' => 'L', - '𝙈' => 'M', - '𝙉' => 'N', - '𝙊' => 'O', - '𝙋' => 'P', - '𝙌' => 'Q', - '𝙍' => 'R', - '𝙎' => 'S', - '𝙏' => 'T', - '𝙐' => 'U', - '𝙑' => 'V', - '𝙒' => 'W', - '𝙓' => 'X', - '𝙔' => 'Y', - '𝙕' => 'Z', - '𝙖' => 'a', - '𝙗' => 'b', - '𝙘' => 'c', - '𝙙' => 'd', - '𝙚' => 'e', - '𝙛' => 'f', - '𝙜' => 'g', - '𝙝' => 'h', - '𝙞' => 'i', - '𝙟' => 'j', - '𝙠' => 'k', - '𝙡' => 'l', - '𝙢' => 'm', - '𝙣' => 'n', - '𝙤' => 'o', - '𝙥' => 'p', - '𝙦' => 'q', - '𝙧' => 'r', - '𝙨' => 's', - '𝙩' => 't', - '𝙪' => 'u', - '𝙫' => 'v', - '𝙬' => 'w', - '𝙭' => 'x', - '𝙮' => 'y', - '𝙯' => 'z', - '𝙰' => 'A', - '𝙱' => 'B', - '𝙲' => 'C', - '𝙳' => 'D', - '𝙴' => 'E', - '𝙵' => 'F', - '𝙶' => 'G', - '𝙷' => 'H', - '𝙸' => 'I', - '𝙹' => 'J', - '𝙺' => 'K', - '𝙻' => 'L', - '𝙼' => 'M', - '𝙽' => 'N', - '𝙾' => 'O', - '𝙿' => 'P', - '𝚀' => 'Q', - '𝚁' => 'R', - '𝚂' => 'S', - '𝚃' => 'T', - '𝚄' => 'U', - '𝚅' => 'V', - '𝚆' => 'W', - '𝚇' => 'X', - '𝚈' => 'Y', - '𝚉' => 'Z', - '𝚊' => 'a', - '𝚋' => 'b', - '𝚌' => 'c', - '𝚍' => 'd', - '𝚎' => 'e', - '𝚏' => 'f', - '𝚐' => 'g', - '𝚑' => 'h', - '𝚒' => 'i', - '𝚓' => 'j', - '𝚔' => 'k', - '𝚕' => 'l', - '𝚖' => 'm', - '𝚗' => 'n', - '𝚘' => 'o', - '𝚙' => 'p', - '𝚚' => 'q', - '𝚛' => 'r', - '𝚜' => 's', - '𝚝' => 't', - '𝚞' => 'u', - '𝚟' => 'v', - '𝚠' => 'w', - '𝚡' => 'x', - '𝚢' => 'y', - '𝚣' => 'z', - '𝚤' => 'ı', - '𝚥' => 'ȷ', - '𝚨' => 'Α', - '𝚩' => 'Β', - '𝚪' => 'Γ', - '𝚫' => 'Δ', - '𝚬' => 'Ε', - '𝚭' => 'Ζ', - '𝚮' => 'Η', - '𝚯' => 'Θ', - '𝚰' => 'Ι', - '𝚱' => 'Κ', - '𝚲' => 'Λ', - '𝚳' => 'Μ', - '𝚴' => 'Ν', - '𝚵' => 'Ξ', - '𝚶' => 'Ο', - '𝚷' => 'Π', - '𝚸' => 'Ρ', - '𝚹' => 'Θ', - '𝚺' => 'Σ', - '𝚻' => 'Τ', - '𝚼' => 'Υ', - '𝚽' => 'Φ', - '𝚾' => 'Χ', - '𝚿' => 'Ψ', - '𝛀' => 'Ω', - '𝛁' => '∇', - '𝛂' => 'α', - '𝛃' => 'β', - '𝛄' => 'γ', - '𝛅' => 'δ', - '𝛆' => 'ε', - '𝛇' => 'ζ', - '𝛈' => 'η', - '𝛉' => 'θ', - '𝛊' => 'ι', - '𝛋' => 'κ', - '𝛌' => 'λ', - '𝛍' => 'μ', - '𝛎' => 'ν', - '𝛏' => 'ξ', - '𝛐' => 'ο', - '𝛑' => 'π', - '𝛒' => 'ρ', - '𝛓' => 'ς', - '𝛔' => 'σ', - '𝛕' => 'τ', - '𝛖' => 'υ', - '𝛗' => 'φ', - '𝛘' => 'χ', - '𝛙' => 'ψ', - '𝛚' => 'ω', - '𝛛' => '∂', - '𝛜' => 'ε', - '𝛝' => 'θ', - '𝛞' => 'κ', - '𝛟' => 'φ', - '𝛠' => 'ρ', - '𝛡' => 'π', - '𝛢' => 'Α', - '𝛣' => 'Β', - '𝛤' => 'Γ', - '𝛥' => 'Δ', - '𝛦' => 'Ε', - '𝛧' => 'Ζ', - '𝛨' => 'Η', - '𝛩' => 'Θ', - '𝛪' => 'Ι', - '𝛫' => 'Κ', - '𝛬' => 'Λ', - '𝛭' => 'Μ', - '𝛮' => 'Ν', - '𝛯' => 'Ξ', - '𝛰' => 'Ο', - '𝛱' => 'Π', - '𝛲' => 'Ρ', - '𝛳' => 'Θ', - '𝛴' => 'Σ', - '𝛵' => 'Τ', - '𝛶' => 'Υ', - '𝛷' => 'Φ', - '𝛸' => 'Χ', - '𝛹' => 'Ψ', - '𝛺' => 'Ω', - '𝛻' => '∇', - '𝛼' => 'α', - '𝛽' => 'β', - '𝛾' => 'γ', - '𝛿' => 'δ', - '𝜀' => 'ε', - '𝜁' => 'ζ', - '𝜂' => 'η', - '𝜃' => 'θ', - '𝜄' => 'ι', - '𝜅' => 'κ', - '𝜆' => 'λ', - '𝜇' => 'μ', - '𝜈' => 'ν', - '𝜉' => 'ξ', - '𝜊' => 'ο', - '𝜋' => 'π', - '𝜌' => 'ρ', - '𝜍' => 'ς', - '𝜎' => 'σ', - '𝜏' => 'τ', - '𝜐' => 'υ', - '𝜑' => 'φ', - '𝜒' => 'χ', - '𝜓' => 'ψ', - '𝜔' => 'ω', - '𝜕' => '∂', - '𝜖' => 'ε', - '𝜗' => 'θ', - '𝜘' => 'κ', - '𝜙' => 'φ', - '𝜚' => 'ρ', - '𝜛' => 'π', - '𝜜' => 'Α', - '𝜝' => 'Β', - '𝜞' => 'Γ', - '𝜟' => 'Δ', - '𝜠' => 'Ε', - '𝜡' => 'Ζ', - '𝜢' => 'Η', - '𝜣' => 'Θ', - '𝜤' => 'Ι', - '𝜥' => 'Κ', - '𝜦' => 'Λ', - '𝜧' => 'Μ', - '𝜨' => 'Ν', - '𝜩' => 'Ξ', - '𝜪' => 'Ο', - '𝜫' => 'Π', - '𝜬' => 'Ρ', - '𝜭' => 'Θ', - '𝜮' => 'Σ', - '𝜯' => 'Τ', - '𝜰' => 'Υ', - '𝜱' => 'Φ', - '𝜲' => 'Χ', - '𝜳' => 'Ψ', - '𝜴' => 'Ω', - '𝜵' => '∇', - '𝜶' => 'α', - '𝜷' => 'β', - '𝜸' => 'γ', - '𝜹' => 'δ', - '𝜺' => 'ε', - '𝜻' => 'ζ', - '𝜼' => 'η', - '𝜽' => 'θ', - '𝜾' => 'ι', - '𝜿' => 'κ', - '𝝀' => 'λ', - '𝝁' => 'μ', - '𝝂' => 'ν', - '𝝃' => 'ξ', - '𝝄' => 'ο', - '𝝅' => 'π', - '𝝆' => 'ρ', - '𝝇' => 'ς', - '𝝈' => 'σ', - '𝝉' => 'τ', - '𝝊' => 'υ', - '𝝋' => 'φ', - '𝝌' => 'χ', - '𝝍' => 'ψ', - '𝝎' => 'ω', - '𝝏' => '∂', - '𝝐' => 'ε', - '𝝑' => 'θ', - '𝝒' => 'κ', - '𝝓' => 'φ', - '𝝔' => 'ρ', - '𝝕' => 'π', - '𝝖' => 'Α', - '𝝗' => 'Β', - '𝝘' => 'Γ', - '𝝙' => 'Δ', - '𝝚' => 'Ε', - '𝝛' => 'Ζ', - '𝝜' => 'Η', - '𝝝' => 'Θ', - '𝝞' => 'Ι', - '𝝟' => 'Κ', - '𝝠' => 'Λ', - '𝝡' => 'Μ', - '𝝢' => 'Ν', - '𝝣' => 'Ξ', - '𝝤' => 'Ο', - '𝝥' => 'Π', - '𝝦' => 'Ρ', - '𝝧' => 'Θ', - '𝝨' => 'Σ', - '𝝩' => 'Τ', - '𝝪' => 'Υ', - '𝝫' => 'Φ', - '𝝬' => 'Χ', - '𝝭' => 'Ψ', - '𝝮' => 'Ω', - '𝝯' => '∇', - '𝝰' => 'α', - '𝝱' => 'β', - '𝝲' => 'γ', - '𝝳' => 'δ', - '𝝴' => 'ε', - '𝝵' => 'ζ', - '𝝶' => 'η', - '𝝷' => 'θ', - '𝝸' => 'ι', - '𝝹' => 'κ', - '𝝺' => 'λ', - '𝝻' => 'μ', - '𝝼' => 'ν', - '𝝽' => 'ξ', - '𝝾' => 'ο', - '𝝿' => 'π', - '𝞀' => 'ρ', - '𝞁' => 'ς', - '𝞂' => 'σ', - '𝞃' => 'τ', - '𝞄' => 'υ', - '𝞅' => 'φ', - '𝞆' => 'χ', - '𝞇' => 'ψ', - '𝞈' => 'ω', - '𝞉' => '∂', - '𝞊' => 'ε', - '𝞋' => 'θ', - '𝞌' => 'κ', - '𝞍' => 'φ', - '𝞎' => 'ρ', - '𝞏' => 'π', - '𝞐' => 'Α', - '𝞑' => 'Β', - '𝞒' => 'Γ', - '𝞓' => 'Δ', - '𝞔' => 'Ε', - '𝞕' => 'Ζ', - '𝞖' => 'Η', - '𝞗' => 'Θ', - '𝞘' => 'Ι', - '𝞙' => 'Κ', - '𝞚' => 'Λ', - '𝞛' => 'Μ', - '𝞜' => 'Ν', - '𝞝' => 'Ξ', - '𝞞' => 'Ο', - '𝞟' => 'Π', - '𝞠' => 'Ρ', - '𝞡' => 'Θ', - '𝞢' => 'Σ', - '𝞣' => 'Τ', - '𝞤' => 'Υ', - '𝞥' => 'Φ', - '𝞦' => 'Χ', - '𝞧' => 'Ψ', - '𝞨' => 'Ω', - '𝞩' => '∇', - '𝞪' => 'α', - '𝞫' => 'β', - '𝞬' => 'γ', - '𝞭' => 'δ', - '𝞮' => 'ε', - '𝞯' => 'ζ', - '𝞰' => 'η', - '𝞱' => 'θ', - '𝞲' => 'ι', - '𝞳' => 'κ', - '𝞴' => 'λ', - '𝞵' => 'μ', - '𝞶' => 'ν', - '𝞷' => 'ξ', - '𝞸' => 'ο', - '𝞹' => 'π', - '𝞺' => 'ρ', - '𝞻' => 'ς', - '𝞼' => 'σ', - '𝞽' => 'τ', - '𝞾' => 'υ', - '𝞿' => 'φ', - '𝟀' => 'χ', - '𝟁' => 'ψ', - '𝟂' => 'ω', - '𝟃' => '∂', - '𝟄' => 'ε', - '𝟅' => 'θ', - '𝟆' => 'κ', - '𝟇' => 'φ', - '𝟈' => 'ρ', - '𝟉' => 'π', - '𝟊' => 'Ϝ', - '𝟋' => 'ϝ', - '𝟎' => '0', - '𝟏' => '1', - '𝟐' => '2', - '𝟑' => '3', - '𝟒' => '4', - '𝟓' => '5', - '𝟔' => '6', - '𝟕' => '7', - '𝟖' => '8', - '𝟗' => '9', - '𝟘' => '0', - '𝟙' => '1', - '𝟚' => '2', - '𝟛' => '3', - '𝟜' => '4', - '𝟝' => '5', - '𝟞' => '6', - '𝟟' => '7', - '𝟠' => '8', - '𝟡' => '9', - '𝟢' => '0', - '𝟣' => '1', - '𝟤' => '2', - '𝟥' => '3', - '𝟦' => '4', - '𝟧' => '5', - '𝟨' => '6', - '𝟩' => '7', - '𝟪' => '8', - '𝟫' => '9', - '𝟬' => '0', - '𝟭' => '1', - '𝟮' => '2', - '𝟯' => '3', - '𝟰' => '4', - '𝟱' => '5', - '𝟲' => '6', - '𝟳' => '7', - '𝟴' => '8', - '𝟵' => '9', - '𝟶' => '0', - '𝟷' => '1', - '𝟸' => '2', - '𝟹' => '3', - '𝟺' => '4', - '𝟻' => '5', - '𝟼' => '6', - '𝟽' => '7', - '𝟾' => '8', - '𝟿' => '9', - '𞸀' => 'ا', - '𞸁' => 'ب', - '𞸂' => 'ج', - '𞸃' => 'د', - '𞸅' => 'و', - '𞸆' => 'ز', - '𞸇' => 'ح', - '𞸈' => 'ط', - '𞸉' => 'ي', - '𞸊' => 'ك', - '𞸋' => 'ل', - '𞸌' => 'م', - '𞸍' => 'ن', - '𞸎' => 'س', - '𞸏' => 'ع', - '𞸐' => 'ف', - '𞸑' => 'ص', - '𞸒' => 'ق', - '𞸓' => 'ر', - '𞸔' => 'ش', - '𞸕' => 'ت', - '𞸖' => 'ث', - '𞸗' => 'خ', - '𞸘' => 'ذ', - '𞸙' => 'ض', - '𞸚' => 'ظ', - '𞸛' => 'غ', - '𞸜' => 'ٮ', - '𞸝' => 'ں', - '𞸞' => 'ڡ', - '𞸟' => 'ٯ', - '𞸡' => 'ب', - '𞸢' => 'ج', - '𞸤' => 'ه', - '𞸧' => 'ح', - '𞸩' => 'ي', - '𞸪' => 'ك', - '𞸫' => 'ل', - '𞸬' => 'م', - '𞸭' => 'ن', - '𞸮' => 'س', - '𞸯' => 'ع', - '𞸰' => 'ف', - '𞸱' => 'ص', - '𞸲' => 'ق', - '𞸴' => 'ش', - '𞸵' => 'ت', - '𞸶' => 'ث', - '𞸷' => 'خ', - '𞸹' => 'ض', - '𞸻' => 'غ', - '𞹂' => 'ج', - '𞹇' => 'ح', - '𞹉' => 'ي', - '𞹋' => 'ل', - '𞹍' => 'ن', - '𞹎' => 'س', - '𞹏' => 'ع', - '𞹑' => 'ص', - '𞹒' => 'ق', - '𞹔' => 'ش', - '𞹗' => 'خ', - '𞹙' => 'ض', - '𞹛' => 'غ', - '𞹝' => 'ں', - '𞹟' => 'ٯ', - '𞹡' => 'ب', - '𞹢' => 'ج', - '𞹤' => 'ه', - '𞹧' => 'ح', - '𞹨' => 'ط', - '𞹩' => 'ي', - '𞹪' => 'ك', - '𞹬' => 'م', - '𞹭' => 'ن', - '𞹮' => 'س', - '𞹯' => 'ع', - '𞹰' => 'ف', - '𞹱' => 'ص', - '𞹲' => 'ق', - '𞹴' => 'ش', - '𞹵' => 'ت', - '𞹶' => 'ث', - '𞹷' => 'خ', - '𞹹' => 'ض', - '𞹺' => 'ظ', - '𞹻' => 'غ', - '𞹼' => 'ٮ', - '𞹾' => 'ڡ', - '𞺀' => 'ا', - '𞺁' => 'ب', - '𞺂' => 'ج', - '𞺃' => 'د', - '𞺄' => 'ه', - '𞺅' => 'و', - '𞺆' => 'ز', - '𞺇' => 'ح', - '𞺈' => 'ط', - '𞺉' => 'ي', - '𞺋' => 'ل', - '𞺌' => 'م', - '𞺍' => 'ن', - '𞺎' => 'س', - '𞺏' => 'ع', - '𞺐' => 'ف', - '𞺑' => 'ص', - '𞺒' => 'ق', - '𞺓' => 'ر', - '𞺔' => 'ش', - '𞺕' => 'ت', - '𞺖' => 'ث', - '𞺗' => 'خ', - '𞺘' => 'ذ', - '𞺙' => 'ض', - '𞺚' => 'ظ', - '𞺛' => 'غ', - '𞺡' => 'ب', - '𞺢' => 'ج', - '𞺣' => 'د', - '𞺥' => 'و', - '𞺦' => 'ز', - '𞺧' => 'ح', - '𞺨' => 'ط', - '𞺩' => 'ي', - '𞺫' => 'ل', - '𞺬' => 'م', - '𞺭' => 'ن', - '𞺮' => 'س', - '𞺯' => 'ع', - '𞺰' => 'ف', - '𞺱' => 'ص', - '𞺲' => 'ق', - '𞺳' => 'ر', - '𞺴' => 'ش', - '𞺵' => 'ت', - '𞺶' => 'ث', - '𞺷' => 'خ', - '𞺸' => 'ذ', - '𞺹' => 'ض', - '𞺺' => 'ظ', - '𞺻' => 'غ', - '🄀' => '0.', - '🄁' => '0,', - '🄂' => '1,', - '🄃' => '2,', - '🄄' => '3,', - '🄅' => '4,', - '🄆' => '5,', - '🄇' => '6,', - '🄈' => '7,', - '🄉' => '8,', - '🄊' => '9,', - '🄐' => '(A)', - '🄑' => '(B)', - '🄒' => '(C)', - '🄓' => '(D)', - '🄔' => '(E)', - '🄕' => '(F)', - '🄖' => '(G)', - '🄗' => '(H)', - '🄘' => '(I)', - '🄙' => '(J)', - '🄚' => '(K)', - '🄛' => '(L)', - '🄜' => '(M)', - '🄝' => '(N)', - '🄞' => '(O)', - '🄟' => '(P)', - '🄠' => '(Q)', - '🄡' => '(R)', - '🄢' => '(S)', - '🄣' => '(T)', - '🄤' => '(U)', - '🄥' => '(V)', - '🄦' => '(W)', - '🄧' => '(X)', - '🄨' => '(Y)', - '🄩' => '(Z)', - '🄪' => '〔S〕', - '🄫' => 'C', - '🄬' => 'R', - '🄭' => 'CD', - '🄮' => 'WZ', - '🄰' => 'A', - '🄱' => 'B', - '🄲' => 'C', - '🄳' => 'D', - '🄴' => 'E', - '🄵' => 'F', - '🄶' => 'G', - '🄷' => 'H', - '🄸' => 'I', - '🄹' => 'J', - '🄺' => 'K', - '🄻' => 'L', - '🄼' => 'M', - '🄽' => 'N', - '🄾' => 'O', - '🄿' => 'P', - '🅀' => 'Q', - '🅁' => 'R', - '🅂' => 'S', - '🅃' => 'T', - '🅄' => 'U', - '🅅' => 'V', - '🅆' => 'W', - '🅇' => 'X', - '🅈' => 'Y', - '🅉' => 'Z', - '🅊' => 'HV', - '🅋' => 'MV', - '🅌' => 'SD', - '🅍' => 'SS', - '🅎' => 'PPV', - '🅏' => 'WC', - '🅪' => 'MC', - '🅫' => 'MD', - '🅬' => 'MR', - '🆐' => 'DJ', - '🈀' => 'ほか', - '🈁' => 'ココ', - '🈂' => 'サ', - '🈐' => '手', - '🈑' => '字', - '🈒' => '双', - '🈓' => 'デ', - '🈔' => '二', - '🈕' => '多', - '🈖' => '解', - '🈗' => '天', - '🈘' => '交', - '🈙' => '映', - '🈚' => '無', - '🈛' => '料', - '🈜' => '前', - '🈝' => '後', - '🈞' => '再', - '🈟' => '新', - '🈠' => '初', - '🈡' => '終', - '🈢' => '生', - '🈣' => '販', - '🈤' => '声', - '🈥' => '吹', - '🈦' => '演', - '🈧' => '投', - '🈨' => '捕', - '🈩' => '一', - '🈪' => '三', - '🈫' => '遊', - '🈬' => '左', - '🈭' => '中', - '🈮' => '右', - '🈯' => '指', - '🈰' => '走', - '🈱' => '打', - '🈲' => '禁', - '🈳' => '空', - '🈴' => '合', - '🈵' => '満', - '🈶' => '有', - '🈷' => '月', - '🈸' => '申', - '🈹' => '割', - '🈺' => '営', - '🈻' => '配', - '🉀' => '〔本〕', - '🉁' => '〔三〕', - '🉂' => '〔二〕', - '🉃' => '〔安〕', - '🉄' => '〔点〕', - '🉅' => '〔打〕', - '🉆' => '〔盗〕', - '🉇' => '〔勝〕', - '🉈' => '〔敗〕', - '🉐' => '得', - '🉑' => '可', - '🯰' => '0', - '🯱' => '1', - '🯲' => '2', - '🯳' => '3', - '🯴' => '4', - '🯵' => '5', - '🯶' => '6', - '🯷' => '7', - '🯸' => '8', - '🯹' => '9', -); diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/bootstrap.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/bootstrap.php deleted file mode 100644 index 7b037532..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/bootstrap.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Doofinder\Symfony\Polyfill\Intl\Normalizer as p; - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('normalizer_is_normalized')) { - function normalizer_is_normalized($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::isNormalized($string, $form); } -} -if (!function_exists('normalizer_normalize')) { - function normalizer_normalize($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::normalize($string, $form); } -} diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php deleted file mode 100644 index a52d5877..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Doofinder\Symfony\Polyfill\Intl\Normalizer as p; - -if (!function_exists('normalizer_is_normalized')) { - function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C) { return p\Normalizer::isNormalized((string) $string, (int) $form); } -} -if (!function_exists('normalizer_normalize')) { - function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C) { return p\Normalizer::normalize((string) $string, (int) $form); } -} diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-php72/LICENSE b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-php72/LICENSE deleted file mode 100644 index 4cd8bdd3..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-php72/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-2019 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-php72/Php72.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-php72/Php72.php deleted file mode 100644 index b9a8f992..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-php72/Php72.php +++ /dev/null @@ -1,217 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Doofinder\Symfony\Polyfill\Php72; - -/** - * @author Nicolas Grekas - * @author Dariusz Rumiński - * - * @internal - */ -final class Php72 -{ - private static $hashMask; - - public static function utf8_encode($s) - { - $s .= $s; - $len = \strlen($s); - - for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) { - switch (true) { - case $s[$i] < "\x80": $s[$j] = $s[$i]; break; - case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; - default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break; - } - } - - return substr($s, 0, $j); - } - - public static function utf8_decode($s) - { - $s = (string) $s; - $len = \strlen($s); - - for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) { - switch ($s[$i] & "\xF0") { - case "\xC0": - case "\xD0": - $c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F"); - $s[$j] = $c < 256 ? \chr($c) : '?'; - break; - - case "\xF0": - ++$i; - // no break - - case "\xE0": - $s[$j] = '?'; - $i += 2; - break; - - default: - $s[$j] = $s[$i]; - } - } - - return substr($s, 0, $j); - } - - public static function php_os_family() - { - if ('\\' === \DIRECTORY_SEPARATOR) { - return 'Windows'; - } - - $map = [ - 'Darwin' => 'Darwin', - 'DragonFly' => 'BSD', - 'FreeBSD' => 'BSD', - 'NetBSD' => 'BSD', - 'OpenBSD' => 'BSD', - 'Linux' => 'Linux', - 'SunOS' => 'Solaris', - ]; - - return isset($map[\PHP_OS]) ? $map[\PHP_OS] : 'Unknown'; - } - - public static function spl_object_id($object) - { - if (null === self::$hashMask) { - self::initHashMask(); - } - if (null === $hash = spl_object_hash($object)) { - return; - } - - // On 32-bit systems, PHP_INT_SIZE is 4, - return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); - } - - public static function sapi_windows_vt100_support($stream, $enable = null) - { - if (!\is_resource($stream)) { - trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); - - return false; - } - - $meta = stream_get_meta_data($stream); - - if ('STDIO' !== $meta['stream_type']) { - trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING); - - return false; - } - - // We cannot actually disable vt100 support if it is set - if (false === $enable || !self::stream_isatty($stream)) { - return false; - } - - // The native function does not apply to stdin - $meta = array_map('strtolower', $meta); - $stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri']; - - return !$stdin - && (false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM') - || 'Hyper' === getenv('TERM_PROGRAM')); - } - - public static function stream_isatty($stream) - { - if (!\is_resource($stream)) { - trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); - - return false; - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - $stat = @fstat($stream); - // Check if formatted mode is S_IFCHR - return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; - } - - return \function_exists('posix_isatty') && @posix_isatty($stream); - } - - private static function initHashMask() - { - $obj = (object) []; - self::$hashMask = -1; - - // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below - $obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush']; - foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) { - if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) { - $frame['line'] = 0; - break; - } - } - if (!empty($frame['line'])) { - ob_start(); - debug_zval_dump($obj); - self::$hashMask = (int) substr(ob_get_clean(), 17); - } - - self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); - } - - public static function mb_chr($code, $encoding = null) - { - if (0x80 > $code %= 0x200000) { - $s = \chr($code); - } elseif (0x800 > $code) { - $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); - } elseif (0x10000 > $code) { - $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } else { - $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } - - if ('UTF-8' !== $encoding = $encoding ?? mb_internal_encoding()) { - $s = mb_convert_encoding($s, $encoding, 'UTF-8'); - } - - return $s; - } - - public static function mb_ord($s, $encoding = null) - { - if (null === $encoding) { - $s = mb_convert_encoding($s, 'UTF-8'); - } elseif ('UTF-8' !== $encoding) { - $s = mb_convert_encoding($s, 'UTF-8', $encoding); - } - - if (1 === \strlen($s)) { - return \ord($s); - } - - $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; - if (0xF0 <= $code) { - return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; - } - if (0xE0 <= $code) { - return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; - } - if (0xC0 <= $code) { - return (($code - 0xC0) << 6) + $s[2] - 0x80; - } - - return $code; - } -} diff --git a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-php72/bootstrap.php b/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-php72/bootstrap.php deleted file mode 100644 index ba774ed8..00000000 --- a/doofinder-for-woocommerce/lib/vendor/symfony/polyfill-php72/bootstrap.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Doofinder\Symfony\Polyfill\Php72 as p; - -if (\PHP_VERSION_ID >= 70200) { - return; -} - -if (!defined('PHP_FLOAT_DIG')) { - define('PHP_FLOAT_DIG', 15); -} -if (!defined('PHP_FLOAT_EPSILON')) { - define('PHP_FLOAT_EPSILON', 2.2204460492503E-16); -} -if (!defined('PHP_FLOAT_MIN')) { - define('PHP_FLOAT_MIN', 2.2250738585072E-308); -} -if (!defined('PHP_FLOAT_MAX')) { - define('PHP_FLOAT_MAX', 1.7976931348623157E+308); -} -if (!defined('PHP_OS_FAMILY')) { - define('PHP_OS_FAMILY', p\Php72::php_os_family()); -} - -if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) { - function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); } -} -if (!function_exists('stream_isatty')) { - function stream_isatty($stream) { return p\Php72::stream_isatty($stream); } -} -if (!function_exists('utf8_encode')) { - function utf8_encode($string) { return p\Php72::utf8_encode($string); } -} -if (!function_exists('utf8_decode')) { - function utf8_decode($string) { return p\Php72::utf8_decode($string); } -} -if (!function_exists('spl_object_id')) { - function spl_object_id($object) { return p\Php72::spl_object_id($object); } -} -if (!function_exists('mb_ord')) { - function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } -} diff --git a/doofinder-for-woocommerce/readme.txt b/doofinder-for-woocommerce/readme.txt index 741adc58..2ba22acd 100644 --- a/doofinder-for-woocommerce/readme.txt +++ b/doofinder-for-woocommerce/readme.txt @@ -1,25 +1,25 @@ -=== Doofinder for WooCommerce === -Contributors: doofinder -Tags: search, autocomplete, woocommerce -Version: 1.5.49 -Requires at least: 5.0 +=== Doofinder WP & WooCommerce Search === +Contributors: Doofinder +Tags: search, autocomplete +Version: 2.0.0 +Requires at least: 4.1 Tested up to: 6.1 Requires PHP: 5.6 Stable tag: trunk License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html -This plugin integrates the Doofinder search service with your WooCommerce shop. +This plugin integrates the Doofinder search service with your WordPress site. == Description == Doofinder provides fast, accurate results based on your website contents. Results appear in your search box at an incredible speed as the user types. -[Doofinder](https://www.doofinder.com/en/solutions/woocommerce) can be installed in any website with very little configuration (you give us a data feed and we give you a bit of javascript code). +Doofinder can be installed in any website with very little configuration. -This extension allows you to easily populate the data feed Doofinder needs to be able to search your database and to insert the Doofinder layer script into your WooCommerce site. +This extension allows you to easily populate the data Doofinder needs to be able to search your database and to insert the Doofinder layer script into your WordPress site. -With Doofinder you are confident that your visitors are finding what they are looking for regardless of the number of products in your site. +With Doofinder you are confident that your visitors are finding what they are looking for. These are some advantages of using Doofinder in your site: @@ -39,94 +39,54 @@ Furthermore, Doofinder sorts the results displaying the most relevant first. More info: -== Installation == - -WooCommerce MUST be installed before activating the plugin. - -Doofinder installation and activation is made [as in any other plugin](https://codex.wordpress.org/Managing_Plugins). - -These are two ways you can install the plugin: - -1. In the WordPress admin panel go to Plugins / Add New. Click "Upload Plugin". Choose the *.zip file containing the plugin, and click "Install Now". or... -2. Unpack the contents of the *.zip file containing the plugin to the plugins folder. In the typical WordPress installation that will be "/wp-contents/plugins" folder. -= Requirements = +== Requirements== __Important:__ To use this plugin you need to have an account at Doofinder. If you don't have one you can signup [here](http://www.doofinder.com/signup) to get your 30 day free trial period. -The minimum technical equirements are basically the same as the WooCommerce ones. Take a look at their [server requirements](https://docs.woocommerce.com/document/server-requirements/) for more info. - -= Configuration = - -**LAYER OPTIONS** - -**Enable the Layer** - -Enable the Doofinder JavaScript layer - when typing into a search field a window will pop up containing the list of results generated by Doofinder. This requires correct layer code pasted in the *Layer Javascript Code* field. - -**Layer Javascript Code** - -Here you can paste the Layer Javascript Code that can be found in the Doofinder Control Panel. It is required for the Javascript Layer to work. - -**INTERNAL SEARCH** - -Internal search overrides the default WooCommerce product search that happens when users enter their search term and press Enter (and the website goes to the search results page). It **requires both correct API Key and Hash ID** for the search engine registered with Doofinder. - -**API Key** +The minimum technical requirements are basically the same as the WordPress ones. Take a look at their [server requirements](https://docs.WordPress.com/document/server-requirements/) for more info. -Your API key can be found in the Doofinder Control Panel. Click on your profile name (in the header) and then on *API Keys*. - -**Hash ID** - -Search Engine's Hash ID can be found in the Doofinder Control Panel. Click on *Search Engines* in the header. Hash ID will be visible next to the name of your Search Engine. - -**DATA FEED** - -**Protect feed with password** - -Feed containing products will be behind a password, and will be inaccessible without it. Use this option if you don't want anyone to snoop on the properties of your products. - -**Feed password** - -The password protecting the product feed. - -**Export product prices** - -If this option is selected the product feed will contain prices of the products. If it is not selected then prices will be omitted. - -**Export product tags** -If this options is selected, product tags will be exported in the feed under the `tags` tag. - -**Split variable products** +== Installation == -If this option is selected then each variation of the variable product will be exported as a separate product. +__Important__: If you're upgrading to v0.4.x or greater from v0.3.x or lower, deactivate the plugin and activate again to migrate settings. -**Export values with units where applicable** +Doofinder installation and activation is made [as in any other plugin](https://codex.wordpress.org/Managing_Plugins). -Width, height, length and weight of the products will be exported with units. If the option is not selected then only the number will be exported. +These are two ways you can install the plugin: -**DATA FEED ATTRIBUTES** +1. In the WordPress admin panel go to Plugins / Add New. Click "Upload Plugin". Choose the *.zip file containing the plugin, and click "Install Now". or... +2. Unpack the contents of the *.zip file containing the plugin to the plugins folder. In the typical WordPress installation that will be "/wp-contents/plugins" folder. -Here you can change the default database fields used for the default feed fields and add any additional field you want to export. +== Configuration == -For example - by default the product description (from the WordPress WYSIWYG editor) is exported as "description" in the feed. But you might want to export "Short Description" instead. You only have to choose it from the dropdown. +Once activated, you will see a new entry in the main menu called _Doofinder_ with two sub-menus: -**Additional Attributes** +- **Doofinder:** To access the main settings page of the module. -Here you can choose any additional attributes to be exported in addition to the default ones. +**NOTICE:** Doofinder for WordPress has built-in support for [WPML](https://wpml.org/es/). In case you are using it, ensure you've switched _context_ to one of the defined languages. In _All Languages_ context you won't be able to configure anything. You will have to configure as many search engines as languages you have in your site. -To do this simply type in the name of the attribute you want to add in the "Field" field (what you want the attribute to appear as in the feed), and from the "Attribute" dropdown you can choose which value should be exported. Then click *Save*. +Doofinder Settings +================== -You can click *Delete* to remove the additional attributes from the feed. +General Settings +-------------- -== Frequently Asked Questions == +- **API Key:** This is the secret token you use to index contents (in ML environments you can share the same key). Your API key can be found in the Doofinder Control Panel. Click on your profile name (in the header) and then on *API Keys*. Make sure you're using a _Management_ API key and not a _Search_ API key. +- **Search Engine HashID:** Id of the search engine that will index your contents. Can be found in the Doofinder Control Panel. Click on *Search Engines* in the header. Hash ID will be visible next to the name of your Search Engine. Remember to use different search engines for different languages if you're in a ML environment. +- **Update on Save:** The period of time that must elapse before the posts / products are updated after making a change. +- **JS Layer Script:** Here you can modify the Layer Javascript Code. It is required for the Javascript Layer to work. -= I have a problem with your plugin. What can I do? = +== I have any other problem with your plugin. What can I do? == Just send your questions to and we will try to answer as fast as possible with a working solution for you. == Changelog == += 2.0.0 = +- Merged Doofinder and Doofinder for Woocommerce into a single plugin +- Make use of the rest API to improve the way we access the data you want to index. +- Added Setup Wizard and settings improvements. + = 1.5.49 = Fix custom attributes indexation diff --git a/doofinder-for-woocommerce/views/wizard-step-1.php b/doofinder-for-woocommerce/views/wizard-step-1.php old mode 100644 new mode 100755 index 0e616ffe..cfaa55f1 --- a/doofinder-for-woocommerce/views/wizard-step-1.php +++ b/doofinder-for-woocommerce/views/wizard-step-1.php @@ -1,11 +1,11 @@
-
+
- +
diff --git a/doofinder-for-woocommerce/views/wizard-step-2.php b/doofinder-for-woocommerce/views/wizard-step-2.php old mode 100644 new mode 100755 index b21518b6..ff06a63d --- a/doofinder-for-woocommerce/views/wizard-step-2.php +++ b/doofinder-for-woocommerce/views/wizard-step-2.php @@ -1,20 +1,20 @@ -
- - +
+ +
\ No newline at end of file diff --git a/doofinder-for-woocommerce/views/wizard-step-3.php b/doofinder-for-woocommerce/views/wizard-step-3.php old mode 100644 new mode 100755 index 25ce1d30..c7c57774 --- a/doofinder-for-woocommerce/views/wizard-step-3.php +++ b/doofinder-for-woocommerce/views/wizard-step-3.php @@ -1,49 +1,18 @@ - -
- - -
- -
- render_html_wp_debug_warning(); - ?> -
- 0% -
-
-
-
- render_html_progress_bar_status(); - $index_interface->render_html_indexing_messages(); - $index_interface->render_html_indexing_error_wizard(); - ?> -
- - - - - - \ No newline at end of file +
+
🏆
+

+

+ + +
\ No newline at end of file diff --git a/doofinder-for-woocommerce/views/wizard-step-4.php b/doofinder-for-woocommerce/views/wizard-step-4.php deleted file mode 100644 index 37c8c603..00000000 --- a/doofinder-for-woocommerce/views/wizard-step-4.php +++ /dev/null @@ -1,25 +0,0 @@ - - -
-

-
- - - \ No newline at end of file diff --git a/doofinder-for-woocommerce/views/wizard-step-5.php b/doofinder-for-woocommerce/views/wizard-step-5.php deleted file mode 100644 index 722b92fb..00000000 --- a/doofinder-for-woocommerce/views/wizard-step-5.php +++ /dev/null @@ -1,18 +0,0 @@ - -
-
🏆
-

-

- - -
\ No newline at end of file diff --git a/doofinder-for-woocommerce/views/wizard-step-all-in-one.php b/doofinder-for-woocommerce/views/wizard-step-all-in-one.php old mode 100644 new mode 100755 index f8840b40..6bb50cb3 --- a/doofinder-for-woocommerce/views/wizard-step-all-in-one.php +++ b/doofinder-for-woocommerce/views/wizard-step-all-in-one.php @@ -1,8 +1,8 @@ process_wizard_step($step_state); -if (Doofinder_For_WooCommerce::$disable_api_calls) { - Index_Interface::render_html_api_disabled_notice(); -} - -if (Data_Index::$should_fail || Setup_Wizard::$should_fail) { - Setup_Wizard::render_html_should_fail_notice(); -} - ?>
@@ -37,8 +29,8 @@ [ 'step' => 1, 'step_state' => $step_state, - 'title' => __('Select your sector', 'woocommerce-doofinder'), - 'desc' => __("Please select your business sector", 'woocommerce-doofinder') + 'title' => __('Select your sector', 'wordpress-doofinder'), + 'desc' => __("Please select your business sector", 'wordpress-doofinder') ] ); // Render step 2 @@ -47,40 +39,16 @@ [ 'step' => 2, 'step_state' => $step_state, - 'title' => __('Connect with Doofinder', 'woocommerce-doofinder'), - 'desc' => __("If you don't have a Doofinder account a new one will be created", 'woocommerce-doofinder') - ] - ); - - // Render step 3 - Template_Engine::get_template( - 'wizard-step', - [ - 'step' => 3, - 'setup_wizard' => $this, - 'step_state' => $step_state, - 'title' => __('Index your products', 'woocommerce-doofinder'), - 'desc' => __("We will send data to Doofinder for search optimization", 'woocommerce-doofinder') - ] - ); - - // Render step 4 - Template_Engine::get_template( - 'wizard-step', - [ - 'step' => 4, - 'setup_wizard' => $this, - 'step_state' => $step_state, - 'title' => __('Enable Doofinder', 'woocommerce-doofinder'), - 'desc' => __("Replace the default search by the Doofinder search service", 'woocommerce-doofinder') + 'title' => __('Connect with Doofinder', 'wordpress-doofinder'), + 'desc' => __("If you don't have a Doofinder account a new one will be created", 'wordpress-doofinder') ] ); ?>
$step_state, 'no_steps' => $this::$no_steps diff --git a/doofinder-for-woocommerce/views/wizard-step.php b/doofinder-for-woocommerce/views/wizard-step.php old mode 100644 new mode 100755 index 0621ea33..b4a10ead --- a/doofinder-for-woocommerce/views/wizard-step.php +++ b/doofinder-for-woocommerce/views/wizard-step.php @@ -1,6 +1,6 @@ $step ? true : false; $error = $wizard->get_errors_html("wizard-step-$step"); ?> -
- -
-
+
+ +
+
-

+

-

+

-
+
- +
diff --git a/doofinder-for-woocommerce/views/wizard.php b/doofinder-for-woocommerce/views/wizard.php old mode 100644 new mode 100755 index 70894ec3..457b612d --- a/doofinder-for-woocommerce/views/wizard.php +++ b/doofinder-for-woocommerce/views/wizard.php @@ -1,60 +1,59 @@ - - -> - - - - - <?php printf(__('%s - Doofinder Setup Wizard', 'woocommerce-doofinder'), get_bloginfo('name')); ?> - - - - - - - -
-

- -
- render_wizard_step(); - ?> -
-
- - -
- - - - - - - \ No newline at end of file + + +> + + + + + <?php printf(__('%s - Doofinder Setup Wizard', 'wordpress-doofinder'), get_bloginfo('name')); ?> + + + + + + + +
+

+ +
+ render_wizard_step(); + ?> +
+
+ + +
+ + + + + + + diff --git a/package-lock.json b/package-lock.json index f8b4a77b..76a94bad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,1809 +1,4961 @@ { - "name": "doofinder-woocommerce", - "version": "1.5.33", - "lockfileVersion": 1, + "name": "doofinder-wordpress", + "version": "0.5.4", + "lockfileVersion": 2, "requires": true, - "dependencies": { - "array-differ": { + "packages": { + "": { + "name": "doofinder-wordpress", + "version": "0.5.4", + "license": "MIT", + "devDependencies": { + "grunt": "~1.0.1", + "grunt-contrib-clean": "~1.0.0", + "grunt-contrib-compress": "~1.4.1", + "grunt-contrib-copy": "~1.0.0", + "grunt-version": "~1.1.1", + "load-grunt-tasks": "~4.0.0" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "optional": true, + "dependencies": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true, + "optional": true + }, + "node_modules/archiver": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz", + "integrity": "sha1-TyGU1tj5nfP1MeaIHxTxXVX6ryI=", + "dev": true, + "dependencies": { + "archiver-utils": "^1.3.0", + "async": "^2.0.0", + "buffer-crc32": "^0.2.1", + "glob": "^7.0.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0", + "tar-stream": "^1.5.0", + "walkdir": "^0.0.11", + "zip-stream": "^1.1.0" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/archiver-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", + "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", + "dev": true, + "dependencies": { + "glob": "^7.0.0", + "graceful-fs": "^4.1.0", + "lazystream": "^1.0.0", + "lodash": "^4.8.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/archiver/node_modules/async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "dependencies": { + "lodash": "^4.17.10" + } + }, + "node_modules/are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "optional": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/argparse/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/array-differ": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha512-LeZY+DZDRnvP7eMuQ6LHfCzUGxAAIViUBliK24P3hWXL6y4SortgR6Nim6xrkfSLlmH0+k+9NYNwVC2s53ZrYQ==", - "dev": true + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "array-union": { + "node_modules/array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, - "requires": { + "dependencies": { "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true, + "optional": true + }, + "node_modules/assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true, + "optional": true + }, + "node_modules/aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true, + "optional": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "dev": true, + "optional": true + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "optional": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "dependencies": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "optional": true, + "dependencies": { + "inherits": "~2.0.0" + }, + "engines": { + "node": "0.4 || >=0.5.8" + } + }, + "node_modules/boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dev": true, + "optional": true, + "dependencies": { + "hoek": "2.x.x" + }, + "engines": { + "node": ">=0.10.40" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "node_modules/buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "node_modules/builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "dependencies": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true, + "optional": true + }, + "node_modules/chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true, + "optional": true + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true, + "optional": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/coffeescript": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", + "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", + "dev": true, + "bin": { + "cake": "bin/cake", + "coffee": "bin/coffee" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "dev": true, + "dependencies": { + "color-name": "1.1.1" + } + }, + "node_modules/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "dev": true + }, + "node_modules/colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "optional": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/compress-commons": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", + "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", + "dev": true, + "dependencies": { + "buffer-crc32": "^0.2.1", + "crc32-stream": "^2.0.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true, + "optional": true + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/crc": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.5.0.tgz", + "integrity": "sha1-mLi6fUiWZbo5efWbITgTdBAaGWQ=", + "dev": true + }, + "node_modules/crc32-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", + "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", + "dev": true, + "dependencies": { + "crc": "^3.4.4", + "readable-stream": "^2.0.0" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dev": true, + "optional": true, + "dependencies": { + "boom": "2.x.x" + }, + "engines": { + "node": ">=0.10.40" + } + }, + "node_modules/currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "dependencies": { + "array-find-index": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dashdash/node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "dependencies": { + "get-stdin": "^4.0.1", + "meow": "^3.3.0" + }, + "bin": { + "dateformat": "bin/cli.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "optional": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "optional": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true, + "optional": true + }, + "node_modules/detect-libc": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-0.2.0.tgz", + "integrity": "sha1-R/31ZzSKF+wl/L8LnkRjSKdvn7U=", + "dev": true, + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "dependencies": { + "jsbn": "~0.1.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", + "dev": true + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expand-template": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.1.tgz", + "integrity": "sha512-cebqLtV8KOZfw0UI8TEFWxtczxxC1jvyUvx6H4fyp1K1FN7A4Q+uggVUlOsI1K8AGU0rwOGqP8nCapdrw8CYQg==", + "dev": true, + "optional": true + }, + "node_modules/extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true, + "optional": true + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "optional": true + }, + "node_modules/file-sync-cmp": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz", + "integrity": "sha1-peeo/7+kk7Q7kju9TKiaU7Y7YSs=", + "dev": true + }, + "node_modules/find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "dependencies": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/findup-sync": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", + "dev": true, + "dependencies": { + "glob": "~5.0.0" + }, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/findup-sync/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "optional": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "optional": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "dev": true, + "optional": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + }, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "dependencies": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "node_modules/get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/getobject": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", + "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/getpass/node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", + "dev": true, + "optional": true + }, + "node_modules/glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/grunt": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.3.tgz", + "integrity": "sha512-/JzmZNPfKorlCrrmxWqQO4JVodO+DVd5XX4DkocL/1WlLlKVLE9+SdEIempOAxDhWPysLle6afvn/hg7Ck2k9g==", + "dev": true, + "dependencies": { + "coffeescript": "~1.10.0", + "dateformat": "~1.0.12", + "eventemitter2": "~0.4.13", + "exit": "~0.1.1", + "findup-sync": "~0.3.0", + "glob": "~7.0.0", + "grunt-cli": "~1.2.0", + "grunt-known-options": "~1.1.0", + "grunt-legacy-log": "~2.0.0", + "grunt-legacy-util": "~1.1.1", + "iconv-lite": "~0.4.13", + "js-yaml": "~3.5.2", + "minimatch": "~3.0.2", + "mkdirp": "~0.5.1", + "nopt": "~3.0.6", + "path-is-absolute": "~1.0.0", + "rimraf": "~2.6.2" + }, + "bin": { + "grunt": "bin/grunt" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-clean": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-1.0.0.tgz", + "integrity": "sha1-ay7ZQRfix//jLuBFeMlv5GJam20=", + "dev": true, + "dependencies": { + "async": "^1.5.2", + "rimraf": "^2.5.1" + }, + "engines": { + "node": ">= 0.10.0" + }, + "peerDependencies": { + "grunt": ">= 0.4.5" + } + }, + "node_modules/grunt-contrib-compress": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/grunt-contrib-compress/-/grunt-contrib-compress-1.4.3.tgz", + "integrity": "sha1-Ac7/ucY39S5wgfRjdQmD0KOw+nM=", + "dev": true, + "dependencies": { + "archiver": "^1.3.0", + "chalk": "^1.1.1", + "lodash": "^4.7.0", + "pretty-bytes": "^4.0.2", + "stream-buffers": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "optionalDependencies": { + "iltorb": "^1.0.13" + } + }, + "node_modules/grunt-contrib-compress/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-compress/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-compress/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/grunt-contrib-copy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz", + "integrity": "sha1-cGDGWB6QS4qw0A8HbgqPbj58NXM=", + "dev": true, + "dependencies": { + "chalk": "^1.1.1", + "file-sync-cmp": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-copy/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-copy/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-contrib-copy/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/grunt-known-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.0.tgz", + "integrity": "sha1-pCdO6zL6dl2lp6OxcSYXzjsUQUk=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-legacy-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", + "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", + "dev": true, + "dependencies": { + "colors": "~1.1.2", + "grunt-legacy-log-utils": "~2.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.5" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/grunt-legacy-log-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", + "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", + "dev": true, + "dependencies": { + "chalk": "~2.4.1", + "lodash": "~4.17.10" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/grunt-legacy-util": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", + "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", + "dev": true, + "dependencies": { + "async": "~1.5.2", + "exit": "~0.1.1", + "getobject": "~0.1.0", + "hooker": "~0.2.3", + "lodash": "~4.17.10", + "underscore.string": "~3.3.4", + "which": "~1.3.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/grunt-version": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-version/-/grunt-version-1.1.1.tgz", + "integrity": "sha1-C58oAhLKPITKhEGmiK0aB6R05vM=", + "dev": true, + "dependencies": { + "grunt": "0.4.5 - 1", + "semver": "^4.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/grunt-version/node_modules/semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/grunt/node_modules/grunt-cli": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", + "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", + "dev": true, + "dependencies": { + "findup-sync": "~0.3.0", + "grunt-known-options": "~1.1.0", + "nopt": "~3.0.6", + "resolve": "~1.1.0" + }, + "bin": { + "grunt": "bin/grunt" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true, + "optional": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "deprecated": "this library is no longer supported", + "dev": true, + "optional": true, + "dependencies": { + "ajv": "^4.9.1", + "har-schema": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true, + "optional": true + }, + "node_modules/hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "deprecated": "This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dev": true, + "optional": true, + "dependencies": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + }, + "engines": { + "node": ">=0.10.32" + } + }, + "node_modules/hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.40" + } + }, + "node_modules/hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/hosted-git-info": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz", + "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==", + "dev": true + }, + "node_modules/http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/iltorb": { + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-1.3.10.tgz", + "integrity": "sha512-nyB4+ru1u8CQqQ6w7YjasboKN3NQTN8GH/V/eEssNRKhW6UbdxdWhB9fJ5EEdjJfezKY0qPrcwLyIcgjL8hHxA==", + "deprecated": "The zlib module provides APIs for brotli compression/decompression starting with Node.js v10.16.0, please use it over iltorb", + "dev": true, + "hasInstallScript": true, + "optional": true, + "dependencies": { + "detect-libc": "^0.2.0", + "nan": "^2.6.2", + "node-gyp": "^3.6.2", + "prebuild-install": "^2.3.0" + } + }, + "node_modules/indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "dependencies": { + "repeating": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "node_modules/ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "deprecated": "Please update to ini >=1.3.6 to avoid a prototype pollution issue", + "dev": true, + "optional": true, + "engines": { + "node": "*" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "dependencies": { + "builtin-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "optional": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true, + "optional": true + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true, + "optional": true + }, + "node_modules/js-yaml": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz", + "integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=", + "dev": true, + "dependencies": { + "argparse": "^1.0.2", + "esprima": "^2.6.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "node_modules/json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true, + "optional": true + }, + "node_modules/json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "optional": true, + "dependencies": { + "jsonify": "~0.0.0" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true, + "optional": true + }, + "node_modules/jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true, + "optional": true, + "engines": { + "node": "*" + } + }, + "node_modules/jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "optional": true, + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "node_modules/jsprim/node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/load-grunt-tasks": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-4.0.0.tgz", + "integrity": "sha512-w5JYPHpZgMxu9XFR9N9MEzyX8E0mLhQkwQ1qVP4mb3gmuomw8Ww8J49NHMbXqyQliq2LUCqdU7/wW96IVuPCKw==", + "dev": true, + "dependencies": { + "arrify": "^1.0.0", + "multimatch": "^2.0.0", + "pkg-up": "^2.0.0", + "resolve-pkg": "^1.0.0" + }, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "grunt": ">=1" + } + }, + "node_modules/load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/locate-path/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "node_modules/loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "dependencies": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "dependencies": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "optional": true, + "dependencies": { + "mime-db": "~1.33.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", + "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "dev": true, + "optional": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "node_modules/mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "dev": true, + "dependencies": { + "minimist": "0.0.8" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mkdirp/node_modules/minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "node_modules/multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "dependencies": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "dev": true, + "optional": true + }, + "node_modules/node-abi": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.4.3.tgz", + "integrity": "sha512-b656V5C0628gOOA2kwcpNA/bxdlqYF9FvxJ+qqVX0ctdXNVZpS8J6xEUYir3WAKc7U0BH/NRlSpNbGsy+azjeg==", + "dev": true, + "optional": true, + "dependencies": { + "semver": "^5.4.1" + } + }, + "node_modules/node-gyp": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.7.0.tgz", + "integrity": "sha512-qDQE/Ft9xXP6zphwx4sD0t+VhwV7yFaloMpfbL2QnnDZcyaiakWlLdtFGGQfTAwpFHdpbRhRxVhIHN1OKAjgbg==", + "dev": true, + "optional": true, + "dependencies": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": ">=2.9.0 <2.82.0", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/node-gyp/node_modules/semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true, + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=", + "dev": true, + "optional": true + }, + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "optional": true, + "dependencies": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true, + "optional": true, + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "optional": true, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "dependencies": { + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true, + "optional": true + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "dependencies": { + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-up/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/prebuild-install": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.3.tgz", + "integrity": "sha512-/rI36cN2g7vDQnKWN8Uzupi++KjyqS9iS+/fpwG4Ea8d0Pip0PQ5bshUNzVwt+/D2MRfhVAplYMMvWLqWrCF/g==", + "dev": true, + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "expand-template": "^1.0.2", + "github-from-package": "0.0.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "node-abi": "^2.2.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "os-homedir": "^1.0.1", + "pump": "^2.0.1", + "rc": "^1.1.6", + "simple-get": "^2.7.0", + "tar-fs": "^1.13.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + }, + "bin": { + "prebuild-install": "bin.js" + } + }, + "node_modules/prebuild-install/node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true, + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pretty-bytes": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", + "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "node_modules/pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "optional": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true, + "optional": true + }, + "node_modules/qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "optional": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "dependencies": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "dependencies": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "node_modules/repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "dependencies": { + "is-finite": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dev": true, + "optional": true, + "dependencies": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~4.2.1", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "performance-now": "^0.2.0", + "qs": "~6.4.0", + "safe-buffer": "^5.0.1", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.0.0" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "node_modules/resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-1.0.0.tgz", + "integrity": "sha1-4ZoV54rKLhJEYdySsuOUPvk0lNk=", + "dev": true, + "dependencies": { + "resolve-from": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "dependencies": { + "glob": "^7.0.5" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true, + "optional": true + }, + "node_modules/signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "node_modules/simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "dev": true, + "optional": true + }, + "node_modules/simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "dev": true, + "optional": true, + "dependencies": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "deprecated": "This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dev": true, + "optional": true, + "dependencies": { + "hoek": "2.x.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=", + "dev": true + }, + "node_modules/sshpk": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "dev": true, + "optional": true, + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "dashdash": "^1.12.0", + "getpass": "^0.1.1", + "safer-buffer": "^2.0.2" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + }, + "optionalDependencies": { + "bcrypt-pbkdf": "^1.0.0", + "ecc-jsbn": "~0.1.1", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" + } + }, + "node_modules/sshpk/node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/stream-buffers": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", + "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "optional": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", + "dev": true, + "optional": true + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "dependencies": { + "get-stdin": "^4.0.1" + }, + "bin": { + "strip-indent": "cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "deprecated": "This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.", + "dev": true, + "optional": true, + "dependencies": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + } + }, + "node_modules/tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "dev": true, + "optional": true, + "dependencies": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + } + }, + "node_modules/tar-fs/node_modules/pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "dev": true, + "optional": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/tar-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", + "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", + "dev": true, + "dependencies": { + "bl": "^1.0.0", + "buffer-alloc": "^1.1.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.0", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, + "node_modules/tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, + "optional": true, + "dependencies": { + "punycode": "^1.4.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "optional": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "node_modules/underscore.string": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", + "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", + "dev": true, + "dependencies": { + "sprintf-js": "^1.0.3", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "optional": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "optional": true, + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/walkdir": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", + "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=", + "dev": true, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true, + "optional": true + }, + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "optional": true, + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/zip-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", + "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", + "dev": true, + "dependencies": { + "archiver-utils": "^1.3.0", + "compress-commons": "^1.2.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0" + }, + "engines": { + "node": ">= 0.10.0" + } + } + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "optional": true, + "requires": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true, + "optional": true + }, + "archiver": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz", + "integrity": "sha1-TyGU1tj5nfP1MeaIHxTxXVX6ryI=", + "dev": true, + "requires": { + "archiver-utils": "^1.3.0", + "async": "^2.0.0", + "buffer-crc32": "^0.2.1", + "glob": "^7.0.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0", + "tar-stream": "^1.5.0", + "walkdir": "^0.0.11", + "zip-stream": "^1.1.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + } + } + }, + "archiver-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", + "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", + "dev": true, + "requires": { + "glob": "^7.0.0", + "graceful-fs": "^4.1.0", + "lazystream": "^1.0.0", + "lodash": "^4.8.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + } + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + } + } + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "dev": true, + "optional": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "optional": true, + "requires": { + "inherits": "~2.0.0" + } + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "dev": true, + "optional": true, + "requires": { + "hoek": "2.x.x" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true, + "optional": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "optional": true + }, + "coffeescript": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", + "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", + "dev": true + }, + "color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "dev": true, + "requires": { + "color-name": "1.1.1" + } + }, + "color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "optional": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "compress-commons": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", + "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", + "dev": true, + "requires": { + "buffer-crc32": "^0.2.1", + "crc32-stream": "^2.0.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "crc": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.5.0.tgz", + "integrity": "sha1-mLi6fUiWZbo5efWbITgTdBAaGWQ=", + "dev": true + }, + "crc32-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", + "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", + "dev": true, + "requires": { + "crc": "^3.4.4", + "readable-stream": "^2.0.0" + } + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "dev": true, + "optional": true, + "requires": { + "boom": "2.x.x" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1", + "meow": "^3.3.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "optional": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-0.2.0.tgz", + "integrity": "sha1-R/31ZzSKF+wl/L8LnkRjSKdvn7U=", + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", + "dev": true + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-template": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.1.tgz", + "integrity": "sha512-cebqLtV8KOZfw0UI8TEFWxtczxxC1jvyUvx6H4fyp1K1FN7A4Q+uggVUlOsI1K8AGU0rwOGqP8nCapdrw8CYQg==", + "dev": true, + "optional": true + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true, + "optional": true + }, + "file-sync-cmp": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz", + "integrity": "sha1-peeo/7+kk7Q7kju9TKiaU7Y7YSs=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "findup-sync": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", + "dev": true, + "requires": { + "glob": "~5.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", + "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "dev": true, + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "dev": true, + "optional": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "getobject": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", + "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", + "dev": true, + "optional": true + }, + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "grunt": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.3.tgz", + "integrity": "sha512-/JzmZNPfKorlCrrmxWqQO4JVodO+DVd5XX4DkocL/1WlLlKVLE9+SdEIempOAxDhWPysLle6afvn/hg7Ck2k9g==", + "dev": true, + "requires": { + "coffeescript": "~1.10.0", + "dateformat": "~1.0.12", + "eventemitter2": "~0.4.13", + "exit": "~0.1.1", + "findup-sync": "~0.3.0", + "glob": "~7.0.0", + "grunt-cli": "~1.2.0", + "grunt-known-options": "~1.1.0", + "grunt-legacy-log": "~2.0.0", + "grunt-legacy-util": "~1.1.1", + "iconv-lite": "~0.4.13", + "js-yaml": "~3.5.2", + "minimatch": "~3.0.2", + "mkdirp": "~0.5.1", + "nopt": "~3.0.6", + "path-is-absolute": "~1.0.0", + "rimraf": "~2.6.2" + }, + "dependencies": { + "grunt-cli": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", + "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", + "dev": true, + "requires": { + "findup-sync": "~0.3.0", + "grunt-known-options": "~1.1.0", + "nopt": "~3.0.6", + "resolve": "~1.1.0" + } + } + } + }, + "grunt-contrib-clean": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-1.0.0.tgz", + "integrity": "sha1-ay7ZQRfix//jLuBFeMlv5GJam20=", + "dev": true, + "requires": { + "async": "^1.5.2", + "rimraf": "^2.5.1" + } + }, + "grunt-contrib-compress": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/grunt-contrib-compress/-/grunt-contrib-compress-1.4.3.tgz", + "integrity": "sha1-Ac7/ucY39S5wgfRjdQmD0KOw+nM=", + "dev": true, + "requires": { + "archiver": "^1.3.0", + "chalk": "^1.1.1", + "iltorb": "^1.0.13", + "lodash": "^4.7.0", + "pretty-bytes": "^4.0.2", + "stream-buffers": "^2.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-contrib-copy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz", + "integrity": "sha1-cGDGWB6QS4qw0A8HbgqPbj58NXM=", + "dev": true, + "requires": { + "chalk": "^1.1.1", + "file-sync-cmp": "^0.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-known-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.0.tgz", + "integrity": "sha1-pCdO6zL6dl2lp6OxcSYXzjsUQUk=", + "dev": true + }, + "grunt-legacy-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", + "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", + "dev": true, + "requires": { + "colors": "~1.1.2", + "grunt-legacy-log-utils": "~2.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.5" + } + }, + "grunt-legacy-log-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", + "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", + "dev": true, + "requires": { + "chalk": "~2.4.1", + "lodash": "~4.17.10" + } + }, + "grunt-legacy-util": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", + "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", + "dev": true, + "requires": { + "async": "~1.5.2", + "exit": "~0.1.1", + "getobject": "~0.1.0", + "hooker": "~0.2.3", + "lodash": "~4.17.10", + "underscore.string": "~3.3.4", + "which": "~1.3.0" + } + }, + "grunt-version": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-version/-/grunt-version-1.1.1.tgz", + "integrity": "sha1-C58oAhLKPITKhEGmiK0aB6R05vM=", + "dev": true, + "requires": { + "grunt": "0.4.5 - 1", + "semver": "^4.0.0" + }, + "dependencies": { + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + } + } + }, + "har-schema": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", + "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", + "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", + "dev": true, + "optional": true, + "requires": { + "ajv": "^4.9.1", + "har-schema": "^1.0.5" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "optional": true, + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true, + "optional": true + }, + "hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", + "dev": true + }, + "hosted-git-info": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz", + "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==", + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "iltorb": { + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-1.3.10.tgz", + "integrity": "sha512-nyB4+ru1u8CQqQ6w7YjasboKN3NQTN8GH/V/eEssNRKhW6UbdxdWhB9fJ5EEdjJfezKY0qPrcwLyIcgjL8hHxA==", + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^0.2.0", + "nan": "^2.6.2", + "node-gyp": "^3.6.2", + "prebuild-install": "^2.3.0" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true, + "optional": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true, + "optional": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true, + "optional": true + }, + "js-yaml": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz", + "integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=", + "dev": true, + "requires": { + "argparse": "^1.0.2", + "esprima": "^2.6.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "optional": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } + }, + "load-grunt-tasks": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-4.0.0.tgz", + "integrity": "sha512-w5JYPHpZgMxu9XFR9N9MEzyX8E0mLhQkwQ1qVP4mb3gmuomw8Ww8J49NHMbXqyQliq2LUCqdU7/wW96IVuPCKw==", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "multimatch": "^2.0.0", + "pkg-up": "^2.0.0", + "resolve-pkg": "^1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "dev": true + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true, + "optional": true + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "optional": true, + "requires": { + "mime-db": "~1.33.0" + } + }, + "mimic-response": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", + "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + } + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "dev": true, + "optional": true + }, + "node-abi": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.4.3.tgz", + "integrity": "sha512-b656V5C0628gOOA2kwcpNA/bxdlqYF9FvxJ+qqVX0ctdXNVZpS8J6xEUYir3WAKc7U0BH/NRlSpNbGsy+azjeg==", + "dev": true, + "optional": true, + "requires": { + "semver": "^5.4.1" + } + }, + "node-gyp": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.7.0.tgz", + "integrity": "sha512-qDQE/Ft9xXP6zphwx4sD0t+VhwV7yFaloMpfbL2QnnDZcyaiakWlLdtFGGQfTAwpFHdpbRhRxVhIHN1OKAjgbg==", + "dev": true, + "optional": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": ">=2.9.0 <2.82.0", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true, + "optional": true + } + } + }, + "noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=", + "dev": true, + "optional": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "performance-now": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", + "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", + "dev": true, + "optional": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + } + } + }, + "prebuild-install": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-2.5.3.tgz", + "integrity": "sha512-/rI36cN2g7vDQnKWN8Uzupi++KjyqS9iS+/fpwG4Ea8d0Pip0PQ5bshUNzVwt+/D2MRfhVAplYMMvWLqWrCF/g==", + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^1.0.2", + "github-from-package": "0.0.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "node-abi": "^2.2.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "os-homedir": "^1.0.1", + "pump": "^2.0.1", + "rc": "^1.1.6", + "simple-get": "^2.7.0", + "tar-fs": "^1.13.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + }, + "dependencies": { + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "dev": true, + "optional": true + } + } + }, + "pretty-bytes": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", + "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", + "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~4.2.1", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "performance-now": "^0.2.0", + "qs": "~6.4.0", + "safe-buffer": "^5.0.1", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.0.0" + } + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", + "dev": true + }, + "resolve-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-1.0.0.tgz", + "integrity": "sha1-4ZoV54rKLhJEYdySsuOUPvk0lNk=", + "dev": true, + "requires": { + "resolve-from": "^2.0.0" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "dev": true, + "optional": true + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "dev": true, + "optional": true, + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "dev": true, + "optional": true, + "requires": { + "hoek": "2.x.x" + } + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "sprintf-js": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", + "integrity": "sha1-Nr54Mgr+WAH2zqPueLblqrlA6gw=", + "dev": true + }, + "sshpk": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "dev": true, + "optional": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } } }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "stream-buffers": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", + "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=", "dev": true }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } }, - "balanced-match": { + "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, + "optional": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", + "dev": true, + "optional": true }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "ansi-regex": "^2.0.0" } }, - "grunt": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.1.tgz", - "integrity": "sha1-6HeHZOlEsY8yuw8QuQeEdcnftWs=", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { - "coffee-script": "~1.10.0", - "dateformat": "~1.0.12", - "eventemitter2": "~0.4.13", - "exit": "~0.1.1", - "findup-sync": "~0.3.0", - "glob": "~7.0.0", - "grunt-cli": "~1.2.0", - "grunt-known-options": "~1.1.0", - "grunt-legacy-log": "~1.0.0", - "grunt-legacy-util": "~1.0.0", - "iconv-lite": "~0.4.13", - "js-yaml": "~3.5.2", - "minimatch": "~3.0.0", - "nopt": "~3.0.6", - "path-is-absolute": "~1.0.0", - "rimraf": "~2.2.8" - }, - "dependencies": { - "coffee-script": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.10.0.tgz", - "integrity": "sha1-EpOLz5vhlI+gBvkuDEyegXBRCMA=", - "dev": true - }, - "dateformat": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", - "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.3.0" - }, - "dependencies": { - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "dependencies": { - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true - } - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - }, - "dependencies": { - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - }, - "dependencies": { - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - } - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - } - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "normalize-package-data": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.6.tgz", - "integrity": "sha1-SY+kIMlkAfeHQCuiHmAN75+YH/8=", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "hosted-git-info": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.2.0.tgz", - "integrity": "sha1-eg0JeGPYhsD6u9zTe/F1jYvs+KU=", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - }, - "dependencies": { - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - } - } - }, - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "dev": true, - "requires": { - "spdx-correct": "~1.0.0", - "spdx-expression-parse": "~1.0.0" - }, - "dependencies": { - "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "dev": true, - "requires": { - "spdx-license-ids": "^1.0.2" - }, - "dependencies": { - "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", - "dev": true - } - } - }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", - "dev": true - } - } - } - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - }, - "dependencies": { - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - } - } - } - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "dependencies": { - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - }, - "dependencies": { - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - } - } - } - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - }, - "dependencies": { - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - } - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - }, - "dependencies": { - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - } - } - } - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - }, - "dependencies": { - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - } - } - } - } - } - } - } - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - }, - "dependencies": { - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - }, - "dependencies": { - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - }, - "dependencies": { - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - }, - "dependencies": { - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - } - } - } - } - } - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - } - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true - } - } - } - } - }, - "eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", - "dev": true - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true - }, - "findup-sync": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", - "dev": true, - "requires": { - "glob": "~5.0.0" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - }, - "dependencies": { - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - }, - "dependencies": { - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - } - } - } - } - } - }, - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - }, - "dependencies": { - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - }, - "dependencies": { - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - } - } - } - }, - "grunt-cli": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", - "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", - "dev": true, - "requires": { - "findup-sync": "~0.3.0", - "grunt-known-options": "~1.1.0", - "nopt": "~3.0.6", - "resolve": "~1.1.0" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - } - } - }, - "grunt-known-options": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.0.tgz", - "integrity": "sha1-pCdO6zL6dl2lp6OxcSYXzjsUQUk=", - "dev": true - }, - "grunt-legacy-log": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-1.0.0.tgz", - "integrity": "sha1-+4bxgJhHvAfcR4Q/ns1srLYt8tU=", - "dev": true, - "requires": { - "colors": "~1.1.2", - "grunt-legacy-log-utils": "~1.0.0", - "hooker": "~0.2.3", - "lodash": "~3.10.1", - "underscore.string": "~3.2.3" - }, - "dependencies": { - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - }, - "grunt-legacy-log-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-1.0.0.tgz", - "integrity": "sha1-p7ji0Ps1taUPSvmG/BEnSevJbz0=", - "dev": true, - "requires": { - "chalk": "~1.1.1", - "lodash": "~4.3.0" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "lodash": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz", - "integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ=", - "dev": true - } - } - }, - "hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", - "dev": true - }, - "lodash": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", - "dev": true - }, - "underscore.string": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.2.3.tgz", - "integrity": "sha1-gGmSYzZl1eX8tNsfs6hi62jp5to=", - "dev": true - } - } - }, - "grunt-legacy-util": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.0.0.tgz", - "integrity": "sha1-OGqnjcbtUJhsKxiVcmWxtIq7m4Y=", - "dev": true, - "requires": { - "async": "~1.5.2", - "exit": "~0.1.1", - "getobject": "~0.1.0", - "hooker": "~0.2.3", - "lodash": "~4.3.0", - "underscore.string": "~3.2.3", - "which": "~1.2.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "getobject": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", - "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", - "dev": true - }, - "hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", - "dev": true - }, - "lodash": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz", - "integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ=", - "dev": true - }, - "underscore.string": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.2.3.tgz", - "integrity": "sha1-gGmSYzZl1eX8tNsfs6hi62jp5to=", - "dev": true - }, - "which": { - "version": "1.2.12", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.12.tgz", - "integrity": "sha1-3me15FAmnxlJCe8j7OTr5Bb6EZI=", - "dev": true, - "requires": { - "isexe": "^1.1.1" - }, - "dependencies": { - "isexe": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz", - "integrity": "sha1-NvPiLmB1CSD15yQaR2qMakInWtA=", - "dev": true - } - } - } - } - }, - "iconv-lite": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", - "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=", - "dev": true - }, - "js-yaml": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz", - "integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=", - "dev": true, - "requires": { - "argparse": "^1.0.2", - "esprima": "^2.6.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - }, - "dependencies": { - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - } - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - } - } - }, - "minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", - "dev": true, - "requires": { - "brace-expansion": "^1.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", - "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", - "dev": true, - "requires": { - "balanced-match": "^0.4.1", - "concat-map": "0.0.1" - }, - "dependencies": { - "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - } - } - } - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", - "dev": true - } - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", - "dev": true - } + "get-stdin": "^4.0.1" } }, - "grunt-contrib-clean": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-1.0.0.tgz", - "integrity": "sha1-ay7ZQRfix//jLuBFeMlv5GJam20=", + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "optional": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "async": "^1.5.2", - "rimraf": "^2.5.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "rimraf": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", - "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", - "dev": true, - "requires": { - "glob": "^7.0.5" - }, - "dependencies": { - "glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - }, - "dependencies": { - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", - "dev": true, - "requires": { - "brace-expansion": "^1.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", - "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", - "dev": true, - "requires": { - "balanced-match": "^0.4.1", - "concat-map": "0.0.1" - }, - "dependencies": { - "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - } - } - } - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - }, - "dependencies": { - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - } - } - } - } - } + "has-flag": "^3.0.0" } }, - "grunt-contrib-compress": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-compress/-/grunt-contrib-compress-1.4.1.tgz", - "integrity": "sha1-NiEum7tB6bQf9vvi/HcoHGmrAqA=", + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, + "optional": true, "requires": { - "archiver": "^1.0.0", - "chalk": "^1.1.1", - "iltorb": "^1.0.13", - "lodash": "^4.7.0", - "pretty-bytes": "^3.0.1", - "stream-buffers": "^2.1.0" + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + } + }, + "tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" }, "dependencies": { - "archiver": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz", - "integrity": "sha1-TyGU1tj5nfP1MeaIHxTxXVX6ryI=", - "dev": true, - "requires": { - "archiver-utils": "^1.3.0", - "async": "^2.0.0", - "buffer-crc32": "^0.2.1", - "glob": "^7.0.0", - "lodash": "^4.8.0", - "readable-stream": "^2.0.0", - "tar-stream": "^1.5.0", - "walkdir": "^0.0.11", - "zip-stream": "^1.1.0" - }, - "dependencies": { - "archiver-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", - "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", - "dev": true, - "requires": { - "glob": "^7.0.0", - "graceful-fs": "^4.1.0", - "lazystream": "^1.0.0", - "lodash": "^4.8.0", - "normalize-path": "^2.0.0", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, - "requires": { - "readable-stream": "^2.0.5" - } - }, - "normalize-path": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz", - "integrity": "sha1-R4hqwWYnYNQmG32XnSQXCdPOP3o=", - "dev": true - } - } - }, - "async": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/async/-/async-2.1.5.tgz", - "integrity": "sha1-5YfGhYCZSsZ/xW/4bTrFa9voELw=", - "dev": true, - "requires": { - "lodash": "^4.14.0" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - }, - "dependencies": { - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", - "dev": true, - "requires": { - "brace-expansion": "^1.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", - "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", - "dev": true, - "requires": { - "balanced-match": "^0.4.1", - "concat-map": "0.0.1" - }, - "dependencies": { - "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", - "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - } - } - } - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - }, - "dependencies": { - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - } - } - }, - "readable-stream": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.3.tgz", - "integrity": "sha1-nPSUY5hd8BbIrogTCXqSk6mzNyk=", - "dev": true, - "requires": { - "buffer-shims": "^1.0.0", - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "buffer-shims": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - } - } - }, - "tar-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.2.tgz", - "integrity": "sha1-+8bG6DwaGdTLSMfZYXH8JI7/x78=", - "dev": true, - "requires": { - "bl": "^1.0.0", - "end-of-stream": "^1.0.0", - "readable-stream": "^2.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "bl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.0.tgz", - "integrity": "sha1-E5fn7ELF9dw4dHDFAONKn2vp6pg=", - "dev": true, - "requires": { - "readable-stream": "^2.0.5" - } - }, - "end-of-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.2.0.tgz", - "integrity": "sha1-vOgmheq2Ji4qeArnQOYzQCfAFiI=", - "dev": true, - "requires": { - "once": "~1.3.0" - }, - "dependencies": { - "once": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", - "dev": true, - "requires": { - "wrappy": "1" - }, - "dependencies": { - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - } - } - } - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - } - } - }, - "walkdir": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", - "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=", - "dev": true - }, - "zip-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.1.1.tgz", - "integrity": "sha1-Uha0i7tNJlH2TVxubwnrSnOZ1Vc=", - "dev": true, - "requires": { - "archiver-utils": "^1.3.0", - "compress-commons": "^1.1.0", - "lodash": "^4.8.0", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "compress-commons": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.1.0.tgz", - "integrity": "sha1-n0RguxKIVkx0c5FuApiqPDINyts=", - "dev": true, - "requires": { - "buffer-crc32": "^0.2.1", - "crc32-stream": "^1.0.0", - "normalize-path": "^2.0.0", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "crc32-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-1.0.1.tgz", - "integrity": "sha1-zixdw72P+zgw+ctH9UAiLGPJD6s=", - "dev": true, - "requires": { - "crc": "^3.4.4", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "crc": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/crc/-/crc-3.4.4.tgz", - "integrity": "sha1-naHpgOO9RPxck79as9ozeNheRms=", - "dev": true - } - } - }, - "normalize-path": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz", - "integrity": "sha1-R4hqwWYnYNQmG32XnSQXCdPOP3o=", - "dev": true - } - } - } - } - } - } - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "iltorb": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-1.0.13.tgz", - "integrity": "sha1-mRNThFe/OdPawiPrtNmZDb2hNU8=", + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", "dev": true, "optional": true, "requires": { - "nan": "^2.4.0" - }, - "dependencies": { - "nan": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.5.1.tgz", - "integrity": "sha1-1bAWkSUzJql6K77p5hxV2NYDUeI=", - "dev": true, - "optional": true - } + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } - }, - "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", - "dev": true - }, - "pretty-bytes": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz", - "integrity": "sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - }, - "dependencies": { - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - } - } - }, - "stream-buffers": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", - "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=", - "dev": true } } }, - "grunt-contrib-copy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz", - "integrity": "sha1-cGDGWB6QS4qw0A8HbgqPbj58NXM=", + "tar-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", + "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", "dev": true, "requires": { - "chalk": "^1.1.1", - "file-sync-cmp": "^0.1.0" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "file-sync-cmp": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz", - "integrity": "sha1-peeo/7+kk7Q7kju9TKiaU7Y7YSs=", - "dev": true - } + "bl": "^1.0.0", + "buffer-alloc": "^1.1.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.0", + "xtend": "^4.0.0" } }, - "grunt-version": { + "to-buffer": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/grunt-version/-/grunt-version-1.1.1.tgz", - "integrity": "sha1-C58oAhLKPITKhEGmiK0aB6R05vM=", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "dev": true, + "optional": true, "requires": { - "grunt": "0.4.5 - 1", - "semver": "^4.0.0" - }, - "dependencies": { - "semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", - "dev": true - } + "punycode": "^1.4.1" } }, - "load-grunt-tasks": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-3.5.2.tgz", - "integrity": "sha512-dwBbJ+Fmf1IrtASRdgT/KJNtczdlm+R3iLSi8KOGdCGl4V05uA055JHtafIXTyk5EJ1zDZbmEHndOQwU6uj8Jw==", + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, + "optional": true, "requires": { - "arrify": "^1.0.0", - "multimatch": "^2.0.0", - "pkg-up": "^1.0.0", - "resolve-pkg": "^0.1.0" + "safe-buffer": "^5.0.1" } }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "underscore.string": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", + "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "sprintf-js": "^1.0.3", + "util-deprecate": "^1.0.2" } }, - "multimatch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "integrity": "sha512-0mzK8ymiWdehTBiJh0vClAzGyQbdtyWqzSVx//EK4N/D+599RFlGfTAsKw2zMSABtDG9C6Ul2+t8f2Lbdjf5mA==", + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true, + "optional": true + }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "array-differ": "^1.0.0", - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "minimatch": "^3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, + "optional": true, "requires": { - "pinkie-promise": "^2.0.0" + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "optional": true + } } }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "walkdir": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", + "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=", "dev": true }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "pinkie": "^2.0.0" + "isexe": "^2.0.0" } }, - "pkg-up": { + "which-pm-runs": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-1.0.0.tgz", - "integrity": "sha512-L+d849d9lz20hnRpUnWBRXOh+mAvygQpK7UuXiw+6QbPwL55RVgl+G+V936wCzs/6J7fj0pvgLY9OknZ+FqaNA==", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, + "optional": true, "requires": { - "find-up": "^1.0.0" + "string-width": "^1.0.2 || 2" } }, - "resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha512-qpFcKaXsq8+oRoLilkwyc7zHGF5i9Q2/25NIgLQQ/+VVv9rU4qvr6nXVAw1DsnXJyQkZsR4Ytfbtg5ehfcUssQ==", + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "resolve-pkg": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-0.1.0.tgz", - "integrity": "sha512-x11rPP22t6W9p+eSOhDeT6whjFGmsZQf76rDq5gtbgh9UdBxZeR1PuW6sYkCyN/IrD2hpJ0yYn0hE1toHAadEw==", + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "zip-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", + "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", "dev": true, "requires": { - "resolve-from": "^2.0.0" + "archiver-utils": "^1.3.0", + "compress-commons": "^1.2.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0" } } } diff --git a/package.json b/package.json index 7729776c..9ab7c9fd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "doofinder-woocommerce", - "version": "1.5.49", - "description": "Integrate Doofinder in your WooCommerce site with (almost) no effort.", + "name": "doofinder-wordpress", + "version": "0.5.4", + "description": "Integrate Doofinder in your WordPress site with (almost) no effort.", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", @@ -9,27 +9,26 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/doofinder/doofinder-woocommerce.git" + "url": "git+https://github.com/doofinder/doofinder-wordpress.git" }, "keywords": [ - "woocommerce", - "search", - "woocommerce-plugin", "wordpress", - "wordpress-plugin" + "wordpress-plugin", + "search", + "doofinder" ], "author": "Doofinder", "license": "MIT", "bugs": { - "url": "https://github.com/doofinder/doofinder-woocommerce/issues" + "url": "https://github.com/doofinder/doofinder-wordpress/issues" }, - "homepage": "https://github.com/doofinder/doofinder-woocommerce#readme", + "homepage": "https://github.com/doofinder/doofinder-wordpress", "devDependencies": { - "grunt": "^1.0.1", - "grunt-contrib-clean": "^1.0.0", - "grunt-contrib-compress": "^1.4.1", - "grunt-contrib-copy": "^1.0.0", - "grunt-version": "^1.1.1", - "load-grunt-tasks": "^3.5.2" + "grunt": "~1.0.1", + "grunt-contrib-clean": "~1.0.0", + "grunt-contrib-compress": "~1.4.1", + "grunt-contrib-copy": "~1.0.0", + "grunt-version": "~1.1.1", + "load-grunt-tasks": "~4.0.0" } } diff --git a/patch_lib.sh b/patch_lib.sh deleted file mode 100755 index 3e0a6e47..00000000 --- a/patch_lib.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Apply patches if WordPress linter doesn't accept code. -# It's recommended to not execute this after each deps update so we can -# see if they updated their linter and stop patching code that became -# valid - -BASEDIR=`pwd` -PATCHESDIR="${BASEDIR}/patches" - -pushd doofinder-for-woocommerce/lib/vendor - -# https://wordpress.org/support/topic/errors-parsing-standard-input-code-bitwise-or/ -find . -type f -name bootstrap80.php -exec sed -i .bak -f "${PATCHESDIR}/bootstrap80.php.sed" {} + -find . -name "*.bak" -exec rm {} + - -popd diff --git a/patches/bootstrap80.php.sed b/patches/bootstrap80.php.sed deleted file mode 100644 index 027934e4..00000000 --- a/patches/bootstrap80.php.sed +++ /dev/null @@ -1,2 +0,0 @@ -s/: bool//g -s/: string\|false//g diff --git a/update_lib.sed b/update_lib.sed deleted file mode 100644 index b370fb23..00000000 --- a/update_lib.sed +++ /dev/null @@ -1,13 +0,0 @@ -s/GuzzleHttp/Doofinder\\GuzzleHttp/g -s/Doofinder\\GuzzleHttp\\\\/Doofinder\\\\GuzzleHttp\\\\/g -s/Symfony/Doofinder\\Symfony/g -s/Doofinder\\Symfony\\\\/Doofinder\\\\Symfony\\\\/g -s/Psr\\Http/Doofinder\\Psr\\Http/g -s/Psr\\\\Http\\\\/Doofinder\\\\Psr\\\\Http\\\\/g -s/'25072dd6e2470089de65ae7bf11d3109'/'doofinder-25072dd6e2470089de65ae7bf11d3109'/g -s/'e69f7f6ee287b969198c3c9d6777bd38'/'doofinder-e69f7f6ee287b969198c3c9d6777bd38'/g -s/'7b11c4dc42b3b3023073cb14e519683c'/'doofinder-7b11c4dc42b3b3023073cb14e519683c'/g -s/'f598d06aa772fa33d905e87be6398fb1'/'doofinder-f598d06aa772fa33d905e87be6398fb1'/g -s/'a0edc8309cc5e1d60e3047b5df6b7052'/'doofinder-a0edc8309cc5e1d60e3047b5df6b7052'/g -s/'c964ee0ededf28c96ebd9db5099ef910'/'doofinder-c964ee0ededf28c96ebd9db5099ef910'/g -s/'37a3dc5111fe8f707ab4c132ef1dbc62'/'doofinder-37a3dc5111fe8f707ab4c132ef1dbc62'/g diff --git a/update_lib.sh b/update_lib.sh deleted file mode 100755 index 03ec1437..00000000 --- a/update_lib.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -CWD=`pwd` -SED_FILE="${CWD}/update_lib.sed" -echo $SED_FILE - -function pushd { - command pushd "$@" > /dev/null -} - -function popd { - command popd "$@" > /dev/null -} - -function check_commands { - for app in "curl" "jq"; - do - if ! [ -x "$(command -v $app)" ]; then - echo "Error: $app is not installed." >&2 - exit 1 - fi - done -} - -check_commands -pushd doofinder-for-woocommerce - -rm -rf lib -DOWNLOAD_URL=`curl -s https://api.github.com/repos/doofinder/php-doofinder/releases/latest | jq -r ".tarball_url"` -curl -L $DOWNLOAD_URL | tar xzv -mv `find . -type d -name doofinder-php-doofinder-*` lib - -pushd lib - -composer update --no-dev - -rm -rf .gitignore swagger .git src/Search/Test -rm .travis.yml CHANGELOG.md phpunit.xml -find . -name "docs" -type d -print0 | xargs -0 rm -rf -find . -name ".github" -type d -print0 | xargs -0 rm -rf -find . -name "*.md" -print0 | xargs -0 rm -rf - -pushd vendor - -find . -name "*.md" -print0 | xargs -0 rm -find . -name "Dockerfile" -print0 | xargs -0 rm -find . -name "*.json" -print0 | xargs -0 rm -find . -name "*.pubkey*" -print0 | xargs -0 rm -find . -name "*.php_cs*" -print0 | xargs -0 rm -find . -name "phpstan*" -print0 | xargs -0 rm -find . -name "Makefile" -print0 | xargs -0 rm -find . -name "*.xml" -print0 | xargs -0 rm - -popd # vendor - -# prefix dependencies namespaces with Doofinder\ -find . -type f -name "*.php" -exec sed -i .bak -f $SED_FILE {} + -find . -name "*.bak" -exec rm {} + - -popd # lib -popd # doofinder-for-woocommerce